finishing-a-development-branch

Verify tests and integrate a completed Git feature branch via merge, pull request, keep, or discard.

2|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/Clay-HHK/claude-config --skill finishing-a-development-branch-clay-hhk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/Clay-HHK/claude-config/tree/main/skills/superpowers/finishing-a-development-branch
Command: npx skills add https://github.com/Clay-HHK/claude-config --skill finishing-a-development-branch-clay-hhk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provide a clear, safe workflow for integrating or disposing of a completed development branch so teams avoid merging broken code, losing work, or leaving stale worktrees.

Core Features & Use Cases

  • Test verification: Enforce running the project's test suite and block progress if tests fail.
  • Structured decision points: Present exactly four concise options (merge locally, create a PR, keep branch, discard) and require explicit confirmation for destructive actions.
  • Execution and cleanup: Automate git merge/push/delete steps, verify tests after merges, and remove associated git worktrees when appropriate.
  • Use Case: After finishing a feature, use this Skill to confirm tests pass, choose how to integrate the work, perform the chosen git operations, and clean up the local worktree.

Quick Start

Finalize the current feature branch by verifying tests pass and then selecting one of the four options: merge locally, create a PR, keep the branch, or discard the work.

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 safely merge a completed git feature branch back into the base branch?

To safely merge a completed git feature branch, you must first run the project test suite to block progress on failures, then execute a local git merge into the base branch with post-merge test verification and optional worktree cleanup.

What should I do with stale git worktrees after finishing a development branch?

When finishing a development branch, you can remove associated stale git worktrees during the cleanup phase by providing typed confirmation for destructive actions, ensuring no orphaned working directories remain after the merge or discard workflow.

Can I create a pull request directly from a local feature branch after tests pass?

Yes, after test verification succeeds, you can select the option to create a pull request instead of merging locally, which pushes the feature branch to the remote repository for code review while keeping your local environment intact.

Does the branch finalization workflow require passing tests before discarding changes?

Test verification is enforced upfront before presenting finalization options, but you can still proceed to discard changes by providing explicit typed confirmation for the destructive action, bypassing the test requirement.

What is the best way to clean up unneeded feature branches without losing work?

The best way to clean up feature branches without losing work is to use a structured workflow that presents four explicit options—local merge, pull request, keep branch, or discard—requiring typed confirmation before executing any destructive git delete operations.