finishing-a-development-branch

Guides completion of development branches through structured merge, pull request, or cleanup options.

Updated Aug 5, 2026
One-click install
npx skills add https://github.com/pd-phuc/laravel-template --skill finishing-a-development-branch-pd-phuc
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/pd-phuc/laravel-template/tree/main/.claude/skills/finishing-a-development-branch
Command: npx skills add https://github.com/pd-phuc/laravel-template --skill finishing-a-development-branch-pd-phuc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When implementation work is done, developers often merge broken code, forget to verify tests, or leave stale branches and worktrees behind. This Skill enforces a disciplined finish: verify tests first, then choose exactly one of four integration paths. ## Core Features & Use Cases - Test Gate: Runs the project's test suite before any merge or PR and blocks completion if tests fail. - Four Structured Options: Merge locally to the base branch, push and create a GitHub PR via gh pr create, keep the branch as-is, or discard the work with typed confirmation. - Worktree Cleanup: Detects and removes git worktrees for merged or discarded branches while preserving them when the branch is kept. - Use Case: After finishing a feature branch with all tests passing, the Skill presents the four options, creates a PR with a summary and test plan template, and cleans up the worktree automatically. ## Quick Start Ask the AI to finish the current development branch and present the merge, pull request, keep, or discard options.

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 finish a git feature branch after implementation is complete?▼

First verify the test suite passes, then choose one of four options: merge locally to the base branch, push and create a pull request, keep the branch as-is, or discard it. The Skill walks through each path including worktree cleanup.

How to create a GitHub pull request from a feature branch?▼

Push the branch with git push -u origin, then run gh pr create with a title and body containing a summary of changes and a test plan checklist. The Skill generates this PR template automatically after tests pass.

Can I merge a branch when tests are failing?▼

No. The Skill blocks all completion options when tests fail and shows the failures instead. You must fix the failing tests before any merge, pull request, or cleanup step can proceed.

When should I clean up a git worktree after finishing a branch?▼

Remove the worktree only after merging locally or discarding the branch. Keep it when creating a pull request or keeping the branch as-is, since the work may still be needed for review feedback or later continuation.

How do I safely delete a git branch without losing work?▼

The discard option requires typing 'discard' to confirm before running git branch -D. It first shows exactly what will be deleted, including the branch name, all commits, and the worktree path, preventing accidental data loss.