finishing-a-development-branch

Guide merge, PR, or cleanup decisions after verifying tests in Git workflows.

Updated Jun 20, 2026
One-click install
npx skills add https://github.com/lowmason/agent-skills --skill finishing-a-development-branch-lowmason
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/lowmason/agent-skills/tree/main/finishing-a-development-branch
Command: npx skills add https://github.com/lowmason/agent-skills --skill finishing-a-development-branch-lowmason

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides teams to complete development work by validating tests, assessing repository state, and presenting deterministic options for merging, creating a PR, or cleaning up, reducing guesswork and risk.

Core Features & Use Cases

  • Verify tests before progressing to any merge or cleanup, ensuring code quality.
  • Detect repository environment (normal repo, named worktree, or detached HEAD) to tailor the workflow and cleanup steps.
  • Present a concise, choice-based workflow with four options (merge locally, push PR, keep as-is, or discard) and perform the corresponding actions with safe cleanups.
  • Automatically cleanup worktrees when needed and perform a provenance-safe deletion of branches, if chosen.
  • Handle edge cases like detached HEAD scenarios gracefully and provide clear user feedback.

Quick Start

Run the finishing-a-development-branch skill after your test suite passes to guide the finalization of your feature branch by selecting an 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 merge a feature branch after tests pass?

To safely merge a feature branch after tests pass, this skill verifies your test suite, detects your repository environment, and presents deterministic options for merging, creating a PR, or cleaning up while ensuring provenance-safe branch deletion.

How do I clean up a git worktree after finishing development?

To clean up a git worktree after finishing development, this skill detects named worktrees and automatically performs cleanup steps alongside your chosen merge or discard action, safely removing the worktree and executing provenance-safe branch deletions.

What is the best workflow for finalizing a detached HEAD state in git?

The best workflow for finalizing a detached HEAD state in git involves detecting the environment and adapting options. This skill gracefully handles detached HEAD scenarios, offering tailored choices to merge, push a PR, keep as-is, or discard with clear feedback.

Can I automate branch deletion and PR creation in one step?

Yes, you can automate branch deletion and PR creation in one step by selecting the push PR or discard options. This skill executes your chosen workflow and performs provenance-safe deletion of branches automatically after the action completes.

Does this merge workflow require a normal git branch or can it handle worktrees?

This merge workflow does not require a normal git branch; it explicitly handles named worktrees and detached HEAD states. It detects your repository environment to tailor the finalization options and adapt the cleanup accordingly.