finishing-a-development-branch

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

2|Updated May 30, 2026
One-click install
npx skills add https://github.com/virahitvin8/crafty-gis --skill finishing-a-development-branch-virahitvin8
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/virahitvin8/crafty-gis/tree/main/GIT_STAR/assignment-generator/antigravity-skills-main/antigravity-skills-main/skills/finishing-a-development-branch
Command: npx skills add https://github.com/virahitvin8/crafty-gis --skill finishing-a-development-branch-virahitvin8

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When implementation work is done, developers often face an ambiguous decision point: merge locally, open a pull request, keep the branch, or discard it. This Skill removes that ambiguity by verifying tests, detecting the git environment, and presenting a fixed set of structured completion options with safe execution and cleanup. ## Core Features & Use Cases - Test-Gated Completion: Runs the project's test suite first and refuses to proceed with merge or PR creation if any tests fail. - Environment Detection: Distinguishes normal repositories, named-branch worktrees, and detached HEAD states to present the correct option menu and cleanup behavior. - Structured Options & Safe Cleanup: Presents exactly four options (merge, PR, keep, discard), requires typed confirmation before discarding work, and only removes worktrees it provably created. - Use Case: After finishing a feature branch in a git worktree, invoke this Skill to verify tests pass, choose "Push and create a Pull Request", and have the branch pushed with a formatted PR body while the worktree is preserved for review iteration. ## Quick Start Use the finishing-a-development-branch skill to verify my tests and help me complete this feature branch.

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 locally into the base branch, pushing and creating a pull request, keeping the branch as-is, or discarding it. The Skill presents these as structured options and executes the chosen workflow including cleanup.

How do I create a pull request from a feature branch using git?

Push the branch with git push -u origin, then create the PR with gh pr create including a summary and test plan in the body. The worktree is preserved after PR creation so you can iterate on review feedback.

Can I merge a branch when tests are failing?

No. The Skill runs the test suite first and stops if any tests fail, showing the failures and refusing to proceed with merge or PR creation until they pass. Tests are also re-verified on the merged result.

Why does git branch -d fail when a worktree uses the branch?

Branch deletion fails because the worktree still references that branch. The correct order is to merge first, remove the worktree from the main repository root with git worktree remove, and only then delete the branch.

When should a git worktree not be removed after finishing work?

Worktrees are preserved when creating a pull request or keeping the branch, since they are needed for further iteration. Only worktrees under .worktrees/, worktrees/, or ~/.config/superpowers/worktrees/ are removed; externally managed workspaces are left in place.