원클릭으로
source-command-ccg-clean-branches
清理 Git 分支:安全清理已合并或过期分支,默认 dry-run 模式
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
清理 Git 分支:安全清理已合并或过期分支,默认 dry-run 模式
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
REST API design patterns including resource naming, status codes, pagination, filtering, error responses, versioning, and rate limiting for production APIs.
Django testing strategies with pytest-django, TDD methodology, factory_boy, mocking, coverage, and testing Django REST Framework APIs.
Spring Security best practices for authn/authz, validation, CSRF, secrets, headers, rate limiting, and dependency security in Java Spring Boot services.
为网页应用快速接入 OpenClaw 通道配置,自动输出可直接复制的 Webhook URL 与 Token。用于用户说“帮我配置 OpenClaw 通道”“给我 Webhook 和 Token”“一键生成接入参数”“OpenClaw 对话接入配置”这类场景,支持外部网页与本地网页两种模式,减少手工查配置和复制错误。
基于 AI 自动生成高质量 PPT 图片和视频,支持智能转场和交互式播放。
Enforce TDD workflow for Kotlin. Write Kotest tests first, then implement. Verify 80%+ coverage with Kover.
SOC 직업 분류 기준
| name | source-command-ccg-clean-branches |
| description | 清理 Git 分支:安全清理已合并或过期分支,默认 dry-run 模式 |
Use this skill when the user asks to run the migrated source command ccg-clean-branches.
安全识别并清理已合并或长期未更新的分支。
/clean-branches [options]
| 选项 | 说明 |
|---|---|
--base <branch> | 基准分支(默认 main/master) |
--stale <days> | 清理超过 N 天未更新的分支 |
--remote | 同时清理远程分支 |
--dry-run | 只预览,不执行(默认) |
--yes | 跳过确认直接删除 |
--force | 强制删除未合并分支 |
[模式:准备]
git fetch --all --prune[模式:分析]
已合并分支:
--base 的分支过期分支(如指定 --stale):
排除:
[模式:报告]
## 将要删除的分支
### 已合并分支
- feature/old-feature (合并于 3 天前)
- bugfix/fixed-issue (合并于 7 天前)
### 过期分支
- experiment/old-test (最后更新 90 天前)
[模式:执行]
仅在不带 --dry-run 且确认后执行:
# 本地分支
git branch -d <branch>
# 远程分支(如果 --remote)
git push origin --delete <branch>
# 强制删除(如果 --force)
git branch -D <branch>
# 添加保护分支
git config --add branch.cleanup.protected develop
git config --add branch.cleanup.protected 'release/*'
# 查看保护分支
git config --get-all branch.cleanup.protected
# 预览将清理的分支
/clean-branches --dry-run
# 清理已合并且超过 90 天未动的分支
/clean-branches --stale 90
# 清理已合并到 release/v2.1 的分支
/clean-branches --base release/v2.1 --remote --yes