Branch completion workflow - guides merge/PR/cleanup decisions after implementation is verified complete.
Guides developers through structured branch completion workflows with test verification and cleanup options.
npx claudepluginhub lerianstudio/ringThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Guide completion of development work by presenting clear options and handling chosen workflow.
Core principle: Verify tests → Present options → Execute choice → Clean up.
Announce at start: "I'm using the finishing-a-development-branch skill to complete this work."
Run npm test / cargo test / pytest / go test ./... If tests fail: Show failures, stop. Cannot proceed until tests pass.
git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null
Present exactly these 4 options (no explanation):
| Option | Commands |
|---|---|
| 1. Merge Locally | git checkout <base> → git pull → git merge <feature> → verify tests → git branch -d <feature> → Cleanup worktree |
| 2. Create PR | git push -u origin <feature> → gh pr create --title "..." --body "## Summary..." → Cleanup worktree |
| 3. Keep As-Is | Report: "Keeping branch <name>. Worktree preserved at <path>." Don't cleanup. |
| 4. Discard | Confirm first: "Type 'discard' to confirm." → git checkout <base> → git branch -D <feature> → Cleanup worktree |
Options 1, 2, 4: git worktree list | grep $(git branch --show-current) → if in worktree: git worktree remove <path>
Option 3: Keep worktree.
| Option | Merge | Push | Keep Worktree | Cleanup Branch |
|---|---|---|---|---|
| 1. Merge locally | ✓ | - | - | ✓ |
| 2. Create PR | - | ✓ | ✓ | - |
| 3. Keep as-is | - | - | ✓ | - |
| 4. Discard | - | - | - | ✓ (force) |
| Mistake | Problem | Fix |
|---|---|---|
| Skipping test verification | Merge broken code, create failing PR | Always verify tests before offering options |
| Open-ended questions | "What should I do next?" → ambiguous | Present exactly 4 structured options |
| Automatic worktree cleanup | Remove worktree when might need it | Only cleanup for Options 1 and 4 |
| No confirmation for discard | Accidentally delete work | Require typed "discard" confirmation |
Never:
Always:
Called by:
Pairs with:
STOP and report if:
| Decision Type | Blocker Condition | Required Action |
|---|---|---|
| Test Verification | Tests fail or test command not found | STOP and report - CANNOT proceed until tests pass |
| Base Branch | Cannot determine base branch (main or master) | STOP and ask user which branch to merge into |
| Git State | Uncommitted changes exist in working directory | STOP and report - MUST commit or stash changes first |
| Merge Conflict | Git merge results in conflicts | STOP and report conflicts - user MUST resolve |
The following requirements CANNOT be waived:
| Severity | Condition | Required Action |
|---|---|---|
| CRITICAL | Tests failing in feature branch | MUST fix tests before any merge/PR option |
| HIGH | Merge to base branch introduces test failures | MUST abort merge and report - tests must pass post-merge |
| MEDIUM | Worktree cleanup fails after successful merge | Should report warning but consider completion successful |
| LOW | Branch deletion fails after merge | Fix in next iteration - code is already merged |
| User Says | Your Response |
|---|---|
| "Just merge it, I'll fix the tests later" | "CANNOT proceed with failing tests. Tests MUST pass before offering merge options. This prevents broken code from reaching the base branch." |
| "Skip the test verification, I know it works" | "I MUST run test verification. 'Knowing it works' is not evidence - actual test output is required before proceeding." |
| "Delete the branch without confirmation" | "CANNOT delete work without typed 'discard' confirmation. Type 'discard' to confirm you want to permanently delete this branch." |
| Rationalization | Why It's WRONG | Required Action |
|---|---|---|
| "Tests were passing earlier, skip verification" | Tests can break between commits. Current state must be verified, not assumed. | MUST run tests before offering options |
| "User is experienced, skip the 4-option prompt" | Structured options prevent mistakes. User experience doesn't justify skipping workflow. | MUST present exactly 4 options |
| "Small change, discard confirmation is overkill" | Size doesn't determine value. Any work deserves explicit discard confirmation. | MUST require typed 'discard' for Option 4 |
| "Worktree cleanup failed but merge succeeded" | Cleanup failure leaves orphan state. Report it even if merge completed. | MUST report cleanup failures |
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.