From rpikit
Guides finishing implementation work after tests pass: verifies full suite, presents git options (local merge, PR creation, defer, discard), executes chosen workflow.
npx claudepluginhub bostonaholic/rpikit --plugin rpikitThis skill uses the workspace's default tool permissions.
Verify tests, present options, execute chosen workflow, clean up.
Verifies tests pass on completed feature branch, presents options to merge locally, create GitHub PR, keep as-is or discard; executes choice and cleans up worktree.
Verifies tests pass on completed dev branch, then presents options to merge locally, create GitHub PR, keep as-is, or discard; executes choice and cleans up worktree.
Finishes development branches: verifies tests pass, presents options for local merge, push and GitHub PR, keep as-is, or discard; executes git commands and cleans up worktrees.
Share bugs, ideas, or general feedback.
Verify tests, present options, execute chosen workflow, clean up.
Implementation without proper completion leaves work in limbo. This skill provides structured options for finishing work: merge locally, create PR, defer for later, or discard. Each option has specific procedures and cleanup requirements.
Before using this skill, verify:
Do not proceed with failing tests. Fix them first.
Run the full test suite:
Run: [project test command]
Verify: Exit code 0, all tests pass
If tests fail: Stop. Do not proceed until tests pass.
Determine the target branch for integration:
Common targets:
- main (most common)
- master (legacy naming)
- develop (gitflow)
- [feature-branch] (nested features)
Check git configuration or ask if unclear.
Present exactly four options without elaboration:
Use AskUserQuestion to get user's choice.
1. Checkout base branch
git checkout [base-branch]
2. Pull latest changes
git pull origin [base-branch]
3. Merge feature branch
git merge [feature-branch]
4. Run tests on merged result
[project test command]
5. If tests pass, push
git push origin [base-branch]
6. Delete feature branch
git branch -d [feature-branch]
git push origin --delete [feature-branch]
Never merge without verifying tests pass on the result.
1. Push feature branch
git push -u origin [feature-branch]
2. Create PR using gh CLI
gh pr create --title "[title]" --body "[description]"
3. Report PR URL to user
4. Keep branch active for PR review
Do NOT delete the branch after creating PR.
1. Commit any uncommitted changes
git add -A && git commit -m "WIP: [description]"
2. Push to remote (backup)
git push -u origin [feature-branch]
3. Note current state for later
- Branch name
- What's done
- What remains
Do NOT delete the branch.
1. Confirm with user (require typed confirmation)
"Type 'DISCARD' to confirm deletion of all changes"
2. If confirmed:
git checkout [base-branch]
git branch -D [feature-branch]
git push origin --delete [feature-branch] (if pushed)
3. Clean up any worktree if applicable
Require explicit confirmation. This is destructive.
Cleanup depends on the chosen option:
| Option | Cleanup Action |
|---|---|
| Merge locally | Delete feature branch, remove worktree if used |
| Create PR | Keep branch, keep worktree if used |
| Keep for later | Keep branch, keep worktree if used |
| Discard work | Delete branch, remove worktree if used |
If work was done in a git worktree:
1. Exit the worktree directory
cd [main-repository]
2. Remove the worktree
git worktree remove [worktree-path]
3. Verify removal
git worktree list
Only remove worktree for merge (Option 1) and discard (Option 4).
This skill is the natural endpoint of the implement phase:
Implementation complete
→ Code review passed
→ Security review passed
→ Use finishing-work skill
→ Choose completion option
→ Execute and clean up
If tests fail after merge:
1. Do NOT push
2. Reset the merge: git merge --abort
3. Investigate failures
4. Fix before attempting merge again
Avoid: git push --force origin main
This rewrites history and breaks collaborators.
If needed, use: git push --force-with-lease
This fails if remote has new commits.
Discard is permanent. Require typed confirmation:
"Type 'DISCARD' to confirm"
Do not accept:
- "yes"
- "y"
- "confirm"
Only exact match: "DISCARD"
After completing the chosen option, report:
Option 1 (Merge):
"Merged [feature-branch] to [base-branch].
Branch deleted. [N] commits integrated."
Option 2 (PR):
"Pull request created: [PR-URL]
Branch [feature-branch] pushed to origin."
Option 3 (Keep):
"Branch [feature-branch] saved for later.
Pushed to origin as backup."
Option 4 (Discard):
"Branch [feature-branch] deleted.
All changes discarded."
Wrong: Merge and hope tests pass Right: Run tests, then merge only if passing
Wrong: Finish work, forget to clean up branches Right: Execute appropriate cleanup for chosen option
Wrong: Delete branch immediately when user says "discard" Right: Require explicit "DISCARD" confirmation
Wrong: Merge without code review Right: Complete review process before finishing
Wrong: Force push to fix mistakes Right: Use safe alternatives or coordinate with team