finish-branch

Run tests and merge, pull request, or delete completed Git branches.

2|Updated Jul 11, 2024
One-click install
npx skills add https://github.com/nicograef/handbook --skill finish-branch-nicograef
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finish-branch
Source: https://github.com/nicograef/handbook/tree/main/.claude/skills/finish-branch
Command: npx skills add https://github.com/nicograef/handbook --skill finish-branch-nicograef

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the ambiguity and manual overhead of managing Git branches after implementation work is complete, ensuring tests are verified before any destructive or integration actions occur.

Core Features & Use Cases

  • Automated Verification: Enforces mandatory test suite execution before allowing any branch operations.
  • Context-Aware Integration: Handles complex Git environments, including linked worktrees and default branch detection.
  • Use Case: After finishing a feature, use this Skill to automatically run tests, merge the code into the correct base branch, or clean up the workspace if the work is discarded.

Quick Start

Invoke the finish-branch skill to evaluate the current branch and proceed with the appropriate integration or cleanup workflow.

Frequently Asked Questions about finish-branch

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

FAQPage Schema
How do I automate git branch cleanup after merging a feature?

Automating git branch cleanup after merging involves enforcing test verification before executing structured integration or deletion operations within local repositories. This safely integrates or removes finished branches without manual overhead.

Can I run tests automatically before merging a Git branch?

Yes, you can run tests automatically before merging a Git branch by using a workflow that enforces mandatory test suite execution prior to allowing any branch integration or cleanup actions. This prevents unverified code from being merged.

How do you manage Git branch integration across linked worktrees?

Managing Git branch integration across linked worktrees requires detecting the default branch and handling complex local environments to perform merges, pull requests, or deletions. This context-aware approach ensures correct integration paths.

Do I need the GitHub CLI to manage remote branch deletions and pull requests?

Yes, you need the GitHub CLI to manage remote branch deletions and pull requests. Standard Git CLI tools are also required to handle local repository workflows and worktree integration operations.

What is the best way to ensure tests pass before integrating a Git branch?

The best way to ensure tests pass before integrating a Git branch is to implement an automated verification step that mandates test suite execution before any destructive or integration actions are permitted on the branch.

How do I clean up discarded feature branches in my local workspace?

To clean up discarded feature branches in your local workspace, invoke a workflow that evaluates the current branch state and proceeds with the appropriate cleanup deletion, ensuring tests are verified beforehand if integration was initially considered.