cleanup
Skill2 starsChanged 3 months agoMITView on GitHub
Safely close a completed or paused task by verifying owned disposable state, preserving recoverable leftovers, and producing a truthful handoff. Use when a branch, worktree, slot, browser session, loop, or temporary artifact may need cleanup.
29 other projects use a version of this.
Adopted by
Most recently taken up by
- Integralist/agent-skillstheir own version, first seen Oct 4, 2026
- jesse-merhi/skillstheir own version, first seen Oct 4, 2026
- orbit-collective/orbit-skillstheir own version, first seen Oct 3, 2026
- jantichy/claudetheir own version, first seen Oct 2, 2026
- SantiagoVqz/claude-skillstheir own version, first seen Sep 23, 2026
- YSAA1/harness-workflowtheir own version, first seen Sep 23, 2026
Used with
Projects with it also use next, eval and 7 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
VercelSkillnext
Next.js adapter for embedding emulators directly in a Next.js app via @emulators/adapter-next. Use when the user needs to embed emulators in Next.js, set up same-origin OAuth for Vercel preview deployments, create an emulate catch-all route handler, configure Auth.js/NextAuth with embedded emulators, add persistence to embedded emulators, or wrap next.config with withEmulate. Triggers include "Next.js emulator", "adapter-next", "embedded emulator", "same-origin OAuth", "Vercel preview", "createEmulateHandler", "withEmulate", or any task requiring emulators inside a Next.js app.
Also in 4 projects that use this
qtzx06Skilleval
Evaluate trained YOLO model accuracy with mAP metrics and per-class error analysis. Identifies failure cases for targeted improvement. Use after training.
Also in 3 projects that use this
BlockSkillplan
Draft a TDD, PRD, or lightweight plan in the conversation without committing it.
Also in 5 projects that use this
DockerSkillresearch
Research a documentation topic — locate affected files, understand the problem, identify what to change. Use when investigating an issue, a question, or a topic before writing a fix. Triggers on: "research issue 1234", "investigate what needs changing for #500", "what files are affected by #200", "where is X documented", "is our docs page about Y accurate", "look into how we document Z".
Also in 7 projects that use this
AWSSkillwriting-for-agents
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
Also in 3 projects that use this
AWSSkillship
Finalize dev work on an issue branch — update docs, push, and open a PR.
Also in 4 projects that use this
Other versions29 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 29
- ericboy0224/learn-docker-and-k8s★ 486same name
- buildomator/buildomator★ 90same name
- mkanat/skills★ 70same name
- jantichy/claude★ 38same name
- leadgenjay/claude-skills★ 19same name
- ggombee/code-forge★ 18same name
- sauravpanda/bonsai★ 9same name
- nicolasestrem/antigravity-gemini-skills★ 8same name
- Integralist/agent-skills★ 3same name
- jesse-merhi/skills★ 3same name
19 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository19 other files it gives its agents.
- access-checkSkill
- babysit-prsSkill
- browser-proofSkill
- bugfixSkill
- bug-reproSkill
- contextSkill
- dev-flowSkill
- docs-managerSkill
- hot-reloadSkill
- jira-managerSkill
- polishSkill
- pr-managerSkill
- release-proofSkill
- status-reportSkill
- sync-projectSkill
- watch-loopSkill
- whatsapp-meSkill
- workflowSkill
- worktreeSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 10 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 23 edited versions we read keep these.
10
Distinctive
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
- Distinctive: line 12
Do not delete dirty, ambiguous, or unowned state just to make the workspace look clean.
- Distinctive: line 17
Before removing anything, list the task-owned state:
- Very specific: line 33
Only owned-and-clean is eligible for automatic removal.
- Distinctive: line 39
Verify git state before removing a worktree or branch.
- Distinctive: line 40
Stop slots, port-forwards, or browser state only when they are clearly owned.
- Distinctive: line 46
Never remove the main or canonical checkout.
- Distinctive: line 47
Never remove a dirty worktree without explicit authority and a recovery plan.
- Distinctive: line 48
Do not assume a branch is disposable because its remote disappeared.
- Distinctive: line 54
Stop only task-owned slots, containers, native processes, watchers, and port forwards.
- Distinctive: line 57
Remove test records through the product or API path first when normal cleanup hooks matter.
- Distinctive: line 58
Keep screenshots, logs, and evidence that are still required for review, audit, or resume.
- Very specific: line 60
If cleanup fails after the feature proof passes, the task is still blocked on cleanup.
“Common” is measured: kept by at least 6 in 10 of the 23 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Cleanup
Cleanup is part of the workflow, not an afterthought.
Core Rule
Do not delete dirty, ambiguous, or unowned state just to make the workspace look clean.
Cleanup Ledger
Before removing anything, list the task-owned state:
- branch
- worktree
- slot or local app processes
- browser session or temporary auth state
- temporary data, screenshots, logs, or exports
- loops, watchers, or port-forwards
Mark each item as:
owned-and-cleanowned-but-dirtyunknown-owneralready-gone
Only owned-and-clean is eligible for automatic removal.
Workflow
- Record the task label and intended stop state.
- Build the cleanup ledger.
- Verify git state before removing a worktree or branch.
- Stop slots, port-forwards, or browser state only when they are clearly owned.
- Preserve evidence that is still useful for resume or audit.
- Report every leftover plainly.
Worktree And Branch Rules
- Never remove the main or canonical checkout.
- Never remove a dirty worktree without explicit authority and a recovery plan.
- Do not assume a branch is disposable because its remote disappeared.
- Recheck status, ownership, and open PR or MR state immediately before removal.
- Prune git metadata only after owned removals are complete.
Runtime And Browser Rules
- Stop only task-owned slots, containers, native processes, watchers, and port forwards.
- A slot stop must not stop shared warm infrastructure.
- Close task-owned browser sessions and temporary auth state.
- Remove test records through the product or API path first when normal cleanup hooks matter.
- Keep screenshots, logs, and evidence that are still required for review, audit, or resume.
If cleanup fails after the feature proof passes, the task is still blocked on cleanup. Do not hide residual resources behind a success message.
Output Contract
CLEANUP | task=<label> | status=<closed|paused|blocked>
REMOVED | <items or none>
LEFTOVERS | <dirty, unknown, shared, or intentionally preserved items>
PROOF | <git, process, browser, or data cleanup result>
RESUME | <none or exact next step>Stop Conditions
Return closed only when every owned disposable item is removed or intentionally preserved with a reason. Return paused when the state is ready to resume. Return blocked when dirty, unknown, shared, or failed cleanup remains.
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.

