finishing-a-development-branch

Guides completion of development branches through merge, pull request, keep, or discard options.

Updated Jun 8, 2026
One-click install
npx skills add https://github.com/Avistian/nba --skill finishing-a-development-branch-avistian
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/Avistian/nba/tree/main/.cursor/skills/finishing-a-development-branch
Command: npx skills add https://github.com/Avistian/nba --skill finishing-a-development-branch-avistian

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When implementation work is done, developers often face an ambiguous decision about how to integrate the branch, risking broken merges, forgotten worktrees, or accidentally deleted work. This Skill structures the end-of-branch workflow so tests are verified first and every integration path is handled safely. ## Core Features & Use Cases - Test Gate Before Integration: 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 git workflow. - Safe Cleanup and Discard Protection: Requires typed confirmation before deleting branches and cleans up git worktrees only for the appropriate options. - Use Case: After finishing a feature branch in a git worktree, invoke this Skill to verify tests, create a pull request with a summary and test plan via gh pr create, and remove the worktree. ## Quick Start Ask the assistant to finish the current development branch and choose whether to merge it, open a pull request, keep it, or discard it.

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 development branch after implementation is complete?▼

First verify the project's test suite passes, then choose one of four options: merge locally into the base branch, push and create a pull request, keep the branch as-is, or discard the work. The chosen git workflow is executed and the worktree is cleaned up when appropriate.

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 a body containing a summary of changes and a test plan checklist. Tests should pass on the branch before the pull request is opened.

Can I merge a branch if some tests are failing?▼

No. The workflow stops when tests fail and reports the failing count, requiring fixes before any merge or pull request proceeds. Tests are also re-run on the merged result before the feature branch is deleted.

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 integration.

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

Require explicit typed confirmation of 'discard' before deletion, showing the branch name, commit list, and worktree path that will be removed. Then switch to the base branch and force-delete with git branch -D.