Finishing a development branch
Skill thesyntaxninja/syntaxninja-dojo/skills/finishing-a-development-branch
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work — merge, PR, or cleanupFrom its SKILL.md
npx -y skills add thesyntaxninja/syntaxninja-dojo --skill finishing-a-development-branchAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.9 KB, as published. Nobody here has run it
Finishing a Development Branch
Quick Reference
When work is done and verified: present the user with integration options (merge, PR, keep branch). Don't auto-merge or auto-push. The user decides.
When to Use
- Implementation is complete and verified
- All tests pass, sensei review is done
- Work is on a feature branch or worktree
- Ready to integrate into the main branch
When NOT to Use
- Work is still in progress
- Tests are failing
- Sensei review returned SIMPLIFY_FIRST or RETHINK
Core Process
Step 1: Verify Everything
Before presenting options, confirm:
- All tests pass
- Build succeeds
- Sensei review passed (or PASS_WITH_NOTES)
- No uncommitted changes
Step 2: Assess the Situation
Check:
# What branch are we on?
git branch --show-current
# How many commits ahead of main?
git log main..HEAD --oneline
# Any remote tracking?
git remote -v
Step 3: Present Options
Offer the user these choices:
Option A: Merge to main
git checkout main
git merge --no-ff <branch-name> -m "Merge: <description>"
Best for: local work, solo projects, small features.
Option B: Create a PR
git push -u origin <branch-name>
gh pr create --title "<title>" --body "<body>"
Best for: team projects, changes that need review, anything going to production.
Option C: Keep the branch Leave it as-is. User will handle integration later. Best for: when the user wants to review more, or is waiting on something.
Step 4: Execute the Chosen Option
Only proceed with the option the user chose.
For merge:
- Merge the branch
- Delete the feature branch:
git branch -d <branch-name> - If worktree:
git worktree remove <path>
For PR:
- Push the branch
- Create the PR with a clear title and summary
- Include test plan and any relevant notes
For keep:
- Confirm the branch name and status
- Remind the user where it is
Step 5: Cleanup
After merge:
- Delete local feature branch
- Delete remote feature branch (if pushed)
- Remove worktree (if applicable)
- Return to the main branch
Anti-Patterns
| Anti-Pattern | Why It's Wrong |
|---|---|
| Auto-merging without asking | The user decides when to merge |
| Auto-pushing without asking | Pushing affects shared state |
| Merging with failing tests | Fix tests first |
| Forgetting cleanup | Stale branches and worktrees accumulate |
| Force-pushing | Destroys history. Only with explicit user approval. |
Chaining
REQUIRED: syntaxninja-dojo:verification-before-completion (must be done before this skill)