Pr merge cleanup
Skill postmelee/hyper-waterfall/templates/locales/en/mydocs/skills/pr-merge-cleanup
A human-governed AI coding workflow that distills ephemeral session context into persistent project memory—making work traceable, reviewable, and resumable.
npx -y skills add postmelee/hyper-waterfall --skill pr-merge-cleanupAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
Apply cleanup after confirming a PR merge. Close the GitHub Issue, delete the remote publish/task{N} branch, clean up the local local/task{N} branch and separate worktree, and return to {BASE_BRANCH}. Invoke only after the PR is actually merged.
SKILL.md
2.5 KB, as published. Nobody here has run it
PR Post-merge Cleanup
Trigger
- The task requester explicitly says "cleanup after merge" or "clean up the task."
- This SKILL is invoked directly.
Preconditions
- The target PR is actually merged on GitHub:
gh pr view {number} --json state,mergeCommit. - The task requester approved Issue close, or the PR body included
closes #Nand the Issue was automatically closed.
Procedure
- Check PR and Issue state.
gh pr view {number} --json state,mergedAt,mergeCommit,headRefName gh issue view {N} --json state- If PR
state != MERGED, stop immediately and report to the task requester.
- If PR
- Close the Issue only if it was not already closed.
gh issue close {N} - Update
{BASE_BRANCH}.git fetch origin --prune git checkout {BASE_BRANCH} git pull --ff-only - Delete the remote publish branch. Skip if the branch was already deleted by PR merge with
--delete-branch.git push origin --delete publish/task{N} 2>&1 || echo "already deleted" - Remove the separate worktree if one was used.
git worktree remove ../{repo}-task{N} git worktree prune - Delete the local work branch only when it is no longer needed.
git branch -d local/task{N} # Forced deletion requires explicit task requester approval: git branch -D local/task{N} - Final daily task board check: confirm the #{N} row in
mydocs/orders/{yyyymmdd}.mdisDonewith a completion time. - Report the cleaned items briefly to the task requester.
Verification
gh pr view {number}showsstate == MERGED.git branch -vv | grep local/task{N}has no output if the branch was deleted.git ls-remote origin publish/task{N}has empty output.git worktree listdoes not include the cleaned worktree.git branch --show-currentis{BASE_BRANCH}.
Never Do
- Close an Issue when the PR is not merged.
- Delete another task branch or the main worktree.
- Run
git branch -Dwithout explicit approval; unmerged commits may be lost. - Delete another worker's stash.
Invocation
- Codex:
$pr-merge-cleanupor the/skillsmenu - Claude Code:
/pr-merge-cleanup