finishing-a-development-branch

Verify tests and execute a four-option git integration workflow.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/koseki2580/skills --skill finishing-a-development-branch-koseki2580
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/koseki2580/skills/tree/main/skills/finishing-a-development-branch
Command: npx skills add https://github.com/koseki2580/skills --skill finishing-a-development-branch-koseki2580

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents incomplete or unsafe integrations by forcing a final test verification and guiding the developer through an explicit, structured decision for how to integrate finished work.

Core Features & Use Cases

  • Test-first completion gate: Verifies the project test suite before offering any integration options, and stops immediately if tests fail.
  • Integration decision workflow: Detects the most likely base branch and presents exactly four concise options (merge locally, push & open PR, keep as-is, or discard).
  • Safety guardrails for destructive actions: Requires typed confirmation before permanently deleting a branch and its worktree.
  • Worktree cleanup: Removes worktree only when appropriate (Options 1 and 4), while preserving it for Option 3.

Quick Start

Use the finishing-a-development-branch skill when your implementation is complete and you want the AI to verify tests and then guide you through a safe merge, PR, keep, or discard decision.

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 git development branch after finishing a feature?

To safely merge a development branch, you should verify your test suite first, then choose a specific integration path like merging locally or opening a pull request. This structured workflow prevents incomplete code from being integrated.

What is the best way to clean up a git worktree after merging a branch?

Cleaning up a git worktree after merging depends on your integration decision. Worktree removal is executed automatically when you choose to merge locally or discard the branch, while preserving it if you keep the branch as-is.

How do I run tests before opening a pull request to prevent broken integrations?

Running tests before opening a pull request acts as a completion gate that stops integration immediately if the test suite fails. You must ensure deterministic test execution to verify your feature branch is safe to push.

Can I discard a git branch and its worktree without losing uncommitted changes?

Discarding a git branch requires typed confirmation to guard against destructive deletion. This safety mechanism ensures you intentionally remove the branch and its associated worktree only when you are certain the work is no longer needed.

Does branch management require knowing the exact base branch before integration?

Effective branch management does not require you to manually specify the base branch, as the workflow detects the most likely base branch automatically. It then presents four explicit options to guide your integration decision.

Why should I keep a development branch instead of merging it immediately?

Keeping a development branch instead of merging allows you to preserve unfinished work for later review or continued development. This option leaves your worktree intact while deferring the integration or discard decision.