一键导入
clean-branches
Clean up unnecessary local branches and prune stale remote-tracking branches
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Clean up unnecessary local branches and prune stale remote-tracking branches
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Approve a pull request using gh pr review --approve
Batch-triage open pull requests: list PRs with prs-awaiting-maintainer, review each with review-pr, then post-review-comments when there are merge-blocker findings, or create-scrap-issue for non-blocking findings and merge-pr when there are none. Use when the user wants to review and resolve a batch of PRs in one pass.
Clean git worktrees created by git-worktree-runner
Commit current changes, push to remote, and create or update a pull request. Use when the user wants to commit and create a PR, push changes and open a pull request, or ship their current work as a PR.
Analyze the differences between the current branch and origin/main, and summarize the current work progress
Prepare a new npm release: bump the version, open a release PR, and create a draft GitHub release. Publishing is automated by the Publish workflow once the release PR is merged into main.
| name | clean-branches |
| description | Clean up unnecessary local branches and prune stale remote-tracking branches |
Clean up unnecessary local branches and prune stale remote-tracking branches.
Run the following:
git branch --show-currentgit branch --format='%(refname:short)'git remote show origingit branch -vvIdentify:
main or master)After identifying the default branch, list branches already merged into it:
git branch --merged <default-branch>If you want to use the remote-tracking branch as the source of truth, use:
git branch --merged origin/<default-branch>Update remote refs and prune deleted remote branches:
git fetch --prune
If needed, also run:
git remote prune origin
Delete only branches that are clearly unnecessary.
Safe candidates include:
Never delete:
If there is any ambiguity, show the candidate branches to the user and ask for confirmation.
For merged branches, delete them safely:
git branch -d <branch-name>
Only if the user explicitly approves force deletion for unmerged branches, use:
git branch -D <branch-name>
Delete branches one by one, not with a broad wildcard command.
Summarize: