Guides completion of development work by verifying tests, presenting structured merge/PR/keep/discard options, and executing the chosen cleanup. Use when implementation is complete and tests pass, when wrapping up a feature branch, or when deciding how to land or discard work.
How this skill is triggered — by the user, by Claude, or both
Slash command
/jagreehal-claude-skills:branch-completionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Close out finished work cleanly: verify tests, present a fixed set of options, execute the choice, and clean up. The core principle is one rule: **no completion without test verification first.** Tests are the gate: never present completion options or merge anything while tests are failing.
Close out finished work cleanly: verify tests, present a fixed set of options, execute the choice, and clean up. The core principle is one rule: no completion without test verification first. Tests are the gate: never present completion options or merge anything while tests are failing.
Structured options matter because "what should I do now?" is a vague prompt that invites mistakes. Four explicit choices (merge locally, open a PR, keep as-is, or discard) make the decision concrete and reversible, and tie each to a known cleanup path.
When NOT to use: Mid-implementation, or when tests have not yet been written or run. Finish and verify the work first.
Related: verification-before-completion (tests must pass before this skill runs), git-worktrees (cleans up the worktree created there), implementation-planning (completes the planned work).
Before presenting any options:
npm test # or cargo test / pytest / go test ./...
If tests fail, stop here:
Tests failing (N failures). Must fix before completing:
[Show failures]
Cannot proceed with merge/PR until tests pass.
Do not proceed to Step 2.
If tests pass: continue.
Present exactly these four options:
Implementation complete. What would you like to do?
1. Merge back to <base-branch> locally
2. Push and create a Pull Request
3. Keep the branch as-is (handle later)
4. Discard this work
Which option?
git checkout <base-branch>
git pull
git merge <feature-branch>
npm test # verify tests on the merged result
git branch -d <feature-branch>
Then clean up the worktree (Step 4).
git push -u origin <feature-branch>
gh pr create --title "<title>" --body "$(cat <<'EOF'
## Summary
- [Changes]
## Test Plan
- [ ] [Verification steps]
EOF
)"
Keep the worktree for PR iteration. Report the PR URL.
Report: "Keeping branch . Worktree preserved at ." Do not clean up the worktree.
Confirm first:
This will permanently delete:
- Branch <name>
- All commits: <commit-list>
- Worktree at <path>
Type 'discard' to confirm.
Wait for the exact word. If confirmed:
git checkout <base-branch>
git branch -D <feature-branch>
Then clean up the worktree.
For Options 1, 2, and 4:
git worktree remove <worktree-path>
For Option 3: keep the worktree.
| Option | Merge | Push | Keep Worktree | Cleanup Branch |
|---|---|---|---|---|
| 1. Merge locally | ✓ | — | — | ✓ |
| 2. Create PR | — | ✓ | ✓ | — |
| 3. Keep as-is | — | — | ✓ | — |
| 4. Discard | — | — | — | ✓ (force) |
Before presenting options:
After executing the choice:
npx claudepluginhub jagreehal/jagreehal-claude-skills --plugin skill-authoringProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.