| name | finishing-a-development-branch |
| description | Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup |
Guide completion of development work. Verify tests → Present options → Execute choice → Clean up.
Use when all tasks are complete and tests pass.
Use at the end of subagent-driven-development or executing-plans.
Announce at start: "I'm using the finishing-a-development-branch skill to complete this work."
**Verify tests** — Run project's test suite. If tests fail: show failures, stop. Cannot proceed until green.
**Determine base branch** — `git merge-base HEAD main` or ask.
**Present exactly 4 options** — (1) Merge locally, (2) Push and create PR, (3) Keep branch as-is, (4) Discard. No explanation — keep concise.
**Execute choice** — see option details below.
**Cleanup worktree** — For options 1, 2, 4: `git worktree remove `. For option 3: keep.
Option details
1. Merge locally: checkout base → pull → merge feature branch → verify tests on merged result → delete feature branch.
2. Push and create PR: push branch with -u → gh pr create with Summary + Test Plan.
3. Keep as-is: Report branch name and worktree path. Don't cleanup.
4. Discard: Confirm first (show branch, commits, worktree path). Require typed "discard". Then: checkout base → force-delete feature branch → remove worktree.
Never proceed with failing tests.
Never merge without verifying tests on result.
Never delete work without typed confirmation.
Never force-push without explicit request.
Integration
Called by: bp:subagent-driven-development (after all tasks), bp:executing-plans (after all batches).
Pairs with: bp:using-git-worktrees (cleans up worktree created by that skill).