finishing-a-development-branch

Guides merging, pushing, or preserving a completed Git branch after tests pass.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When implementation work is done, developers face an error-prone decision point: merge locally, open a pull request, or keep the branch. This Skill enforces a safe, repeatable process that verifies tests first, detects the Git environment, and prevents accidental data loss during branch cleanup. ## Core Features & Use Cases - Test-Gated Integration: Runs the full test suite before any integration decision and stops immediately on failures. - Environment Detection: Distinguishes normal repositories, named-branch worktrees, and detached HEAD states to present the correct option menu. - Safe Cleanup: Removes only worktrees under .worktrees/ or worktrees/, requires typed 'discard' confirmation before deleting work, and verifies merged results before deleting branches. - Use Case: After finishing a feature on a Git worktree, use this Skill to confirm tests pass, choose to merge into the base branch, and have the worktree and branch cleaned up safely. ## Quick Start Use the finishing-a-development-branch skill to complete my finished feature branch and decide how to integrate it.

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 feature branch after development is complete?

Run the full test suite first, then check out the base branch, pull latest changes, and merge the feature branch. Verify tests pass on the merged result before deleting the feature branch with git branch -d.

How do I remove a Git worktree after merging a branch?

Change directory to the main repository root, then run git worktree remove followed by git worktree prune to clean stale registrations. Only remove worktrees under .worktrees/ or worktrees/ directories; leave externally managed workspaces in place.

What should I do when working on a detached HEAD in Git?

A detached HEAD means the workspace is externally managed, so merging locally is not offered. Push the work as a new branch with git push origin HEAD:refs/heads/<new-branch> to create a pull request, or keep the state as-is.

Why does the skill refuse to delete a branch without confirmation?

Discarding work permanently deletes the branch, all its commits, and the worktree, which is irreversible. The skill requires the user to type the exact word 'discard' as confirmation before running git branch -D.

What happens if tests fail after merging into the base branch?

The process stops immediately, leaving the worktree and branch in place for investigation. Since nothing has been pushed, the merge is local and recoverable, so no cleanup occurs until the merged result is green.