finishing-branch

Automates end-of-branch decisions with four options after tests pass.

Updated Jan 23, 2026
One-click install
npx skills add https://github.com/Veraticus/gambit --skill finishing-branch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-branch
Source: https://github.com/Veraticus/gambit/tree/main/skills/finishing-branch
Command: npx skills add https://github.com/Veraticus/gambit --skill finishing-branch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automate finishing a development branch after all tasks are complete and tests pass, providing clear integration options and safe cleanup decisions.

Core Features & Use Cases

  • Verification-driven finish: Confirms all tasks are complete and tests pass before any integration action.
  • 4-option governance: Presents exactly four integration choices (merge locally, create PR, keep branch, discard) and follows a strict decision flow.
  • Safe cleanup and governance: Manages worktrees and branch deletion with explicit confirmations to prevent data loss.
  • Use Case: A completed feature branch can be finished by choosing between merging into main, opening a PR, keeping for later review, or discarding if abandoned.

Quick Start

  1. Run TaskList to confirm all tasks show status completed.
  2. Run the project’s test command (e.g., go test ./..., npm test, pytest) to ensure all tests pass.
  3. Determine the base branch with git merge-base HEAD main (or master) to identify the integration base.
  4. Run gambit:finish to begin the 6-step process and follow the prompts to select one of the four options.

Frequently Asked Questions about finishing-branch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I finish a git feature branch after all tests pass?

Finishing a feature branch requires confirming all tasks are complete and tests pass, then choosing between merging, opening a pull request, keeping the branch, or discarding it with safe worktree cleanup.

What are the options for merging a completed feature branch?

The options for merging a completed feature branch are merging locally into the base branch, creating a pull request, keeping the branch for later review, or discarding it if abandoned. Safe cleanup behavior is applied per selected option.

Does finishing a branch require passing tests first?

Yes, finishing a branch requires passing tests first. It enforces a verification-driven finish by confirming all tasks show status completed and the project's test command passes before presenting any integration actions.

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

To clean up a git worktree after merging, the finishing process manages worktrees and branch deletion with explicit confirmations to prevent data loss, executing safe cleanup behavior based on your selected integration option.

What is the best way to safely discard an abandoned git branch?

The best way to safely discard an abandoned git branch is to use a four-option governance flow that includes a discard choice, ensuring explicit confirmations and safe worktree cleanup are enforced before any data is lost.

Can I keep a feature branch for later review without merging?

Yes, you can keep a feature branch for later review without merging. The four-option presentation explicitly includes a 'keep branch' choice, allowing you to delay integration while maintaining a safe worktree state.