Branch Finishing

Automate feature branch finalization with pre-finish checks and merge, PR, squash, or delete procedures.

6|1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/kmshihab7878/claude-code-setup --skill branch-finishing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Branch Finishing
Source: https://github.com/kmshihab7878/claude-code-setup/tree/main/skills/branch-finishing
Command: npx skills add https://github.com/kmshihab7878/claude-code-setup --skill branch-finishing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Removes manual, error-prone steps involved in finalizing feature branches by enforcing verification gates and presenting a controlled set of finish options so merges, PR creation, squashes, or deletions happen predictably and safely.

Core Features & Use Cases

  • Pre-finish verification: Requires passing tests, a clean working tree, non-main branch status, and verification evidence before allowing any finish action.
  • Four deterministic finish paths: Provide exact procedures for merging to base, creating a pull request, squashing commits, or discarding a branch with required confirmations.
  • Integration and safety: Guides rebase/merge conflict resolution flows, ties into PR prep and debug skills, and emphasizes explicit user confirmation for destructive steps.
  • Use Case: An engineer who has completed a feature and verified tests can quickly choose whether to merge to main, open a PR for review, compress commits into one logical change, or safely discard an experimental branch.

Quick Start

Finish the current branch by creating a pull request for review.

Frequently Asked Questions about Branch Finishing

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

FAQPage Schema
How do I safely merge a git feature branch with passing tests?

To safely merge a git feature branch, you need a workflow that enforces pre-finish verification gates, checking for passing tests and a clean working tree before providing controlled merge, rebase, or pull request creation procedures.

What is the best way to squash commits before finishing a git branch?

The best way to squash commits before finishing a git branch is to use an automated finalization process that verifies your non-main branch status and guides you through compressing commits into one logical change with required explicit confirmation.

Can I create a pull request automatically after my CI tests pass?

Yes, you can create a pull request after CI tests pass by applying a branch finishing workflow that requires verification evidence of passing tests before presenting controlled PR creation options.

How do I discard an experimental git branch without affecting main?

To discard an experimental git branch without affecting main, use a controlled finishing workflow that verifies you are not on the main branch and guides you through a safe deletion procedure with required explicit confirmations.

What pre-finish checks are required before merging a feature branch?

Required pre-finish checks before merging a feature branch include verifying passing tests, ensuring a clean working tree, confirming non-main branch status, and providing verification evidence before any merge, squash, or delete action is allowed.

Why does my git branch finishing workflow require a clean working tree?

A git branch finishing workflow requires a clean working tree to prevent uncommitted changes from interfering with deterministic finish paths, ensuring that merges, rebases, and squashes happen predictably and safely.