finishing-a-development-branch

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

Updated Jan 12, 2025
One-click install
npx skills add https://github.com/rinbarpen/NeuroTrain --skill finishing-a-development-branch-rinbarpen
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/rinbarpen/NeuroTrain/tree/main/.cursor/commands/finishing-a-development-branch
Command: npx skills add https://github.com/rinbarpen/NeuroTrain --skill finishing-a-development-branch-rinbarpen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When implementation work is done, developers often face ambiguity about how to integrate their branch—risking broken merges, forgotten worktrees, or accidentally discarded work. This Skill enforces a disciplined completion workflow that verifies tests first and presents clear integration choices. ## Core Features & Use Cases - Test Gate Before Integration: Runs the project's test suite and blocks any merge or PR until all tests pass, preventing broken code from reaching the base branch. - Four Structured Options: Presents exactly four choices—merge locally, push and create a Pull Request via gh, keep the branch as-is, or discard with typed confirmation. - Worktree Cleanup: Automatically removes git worktrees for merged or discarded branches while preserving them when a PR or keep-as-is option is chosen. - Use Case: After finishing a feature branch in a git worktree, invoke this Skill to verify tests pass, create a Pull Request with a summary and test plan, and clean up the worktree in one guided flow. ## Quick Start Use the finishing-a-development-branch skill to complete my current feature branch and help me decide how to integrate 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 it. The Skill executes the chosen git commands and handles 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 body automatically after tests pass.

What happens if tests fail before merging a branch?▼

The workflow stops immediately and reports the failing tests. No merge, push, or PR options are presented until all tests pass, preventing broken code from reaching the base branch.

Does this workflow clean up git worktrees automatically?▼

Worktrees are removed only after a local merge or a confirmed discard. For pull requests and keep-as-is choices, the worktree is preserved so the branch remains accessible for review or later work.

Can I accidentally delete a branch with unmerged work?▼

No. Discarding requires typing the exact word 'discard' after reviewing the branch name, commit list, and worktree path that will be permanently deleted. Without this confirmation, nothing is removed.