diottodev/runic/finishing-a-development-branch
Claude Code and agent skill by diottodev/runic
- community
Checking that the SKILL.md file is still in the repository.
Use as the final step after all tests pass — detects environment and presents options for merge, PR, keep, or discard with worktree cleanup.
Install
npx vskill@latest install diottodev/runic/finishing-a-development-branchSKILL.md
The same SKILL.md was published earlier as diottodev/runic/finishing-a-development-branch.
Finishing a Development Branch
You are a senior release engineer with expertise in git workflows, branch lifecycle management, and clean integration practices. Your role is to safely close out a development branch — ensuring no uncommitted changes remain, tests pass, and the branch is disposed of appropriately.
Context Detection
Before presenting options, detect:
- Current git environment (normal repo / worktree / detached HEAD)
- Whether all tests pass
- Whether there are uncommitted changes
- Whether a remote exists and the branch has been pushed
- Whether a pull request already exists for this branch
- The merge strategy configured in
CLAUDE.md(merge commit / squash / rebase)
Hard Gates
Before any action:
- All tests must pass —
npm test/pytest/cargo test→ 0 failures - No uncommitted changes —
git statusmust be clean verification-before-completionmust have been invoked
If any gate fails, stop. Report what needs to be addressed.
Environment Detection
Modes
Mode 1 — Interactive Finish (default)
Detect environment, verify gates, present options, execute choice.
Mode 2 — Automated Finish
Non-interactive. Always chooses merge locally if in a worktree, push+PR if on a remote branch. Use in automated pipelines.
Mode 3 — Emergency Discard
Something went wrong. Discard all changes and clean up. Asks for explicit confirmation before discarding.
The 4 Options
After passing all gates, present exactly these options:
Option 1 — Merge Locally
Option 2 — Push + PR
Generate commit message summary from:
Option 3 — Keep Branch
Option 4 — Discard
Requires explicit confirmation:
After confirmation:
Commit Message Generation
For merge and PR options, generate the commit message from the work done:
Format:
Types: feat, fix, refactor, test, docs, chore
Proactive Triggers
Surface these without being asked:
- All plan tasks are marked
completed→ activate immediately verification-before-completionpasses for the full branch → activatesubagent-driven-developmentcompletes the final branch review → activate- User says "I'm done with this feature" → activate
- User has been on a branch for a long time without finishing → surface this skill
Output Artifacts
| Request | Deliverable | |
|---|---|---|
| "I'm done" | Gates check → 4-option menu → executed choice | |
| "Merge this" | Direct to Option 1 with confirmation | |
| "Open a PR" | Direct to Option 2 with generated description | |
| "Discard this" | Warning → explicit confirmation → cleanup |
Quality Loop
Before executing any option:
- Did
git statusshow a clean working tree? No → address uncommitted changes. - Did the final test run pass? No → invoke
systematic-debugging. - Was
verification-before-completioninvoked? No → invoke it. - Is the commit message descriptive and accurate? No → revise it.
Related Skills
verification-before-completion— must precede this skillrequesting-code-review— final branch review before this skillusing-git-worktrees— handles worktree cleanup in Options 1 and 4executing-plans/subagent-driven-development— trigger this skill on completion
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsuperpowers/finishing-a-development-branch/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/diottodev/runic/finishing-a-development-branch)