finishing-a-development-branch

Run tests and present merge, pull request, keep, or discard options for a development branch.

358|11|Updated May 15, 2026
One-click install
npx skills add https://github.com/getcrew44/crew44 --skill finishing-a-development-branch-getcrew44
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/getcrew44/crew44/tree/main/daemon/internal/presets/defaultcrew/skills/coding/finishing-a-development-branch
Command: npx skills add https://github.com/getcrew44/crew44 --skill finishing-a-development-branch-getcrew44

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents broken or premature integration by verifying tests and then guiding you through the safest merge, PR, or cleanup path for a completed development branch.

Core Features & Use Cases

  • Test-first completion: Runs the project’s test suite before offering any integration options.
  • Environment-aware merge flow: Detects whether you’re in a normal repo, a worktree, or a detached HEAD to present the correct set of actions.
  • Safe workspace cleanup: Removes worktrees only when they were created by the harness (for merge or discard), while preserving them for PR iteration.
  • Guardrails for destructive actions: Requires typed confirmation before permanently discarding a branch and its commits.

Quick Start

Use it when a feature implementation is complete and tests pass: Ask an AI agent to apply the finishing-a-development-branch skill to decide whether to merge locally, open a PR, keep the branch, or discard it.

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 into the main codebase?

Finishing a development branch requires running the project's test suite before presenting integration choices like local merge, pull request, keeping for iteration, or discarding with typed confirmation.

What is the best way to handle a detached HEAD state when finishing a git branch?

When finishing a development branch in a detached HEAD state, the workflow detects the git environment and base branch to offer correct merge, pull request, or discard options.

Can I clean up a git worktree automatically after merging a branch?

Worktree cleanup after branch finishing removes worktrees created by the harness for merge or discard, while preserving worktrees for pull request iteration to support continued development.

How do I prevent accidentally deleting commits when discarding a git branch?

Preventing accidental deletion when discarding a branch requires typed confirmation before permanently removing the branch and its commits, enforcing safe guardrails for destructive actions.

Does the branch finishing workflow run tests before allowing a pull request?

The branch finishing workflow enforces test-first completion by running the project's test suite before offering any integration options such as opening a pull request, merging locally, or discarding.

When should I keep a development branch instead of merging it immediately?

You should keep a development branch for later iteration when opening a pull request, preserving the worktree and commits rather than merging locally or discarding them immediately.