finishing-a-development-branch

Guide Git feature branch completion with test verification and environment-aware options.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the guesswork and risk of errors when completing work on a Git development branch, preventing broken merges, accidental work loss, and messy repository state from inconsistent cleanup practices.

Core Features & Use Cases

  • Test Verification: Automatically checks that all project tests pass before allowing any branch completion actions, preventing broken code from being merged or pushed.
  • Environment-Aware Workflows: Detects if you're working in a normal repository, a named worktree, or a detached HEAD state to present only the relevant, safe options for your setup.
  • Safe Cleanup & Guardrails: Handles worktree cleanup only for workspaces you own, requires explicit typed confirmation before permanently discarding any work, and avoids modifying harness-managed workspaces to prevent repository corruption.
  • Use Case: A developer who just finished implementing a new patient billing feature in a feature branch can use this Skill to safely merge their tested work to the main branch, or push it as a PR for team review, without risking broken code or lost work.

Quick Start

Use the finishing-a-development-branch skill to safely complete your current feature branch after verifying all tests pass, and choose to merge it locally, push it as a pull request, keep it for later work, or discard it permanently.

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 feature branch after implementation is finished?

To safely merge a Git feature branch, you should first verify all project tests pass, then choose to merge locally, push as a pull request, keep it, or discard it based on your integration workflow requirements.

How does Git branch cleanup work when using named worktrees?

Git worktree cleanup uses provenance-based tracking to only clean up workspaces you own, preventing repository corruption and avoiding modifications to harness-managed workspaces during branch completion.

Can I discard a development branch permanently without losing uncommitted work?

You can discard a development branch permanently, but the process requires explicit typed confirmation before deletion to prevent accidental data loss and ensure the discard is intentional.

Does Git branch completion work in a detached HEAD state?

Git branch completion is environment-aware and detects detached HEAD states to present only safe, relevant options for your specific setup, preventing broken merges and repository damage.

What is the best way to prevent broken code from being merged in a pull request?

The best way to prevent broken code merges is to enforce pre-action test verification, automatically checking that all project tests pass before allowing any branch completion or pull request actions.

When should I avoid automatic worktree cleanup during branch management?

You should avoid automatic worktree cleanup for harness-managed workspaces, as modifying them can cause repository corruption, and only clean up provenance-tracked workspaces you explicitly own.