Finishing a Development Branch
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work
Install
/plugin marketplace add obra/superpowersThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add obra/superpowers --skill finishing-a-development-branchgit clone --depth 1 https://github.com/obra/superpowers.git /tmp/superpowers
mkdir -p ~/.claude/skills
cp -r /tmp/superpowers/skills/finishing-a-development-branch ~/.claude/skills/finishing-a-development-branchPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Finishing a Development Branch ## Overview **Core principle:** Verify tests → Detect environment → Present options → Execute choice → Clean up. **Announce at start:** "I'm using the finishing-a-development-branch skill to complete this work." ## Step 1: Verify Tests Run the project's full test suite (`npm test` / `cargo test` / `pytest` / `go test ./...`). **If tests fail**, report the failures and stop — the menu comes after a green suite: ``` Tests failing (<N> failures). Must fix before completing: [Show failures] ``` **If tests pass:** continue to Step 2. ## Step 2: Detect Environment ```bash GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P) GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P) # Capture now, while still inside the workspace — Step 5 changes directory # before cleanup (Step 6) needs this value WORKTREE_PATH=$(git rev-parse --show-toplevel) ``` This determines which menu to show and how cleanup works: | State | Menu | Cleanup | |-------|------|---------| | `GIT_DIR == GIT_COMMON` (normal repo) | Standard 3 options | No worktree to clean up | | `GIT_DIR != GIT_COMMON`, named branch | Standard 3 options | Provenance-based (see Step 6) | | `GIT_DIR != GIT_COMMON`, detached HEAD | Reduced 2 options (no merge) | Externally managed — leave in place | ## Step 3: Determine Base Branch The base branch is whatever this work forked from — usually named in the
Details
- Skill name
finishing-a-development-branch- Repository
- obra/superpowers
- Path
skills/finishing-a-development-branch/SKILL.md- License
- MIT
- Repo updated
- 29 October 2026
FAQ
What does the Finishing a Development Branch skill do?
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work
How do I install the Finishing a Development Branch skill?
Claude Code plugin: /plugin marketplace add obra/superpowers. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Finishing a Development Branch popular?
It lives in obra/superpowers, which has 309,696 GitHub stars and 27,549 forks, and is included in 6 curated skill lists.
Related skills
Brainstorming
310kobra/superpowers
Transforms rough ideas into fully-formed designs. Structure your brainstorming sessions and develop ideas systematically.
Diagnosing Superpowers
310kobra/superpowers
Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.
Dispatching Parallel Agents
310kobra/superpowers
Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
Git Worktrees
310kobra/superpowers
Creates isolated git worktrees with safety checks. Manage multiple working directories for the same repository.
Receiving Code Review
310kobra/superpowers
Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
Requesting Code Review
310kobra/superpowers
Use when completing tasks, implementing major features, or before merging to verify work meets requirements
Browse the most popular Claude skills, all git & code review skills, or write your own with the skills generator.