
Finishing A Development Branch
When your feature branch is done and tests are green, this walks you through the four main options: merge locally, push and create a PR, keep it as is, or discard the work. It runs your test suite first and won't let you proceed if anything fails, then presents a clean decision menu. The smart bit is it handles the worktree cleanup automatically for local merges and discards but leaves it intact when you're creating a PR or explicitly keeping the branch around. Requires typed confirmation before deleting work. Designed to be called by subagent-driven-development and executing-plans skills when they finish their work.
- skills.sh installs
- 280
- GitHub stars
- 33.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add davila7/claude-code-templates --skill finishing-a-development-branch --agent claude-codeInstalls into .claude/skills of the current project.
Files
Finishing a Development Branch
Overview
Guide completion of development work by presenting clear options and handling chosen workflow.
Core principle: Verify tests → Present options → Execute choice → Clean up.
Announce at start: "I'm using the finishing-a-development-branch skill to complete this work."
The Process
Step 1: Verify Tests
Before presenting options, verify tests pass:
# Run project's test suite
npm test / cargo test / pytest / go test ./...
If tests fail:
Tests failing (<N> failures). Must fix before completing:
[Show failures]
Cannot proceed with merge/PR until tests pass.
Stop. Don't proceed to Step 2.
If tests pass: Continue to Step 2.
Step 2: Determine Base Branch
# 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?"
Step 3: Present Options
Present exactly these 4 options:
Implementation complete. What would you like to do?
Sponsors
Details
- Repository
- github.com/davila7/claude-code-templates
- Category
- Git & Pull Requests
- First seen
- Jun 3, 2026
More from davila7/claude-code-templates
All 618- Railway Templates280
- Skill Share280
- Cc Skill Continuous Learning279
- Dependency Updater279
- Gptq279
- Chembl Database278
- Deepchem278
- Rwkv Architecture277
- Sentencepiece277
- Using Git Worktrees277
- Free Tool Strategy276
- Qms Audit Expert276
- Railway Metrics276
- Nnsight Remote Interpretability275
- Pytdc275
- Railway Domain275
- Firecrawl Scraper274
- Simpo Training273
- Gene Database272
- Uniprot Database269
- File Uploads268
- Simpy265
- Meme Factory264
- Metabolomics Workbench Database264