finishing-a-development-branch

Complete Git feature branch workflows with pre-integration test verification.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the risk and inconsistency of manually finishing development branches, preventing broken code from being merged, accidental work loss, and messy Git workspace states after feature completion.

Core Features & Use Cases

  • Pre-integration test enforcement: Automatically checks that all tests pass before allowing any merge, PR, or discard operations to avoid shipping broken code.
  • Environment-aware workflow guidance: Detects if you are in a standard repository, named branch worktree, or detached HEAD state to present only the relevant, safe options for your context.
  • Safe cleanup logic: Handles worktree removal and branch deletion only when appropriate, with guardrails to avoid deleting work owned by external tools or losing unmerged changes.
  • Use Case: After completing a new payment processing feature branch, use this Skill to safely merge the work to main, create a PR for team review, preserve the branch for later work, or discard the experimental changes, all while following Git best practices.

Quick Start

Use the finishing-a-development-branch skill to complete your current feature branch workflow after verifying all tests pass.

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 without losing uncommitted work?

Safely merge a Git feature branch by enforcing mandatory pre-integration test verification and applying environment-aware workflow guidance to prevent losing uncommitted work during local merge operations.

What is the best way to clean up Git worktrees after completing a development branch?

The best way to clean up Git worktrees is to apply safe cleanup logic that removes worktrees and deletes branches only when appropriate, using guardrails to avoid deleting work owned by external tools or losing unmerged changes.

How do I create a pull request from a feature branch after verifying tests?

Create a pull request from a feature branch by using a post-implementation workflow that enforces mandatory pre-integration test verification before presenting environment-aware options for PR creation and branch preservation.

How does branch completion handle detached HEAD states in Git?

Branch completion handles detached HEAD states in Git by detecting the environment and presenting only relevant, safe options for that context, preventing common Git errors and accidental data loss during workflow operations.

Can I discard an experimental Git branch without accidentally deleting unmerged changes?

Yes, you can discard an experimental Git branch safely because the workflow applies safe cleanup logic with strict guardrails that prevent deletion operations when unmerged changes are detected in the repository.