finishing-a-development-branch

Guides completion of development branches through structured merge, PR, keep, or discard options.

1|Updated Oct 11, 2025
One-click install
npx skills add https://github.com/ibytechaos/claude --skill finishing-a-development-branch-ibytechaos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/ibytechaos/claude/tree/main/plugins/superpowers/skills/finishing-a-development-branch
Command: npx skills add https://github.com/ibytechaos/claude --skill finishing-a-development-branch-ibytechaos

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When implementation work is done, developers often face ambiguity about how to integrate the branch—risking broken merges, forgotten worktrees, or accidentally deleted work. This Skill enforces a disciplined completion workflow that verifies tests first and presents clear integration choices. ## Core Features & Use Cases - Test Gate Before Integration: Runs the project's test suite (npm test, cargo test, pytest, go test) and blocks any merge or PR until all tests pass. - Four Structured Options: Presents exactly four choices—merge locally to the base branch, push and create a GitHub PR via gh, keep the branch as-is, or discard with typed confirmation. - Worktree Cleanup: Automatically removes git worktrees after local merges or discards, while preserving them for PR and keep-as-is flows. - Use Case: After finishing a feature branch in a git worktree, invoke this Skill to verify tests pass, choose "create a Pull Request", and have the branch pushed with a formatted PR body generated automatically. ## Quick Start Ask the assistant to finish the current development branch and walk you through the merge, PR, keep, or discard options after verifying 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 one of four options: merge locally to the base branch, push and create a pull request, keep the branch as-is, or discard it. The workflow blocks integration if any tests fail.

How to create a GitHub pull request from a feature branch using gh CLI?

Push the branch with git push -u origin, then run gh pr create with a title and a body containing a summary of changes and a test plan checklist. The Skill generates this PR body automatically after tests pass.

Can I merge a branch when tests are failing?

No. The workflow stops immediately if the test suite reports failures and will not present merge or PR options until all tests pass. This prevents broken code from reaching the base branch.

When should I clean up a git worktree after finishing a branch?

Remove the worktree only after a local merge or a confirmed discard. Keep it when creating a pull request or keeping the branch as-is, since the work may still need review or further changes.

How do I safely delete a development branch without losing work?

The discard option requires typing the exact word 'discard' to confirm before force-deleting the branch with git branch -D and removing its worktree. This confirmation step prevents accidental deletion of commits.