finishing-a-development-branch

Verify tests and guide merge, PR, or cleanup decisions for Git worktrees.

1|Updated May 28, 2026
One-click install
npx skills add https://github.com/amoutiers/maxi-superpowers --skill finishing-a-development-branch-amoutiers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/amoutiers/maxi-superpowers/tree/main/skills/finishing-a-development-branch
Command: npx skills add https://github.com/amoutiers/maxi-superpowers --skill finishing-a-development-branch-amoutiers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams finish development work by verifying tests, evaluating the workspace state, and presenting a clear set of structured options (merge locally, push PR, keep branch, or discard) to complete integration safely.

Core Features & Use Cases

  • Verify tests pass before offering options to ensure a clean integration.
  • Detect workspace state (normal repo, named worktree, or detached HEAD) to tailor available actions and cleanup behavior.
  • Present exactly four options (or three in detached HEAD scenarios) and execute the chosen workflow with optional cleanup.

Quick Start

Ask me to finish the current development branch, and I will verify tests, detect your environment, present four options, and perform the chosen action.

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 finish a development branch and merge it in Git?

Finishing a development branch safely requires verifying tests pass, detecting your Git workspace state, and choosing between local merge, pull request, keep, or discard options. This structured workflow prevents untested code from reaching the base branch.

Can I finish development work in a detached HEAD state or named worktree?

Yes, you can finish work in a detached HEAD state or named Git worktree. The workflow detects your environment and tailors actions accordingly, presenting three options for detached HEAD scenarios instead of the standard four merge and cleanup choices.

How do I automate Git branch cleanup after passing tests?

Automating Git branch cleanup after passing tests involves running your test suite first, then selecting an integration option like local merge or pull request. Optional workspace cleanup with safety checks is executed only after you choose a completion action.

What is the best way to handle pull requests and local merges for feature branches?

The best way to handle pull requests and local merges is to use a guided workflow that presents both options alongside keep and discard choices. This ensures tests pass first and the base branch is discovered before any integration action executes.

Why do my tests need to pass before merging a development branch?

Tests need to pass before merging a development branch to ensure clean integration and prevent breaking the base branch. The workflow requires a successful test run before presenting the four options to merge, push a PR, keep, or discard.

Does this workflow support discovering the base branch automatically in Git?

Yes, this workflow supports discovering the base branch automatically in Git. It uses git commands to detect your environment, find the base branch, and tailor the available merge, pull request, and cleanup options for your specific repository state.