finishing-branch

Finalize Git feature branches with test verification and structured merge options.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides the completion of development work by verifying tests, selecting a proper base branch, and presenting fixed options to finalize merging, creating a clear path for merge, PR, or cleanup.

Core Features & Use Cases

  • Test verification: Ensure the codebase passes all tests before closing the work.
  • Base-branch determination: Detects whether HEAD originated from main, master, or another base.
  • Structured options: Presents four concise choices for merging, PR creation, keeping the branch, or discarding.
  • Post-work cleanup: Automatically cleans up local or remote worktrees following the chosen path.

Quick Start

Use the finishing-branch skill to finalize the current feature after all tests pass, then choose one of the four options to complete the workflow.

Frequently Asked Questions about finishing-branch

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

FAQPage Schema
How do I automate finishing a Git feature branch with test verification and merges?▼

You can automate finishing a Git feature branch by running a workflow that verifies tests, detects the base branch, and presents structured options to merge locally, push a PR, keep the branch, or discard changes.

What is the best way to finalize a feature branch after all tests pass?▼

The best way to finalize a feature branch is to use a structured finish workflow that automatically detects the base branch and offers four explicit paths: local merge, PR creation, keeping the branch, or discarding changes.

Does this branch finalization process automatically detect whether my base branch is main or master?▼

Yes, the branch finalization process automatically detects whether your current HEAD originated from main, master, or another base branch to determine the correct target for merging or PR creation.

Can I use the GitHub CLI to create a pull request when finalizing my Git branch?▼

Yes, you can use the optional GitHub CLI to create a pull request. The workflow presents a specific option to push a PR directly when you are ready to finalize your development branch.

How does the workflow handle post-merge cleanup for local and remote worktrees?▼

The workflow handles post-merge cleanup by automatically cleaning up local or remote worktrees following your chosen finalization path, whether you merged locally, pushed a PR, or discarded changes.

Do I need a clean repository state before starting the branch finishing workflow?▼

Yes, you need a clean repository state before starting. The branch finishing workflow requires standard Git tooling and a clean working directory to accurately determine the base branch and perform safe cleanup.