finishing-a-development-branch

Guides completion of development branches through structured merge, pull request, or cleanup options.

1|Updated Jul 6, 2015
One-click install
npx skills add https://github.com/ksolomon/dotfiles --skill finishing-a-development-branch-ksolomon
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/ksolomon/dotfiles/tree/main/AI/.claude/plugins/cache/claude-plugins-official/superpowers/6.1.1/skills/finishing-a-development-branch
Command: npx skills add https://github.com/ksolomon/dotfiles --skill finishing-a-development-branch-ksolomon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When implementation work is finished, developers face ambiguous decisions about how to integrate the branch—merge locally, open a pull request, keep it, or discard it—while avoiding mistakes like merging failing tests, deleting worktrees prematurely, or losing uncommitted work. ## Core Features & Use Cases - Test Verification Gate: Runs the project's test suite before presenting any integration options and stops if tests fail. - Environment Detection: Distinguishes normal repositories, named-branch worktrees, and detached HEAD states to present the correct option menu and cleanup behavior. - Structured Completion Options: Presents exactly four choices (merge locally, push and create PR, keep as-is, discard) with typed confirmation required before discarding work. - Use Case: After finishing a feature branch in a git worktree, use this Skill to verify tests pass, merge back to main, remove the worktree safely from the main repo root, and delete the branch without phantom git state. ## Quick Start Use the finishing-a-development-branch skill to complete my current feature branch now that all tests pass.

Frequently Asked Questions about finishing-a-development-branch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I finish a git feature branch after implementation is complete?▼

First verify the project's test suite passes, then choose between merging back to the base branch locally, pushing and creating a pull request, keeping the branch as-is, or discarding the work. Discarding requires typed confirmation to prevent accidental deletion.

How to clean up a git worktree after merging a branch?▼

Change directory to the main repository root first, then run git worktree remove followed by git worktree prune to clear stale registrations. Only remove worktrees under .worktrees/ or worktrees/ directories that your own tooling created.

Why does git branch -d fail when a worktree still exists?▼

Branch deletion fails because the worktree still references that branch. Merge the branch first, remove the worktree from the main repo root, and only then delete the branch with git branch -d.

Can I merge a branch when tests are failing?▼

No, failing tests block completion entirely. The workflow stops and reports the failures, requiring fixes before any merge or pull request can proceed, preventing broken code from reaching the base branch.

What happens to the worktree when creating a pull request?▼

The worktree is preserved when creating a pull request because you need it alive to iterate on review feedback. Worktree cleanup only runs for the local merge and discard options.