用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/kmshihab7878/claude-code-setup --skill branch-finishing命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | Branch Finishing |
| description | Guidance for verifying, presenting finish options, and closing feature branches safely. |
Tests pass. Base determined. Options presented. Clean finish.
verification-before-completion confirms the work is doneexecuting-plans Phase 3 completesBefore presenting finish options, ALL of these must be true:
verification-before-completionIf any condition fails, resolve it before proceeding.
After pre-flight checks pass, present exactly these 4 options:
Best for: Completed features ready for integration
Steps:
1. Determine base branch (main/master/develop)
2. Rebase onto latest base: git fetch origin && git rebase origin/<base>
3. Resolve any conflicts
4. Fast-forward merge: git checkout <base> && git merge --ff-only <branch>
5. Delete feature branch: git branch -d <branch>
Best for: Team review required, CI/CD validation needed
Steps:
1. Push branch to remote: git push -u origin <branch>
2. Create PR with gh CLI:
gh pr create --title "<concise title>" --body "<summary + test plan>"
3. Return PR URL to user
4. Do NOT delete branch (PR lifecycle manages it)
Best for: Many small commits that should be one logical change
Steps:
1. Determine base branch
2. Interactive rebase to squash: git rebase -i origin/<base>
(or: git reset --soft origin/<base> && git commit)
3. Write comprehensive commit message
4. Fast-forward merge to base
5. Delete feature branch
Best for: Spike/experiment that won't be merged
Steps:
1. CONFIRM with user: "This will delete all work on this branch. Proceed?"
2. Switch to base: git checkout <base>
3. Delete branch: git branch -D <branch>
4. Clean up remote if pushed: git push origin --delete <branch>
Determine the base branch automatically:
# Check for common base branches
git branch -a | grep -E '(main|master|develop)' | head -1
# Or check the branch this was created from
git log --oneline --first-parent <branch> ^main | tail -1
Priority: main > master > develop > ask user.
verification-before-completion/pr-prep command patterns/debug skill for resolutiongit-worktrees skill