finishing-a-development-branch

Guides merging, pushing, or preserving a completed development branch with test verification and worktree cleanup.

10|1|Updated Jul 29, 2026
One-click install
npx skills add https://github.com/flowing-abyss/obsidian-local-fonts --skill finishing-a-development-branch-flowing-abyss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/flowing-abyss/obsidian-local-fonts/tree/main/.ai/skills/finishing-a-development-branch
Command: npx skills add https://github.com/flowing-abyss/obsidian-local-fonts --skill finishing-a-development-branch-flowing-abyss

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 destructive mistakes like merging into the wrong base or deleting work prematurely. ## 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 repos, named-branch worktrees, and detached HEAD states to present the correct option menu and cleanup path. - Safe Cleanup: Removes only self-created worktrees under .worktrees/ or worktrees/, requires typed confirmation before discarding work, and verifies merged results before deleting branches. - Use Case: After finishing a feature in a git worktree, the assistant runs the test suite, confirms the base branch, presents merge/PR/keep options, executes the chosen path, and cleans up the worktree only when appropriate. ## Quick Start Use the finishing-a-development-branch skill to complete this branch now that all 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 safely merge a feature branch after implementation is complete?

Run the full test suite first and stop if anything fails. Then confirm the base branch, check out the base, pull, merge the feature branch, and re-run tests on the merged result before deleting the branch.

How do I clean up a git worktree after merging a branch?

Change directory to the main repo root, then run git worktree remove followed by git worktree prune. Only remove worktrees under .worktrees/ or worktrees/ directories; externally managed workspaces should be left in place.

What should I do with a detached HEAD worktree when work is finished?

A detached HEAD indicates an externally managed workspace, so merging is not offered. You can push as a new branch using git push origin HEAD:refs/heads/<new-branch> to create a pull request, or keep the workspace as-is.

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

Discarding work permanently deletes the branch, its commits, and the worktree, which is irreversible. Requiring the exact typed word 'discard' prevents accidental destruction from ambiguous casual requests.

What happens if tests fail on the merged result?

The process stops immediately, leaving the worktree and branch in place. Since nothing has been pushed, the merge is local and recoverable while you investigate the failure.