finishing-a-development-branch

Verify tests and complete a development branch via merge, pull request, keep, or discard.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps finish completed development work without guesswork by verifying readiness, then guiding the next integration step so teams avoid premature merges, unclear handoffs, and unsafe cleanup.

Core Features & Use Cases

  • Test Gatekeeping: Confirms the project test suite passes before any completion action is offered.
  • Branch Integration Choices: Presents a fixed set of outcomes for local merge, pull request creation, preserving the branch, or discarding work.
  • Safe Cleanup: Handles branch deletion and worktree cleanup only when appropriate, with explicit confirmation for destructive actions.
  • Use Case: A developer has finished a feature branch and needs a structured, low-risk way to merge it, open a PR, keep it for later, or discard it cleanly.

Quick Start

Use the finishing-a-development-branch skill to verify the tests, show the four completion options, and carry out the choice I make.

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 merge it after tests pass?

To safely finish a git branch, verify the test suite passes first, then choose to merge locally, open a GitHub pull request, preserve the branch, or discard it. Controlled worktree cleanup follows with explicit confirmation for destructive actions.

What is the best way to handle worktree cleanup after completing a feature branch?

Worktree cleanup after completing a feature branch requires explicit confirmation before any destructive actions occur. Safe git operations ensure branch deletion and worktree removal happen only when appropriate, preventing accidental loss of unmerged work.

Can I create a GitHub pull request from a local development branch without manual steps?

Yes, creating a GitHub pull request from a local development branch is one of the fixed integration choices presented after test validation. The workflow detects the base branch and guides the pull request creation as part of the branch handoff.

How do I discard a finished feature branch safely without affecting the base branch?

To discard a finished feature branch safely, select the discard option from the presented integration choices after tests run. The workflow isolates the destructive deletion and worktree cleanup, requiring explicit confirmation before removing the branch.

Does merging a development branch require test validation before offering integration options?

Yes, test validation is required before any branch integration options are offered. The test suite must pass to ensure branch readiness, preventing premature merges and unclear handoffs before presenting the choice to merge, pull request, keep, or discard.

Why should I use a structured workflow to complete a feature branch instead of standard git commands?

A structured workflow to complete a feature branch prevents unsafe cleanup and guesswork by enforcing test validation, detecting the base branch, and presenting fixed integration choices. Standard git commands lack built-in safeguards against premature merges and accidental worktree deletion.