finishing-a-development-branch

Verify test readiness and guide final git branch integration decisions.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you complete a finished development branch safely by checking whether the work is ready, identifying the repository state, and guiding the final integration choice.

Core Features & Use Cases

  • Test Verification: Confirms the codebase passes tests before any merge or handoff.
  • Environment Detection: Distinguishes between normal repositories, named worktrees, and detached HEAD sessions.
  • Completion Workflow: Presents the right next step for merging locally, opening a pull request, keeping the branch, or discarding the work.
  • Safe Cleanup: Removes branches and worktrees only when appropriate, with confirmation and provenance-aware cleanup.
  • Use Case: A developer finishes a feature, and the Skill checks the branch state, validates the result, and walks them through the safest way to merge or publish it.

Quick Start

Ask the assistant to finish the development branch by verifying tests, detecting the git workspace state, and presenting the correct merge, pull request, keep, or discard option.

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 finish a git branch and decide whether to merge or create a pull request?

To finish a git branch safely, verify tests pass, detect the base branch, inspect the workspace state, and choose between local merge, pull request creation, branch retention, or discard.

How does git worktree cleanup work when finishing a development branch?

Git worktree cleanup during branch finishing uses provenance-aware checks to remove named worktrees only when appropriate, requiring explicit confirmation before deleting the worktree and its associated branch.

Can I merge a git branch or create a pull request from a detached HEAD session?

Yes, you can finish work from a detached HEAD session. The workflow detects the detached state, inspects the workspace, and guides you through safe integration or discard options.

What is the best way to verify test readiness before opening a pull request?

The best way to verify test readiness before a pull request is to run the test suite, inspect the git workspace state, and confirm the base branch before proceeding with the final integration decision.

When should I keep a branch instead of discarding it after merging?

You should keep a branch instead of discarding it when the completion workflow determines retention is appropriate, skipping provenance-aware cleanup and preserving the branch reference in the repository.

Do I need to detect the base branch before cleaning up a git worktree?

Yes, base-branch detection is required before cleanup. It identifies the integration target, ensures the workspace state is stable, and enables safe, provenance-aware removal of branches and worktrees.