finishing-a-development-branch

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

Updated Feb 20, 2026
One-click install
npx skills add https://github.com/gtbauke/bj-utils --skill finishing-a-development-branch-gtbauke
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/gtbauke/bj-utils/tree/main/.agent/skills/finishing-a-development-branch
Command: npx skills add https://github.com/gtbauke/bj-utils --skill finishing-a-development-branch-gtbauke

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When implementation work is done, developers often merge broken code, forget to verify tests, or accidentally delete work. This Skill enforces a safe, structured completion workflow for Git feature branches. ## Core Features & Use Cases - Test Gate Before Completion: Runs the project's test suite and blocks any merge or PR until all tests pass. - Four Structured Options: Presents exactly four choices—merge locally, push and create a PR, keep the branch as-is, or discard the work—then executes the chosen path. - Safe Discard and Worktree Cleanup: Requires typed confirmation before deleting work and cleans up Git worktrees only when appropriate. - Use Case: After finishing a feature branch with passing tests, use this Skill to decide between merging into main locally or opening a GitHub pull request with a generated summary and test plan. ## Quick Start Use the finishing-a-development-branch skill to verify my tests and help me merge or create a PR for this completed feature branch.

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

First verify the project's test suite passes, then choose between merging locally into the base branch, pushing and creating a pull request, keeping the branch, or discarding it. Never merge or open a PR while tests are failing.

How to create a GitHub pull request from the command line?▼

Push the feature 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. Verify tests pass on the branch before creating the PR.

When should I remove a Git worktree after finishing a branch?▼

Remove the worktree only after merging locally or discarding the branch. Keep the worktree when you create a pull request or keep the branch as-is, since the work may still be needed for review changes.

What happens if tests fail before merging a branch?▼

The process stops immediately and reports the failing tests. You must fix the failures before any merge, pull request, or completion step can proceed, preventing broken code from reaching the base branch.

How do I discard a development branch without losing work accidentally?▼

Require explicit typed confirmation of the word 'discard' after showing exactly what will be deleted, including the branch name, commit list, and worktree path. Only then force-delete the branch with git branch -D.