finishing-a-development-branch

Verify tests and present merge, PR, keep, or discard options for Git branches.

2|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/miptah21/skills --skill finishing-a-development-branch-miptah21
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/miptah21/skills/tree/main/.agents/skills/finishing-a-development-branch
Command: npx skills add https://github.com/miptah21/skills --skill finishing-a-development-branch-miptah21

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents broken or incomplete development work from being merged or left in an unsafe state by enforcing test verification and guiding the safest next action.

Core Features & Use Cases

  • Test-first completion: Verifies the project’s test suite before offering any merge/PR options.
  • Environment-aware decisioning: Detects whether the workspace is a normal repo, a named worktree, or a detached HEAD, and presents exactly the appropriate options.
  • Safe cleanup and deletion rules: Cleans up only for merge/discard, uses provenance checks for worktree ownership, and requires typed confirmation before permanent deletion.
  • Use Case: You’ve implemented a feature and want the agent to either merge back, open a PR with a correct template, or safely discard the work without harming other worktrees.

Quick Start

Use the finishing-a-development-branch skill after your implementation is done and tests have been run, so it can ask you how to merge, open a PR, keep the branch, or discard it safely.

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 git development branch back to the main branch?

To safely merge a git development branch, you need to verify tests pass first, then select the correct base branch for integration. This process ensures release readiness by gating the merge behind test verification and environment detection to prevent unsafe states.

What is the best way to clean up a named worktree after merging a feature branch?

The best way to clean up a named worktree after merging is using provenance checks for worktree ownership and conditional cleanup rules. Worktree cleanup only triggers for merge or discard actions, requiring typed confirmation before any permanent branch or commit deletion occurs.

Can I open a pull request from a detached HEAD state in git?

Yes, you can open a pull request from a detached HEAD state. The environment-aware decisioning detects detached HEAD, normal repositories, and named worktrees, presenting the appropriate PR options with correct templates while ensuring safe integration decisions without accidental branch deletion.

How do I discard git branch changes without harming other worktrees?

To discard git branch changes without harming other worktrees, the discard process uses worktree provenance checks and requires typed confirmation. This ensures conditional cleanup only affects the target branch, preventing accidental deletion of commits or branches shared across other active worktrees.

Does branch workflow automation require test verification before allowing a merge?

Yes, branch workflow automation requires test verification before offering any merge or PR options. This test-first completion approach prevents broken or incomplete development work from being merged by enforcing the project's test suite as a precondition for safe integration.