finishing-a-development-branch

Guides branch completion by verifying tests and executing merge, PR, keep, or discard options.

1|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/tottenjordan/me-skittles --skill finishing-a-development-branch-tottenjordan
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/tottenjordan/me-skittles/tree/main/gemini/finishing-a-development-branch
Command: npx skills add https://github.com/tottenjordan/me-skittles --skill finishing-a-development-branch-tottenjordan

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 pass, then present exactly four structured options and execute the chosen one safely. ## Core Features & Use Cases - Test Gate: Runs the project's test suite and lint checks before any merge or PR, stopping immediately if anything fails. - Structured Options: Presents exactly four choices — merge locally, push and create a PR, keep the branch as-is, or discard the work — with no ambiguity. - Safe Cleanup: Handles git worktree removal only when appropriate and requires typed confirmation before discarding work. - Use Case: After finishing a feature branch with all tests green, invoke this Skill to decide between merging to main locally or opening a pull request, then automatically clean up the branch and worktree. ## 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 full test suite and lint checks pass, then choose between merging locally, creating a pull request, keeping the branch, or discarding it. This Skill walks through each option and handles branch deletion and worktree cleanup.

How to create a pull request from a feature branch with gh CLI?▼

Push the branch with git push -u origin, then run gh pr create with a title and body containing a summary and test plan. Only push or open a PR when the user has explicitly requested it.

Should I merge a branch when tests are failing?▼

No. Failing tests block all completion options — the failures must be fixed first. Merging broken code or opening a failing PR creates downstream problems for reviewers and CI.

When should git worktree cleanup happen after merging?▼

Remove the worktree only after a local merge or a confirmed discard, using git worktree remove. Keep the worktree when creating a PR or keeping the branch as-is, since the work may still be needed.

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

Require explicit typed confirmation of 'discard' after showing the branch name, commit list, and worktree path that will be deleted. Then force-delete the branch with git branch -D and remove the worktree.