finishing-a-development-branch

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

Updated Sep 19, 2026
One-click install
npx skills add https://github.com/Ab0umar/selrs.cc.BU --skill finishing-a-development-branch-ab0umar
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/Ab0umar/selrs.cc.BU/tree/main/.codex/plugins/cache/openai-curated/superpowers/dc902811/skills/finishing-a-development-branch
Command: npx skills add https://github.com/Ab0umar/selrs.cc.BU --skill finishing-a-development-branch-ab0umar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When implementation work is done, developers often face ambiguity about how to integrate the branch: merge locally, open a pull request, keep it, or discard it. This Skill removes that guesswork by verifying tests first, detecting the git environment, and presenting a fixed set of structured options with safe execution and cleanup. ## Core Features & Use Cases - Test Gate Before Integration: Runs the project's test suite and blocks any merge or PR until all tests pass. - Environment Detection: Distinguishes normal repos, named-branch worktrees, and detached HEAD states to present the correct option menu and cleanup behavior. - Safe Execution & Cleanup: Handles local merges, PR creation via gh CLI, typed confirmation for discards, and provenance-based git worktree removal. - Use Case: After finishing a feature branch in a git worktree, the Skill verifies tests pass, offers four options, merges into main, removes the worktree, and deletes the branch in the correct order. ## Quick Start Ask the assistant to finish the current development branch and choose how to integrate the completed 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 finish a development branch after implementation is complete?▼

First verify the project's test suite passes, then choose from four options: merge back to the base branch locally, push and create a pull request, keep the branch as-is, or discard the work. The Skill executes the chosen path and handles branch and worktree cleanup.

How to merge a feature branch and clean up a git worktree safely?▼

Merge into the base branch first and verify tests on the merged result, then cd to the main repo root before running git worktree remove, and only then delete the branch. Deleting the branch before removing the worktree fails because the worktree still references it.

Can I create a GitHub pull request from a git worktree branch?▼

Yes, push the branch with git push -u origin and create the PR using gh pr create with a summary and test plan. The worktree is intentionally preserved so you can iterate on PR feedback.

What happens to git worktrees when discarding a branch?▼

Discarding requires typing 'discard' to confirm, then the worktree is removed and the branch is force-deleted with git branch -D. Only worktrees under .worktrees/, worktrees/, or ~/.config/superpowers/worktrees/ are removed; harness-owned workspaces are left in place.

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

The delete fails because the worktree still references the branch. The correct order is merge first, remove the worktree from the main repo root, then delete the branch.