skills/finishing-a-development-branch/SKILL.md
Use when implementation is complete and you need to handle branch completion - merge, PR, keep, or discard
npx skillsauth add BubbleBuffer/superpawers finishing-a-development-branchInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Guide completion of development work by presenting clear options and handling chosen workflow.
Core principle: Present options → Execute choice → Clean up.
Announce at start: "I'm using the finishing-a-development-branch skill to complete this work."
# Try common base branches
git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null
Or ask: "This branch split from main - is that correct?"
Present exactly these 4 options, each with one line of guidance:
Implementation complete and verified. What would you like to do?
1. Merge back to <base-branch> locally — solo or local workflows
2. Push and create a Pull Request — default for shared repos or when review/CI is required
3. Keep the branch as-is — pause work; resume later without merging or discarding
4. Discard this work — only if the user has explicitly abandoned the branch
Which option?
One line per option is allowed. Do not add longer explanations or recommendations — the user decides.
Use ordinary git commands:
git switch <base-branch>
git merge --no-ff <feature-branch>
git branch -d <feature-branch>
Only delete the feature branch after the merge succeeds.
# Push branch
git push -u origin <feature-branch>
# Create PR
gh pr create --title "<title>" --body "$(cat <<'EOF'
## Summary
<2-3 bullets of what changed>
## Test Plan
- [ ] <verification steps>
EOF
)"
Report: "Keeping branch <name>."
Confirm first:
This will permanently delete:
- Branch <name>
- All commits: <commit-list>
Type 'discard' to confirm.
Wait for exact confirmation.
If confirmed:
git switch <base-branch>
git branch -D <feature-branch>
| Option | Merge | Push | Keep Branch | Delete Branch | |--------|-------|------|-------------|---------------| | 1. Merge locally | yes | no | no | yes, after merge | | 2. Create PR | no | yes | yes | no | | 3. Keep as-is | no | no | yes | no | | 4. Discard | no | no | no | yes, after confirmation |
Open-ended questions
No confirmation for discard
Deleting the wrong branch
git branch --show-current and require typed confirmation before destructive branch deletionNever:
Always:
Use after:
subagent-driven-development — all tasks complete, final reviewer and verifier have passed.verification-before-completion — completion claims must be backed by fresh verification evidence before this skill runs.Pairs with:
using-git-branches — created the branch this skill completes.data-ai
Use when a request involves multiple steps or files, or when an approved design must be turned into a detailed implementation plan
development
Use when deciding which SuperPawers skill should govern a new task or workflow step, before taking any other action
development
Use when starting feature work that needs git isolation or before writing committed spec, plan, or code artifacts
development
Use when a task list exists or is being created for multi-step implementation work, whether from a formal plan or an ad-hoc breakdown