finishing-a-development-branch

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

Updated Dec 19, 2024
One-click install
npx skills add https://github.com/DNepovim/yadm --skill finishing-a-development-branch-dnepovim
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/DNepovim/yadm/tree/main/.claude/plugins/cache/claude-plugins-official/superpowers/5.0.6/skills/finishing-a-development-branch
Command: npx skills add https://github.com/DNepovim/yadm --skill finishing-a-development-branch-dnepovim

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When implementation work is done, developers often face ambiguity about how to integrate the branch—risking broken merges, forgotten worktrees, or accidentally deleted work. This Skill enforces a safe, structured completion workflow. ## Core Features & Use Cases - Test Gate Before Integration: Verifies the project's test suite passes before offering any merge or PR options, stopping the process if failures exist. - 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 Discard and Worktree Cleanup: Requires typed 'discard' confirmation before deleting branches, and cleans up git worktrees only for merge and discard paths. - Use Case: After finishing a feature branch with all tests green, invoke this Skill to decide between merging to main locally or opening a GitHub pull request via gh pr create, with automatic worktree cleanup afterward. ## Quick Start Ask the assistant to finish the current development branch and present the integration options after verifying tests pass.

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?▼

Verify the test suite passes first, then choose between merging locally into the base branch, pushing and creating a pull request, keeping the branch, or discarding it. Each option runs the corresponding git commands and handles worktree cleanup appropriately.

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 worktree is preserved so the PR can be iterated on.

What happens if tests fail before merging a branch?▼

The process stops immediately and reports the number of failing tests. No merge or pull request options are presented until the failures are fixed and the test suite passes.

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 need changes.

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

The discard path lists the branch, all its commits, and the worktree path, then requires typing 'discard' as explicit confirmation before running git branch -D. This prevents accidental deletion of unmerged work.