sp-cleanup
Skill3 starsChanged 3 months agoMITView on GitHub
Interactively run the sandbox-pal POST-MERGE CLEANUP phase for a merged agent PR — tracking-doc updates, review-ledger follow-up issues, branch deletion. Fallback/recovery path for the headless post_merge dispatch.
- Commits and pushes
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- discord-bot/AGENTS.mdAGENTS.md
- prompts/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- slack-bot/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- discord-bot/CLAUDE.mdCLAUDE.md
- prompts/CLAUDE.mdCLAUDE.md
- scripts/CLAUDE.mdCLAUDE.md
- slack-bot/CLAUDE.mdCLAUDE.md
- setupSkill
- sp-post-mergeSkill
- sp-reviseSkill
- sp-statusSkill
- sp-workSkill
- testSkill
- troubleshootSkill
- updateSkill
- sp-implementSkill
- sp-reviewSkill
- sp-reviseSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Delete the merged remote branch (best-effort): git push origin --delete <branch>
- Very specific: line 24
Create the follow-up issues from your structured output via gh issue create (confirm the list with the user first — this is the interactive …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
sp-cleanup — interactive post-merge cleanup
Runs the cleanup phase in THIS session using the same prompts/cleanup.md the headless dispatch uses.
Steps
1. Resolve the sandbox-pal install
Same resolution as sp-implement: $SANDBOX_PAL_HOME/prompts/, ~/agent-infra/prompts/, ~/repos/sandbox-pal-action/prompts/.
2. Preconditions
gh pr view <PR> --repo <REPO> --json title,body,headRefName,mergedAt,author,closingIssuesReferences- The PR must be MERGED. Confirm with the user before proceeding if the PR author is not the repo's agent bot (cleanup normally covers agent PRs only).
3. Execute
- Delete the merged remote branch (best-effort):
git push origin --delete <branch> - On an up-to-date main checkout, follow
prompts/cleanup.md, mapping$AGENT_PR_TITLE/$AGENT_PR_BODY/$AGENT_MERGED_BRANCH/$AGENT_ISSUE_NUMBERto the PR fields and$AGENT_REVIEW_LEDGERto.agent-data/review-ledger.jsonfrom main (if present). - Create the follow-up issues from your structured output via
gh issue create(confirm the list with the user first — this is the interactive path's advantage). - Push the doc commits to main (or open a chore PR if main is protected).
- Strip any remaining
agent:*labels from the linked issue.
4. Report
Summarize: docs updated, issues filed, branch deleted.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

