cleanup
Skill21 starsChanged 47 days agoMITView on GitHub
Clean up after merged work. Remove the local branch and its git worktree, delete the remote branch, then delete temp files, containers, images, and leftover test processes that the work left behind.
- Commits and pushes
75 other projects use a version of this.
Adopted by
Most recently taken up by
- ekirton/Pouletheir own version, first seen Nov 15, 2026
- willcoliveira/mac-cleanup-agenttheir own version, first seen Nov 15, 2026
- PanQiWei/pqw-skillstheir own version, first seen Nov 15, 2026
- Integralist/agent-skillstheir own version, first seen Nov 14, 2026
- udecode/better-convextheir own version, first seen Nov 9, 2026
- fynnhaupt/skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use chips, react-query-best-practices and 10 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.
udecodeSkillchips
Run the project's suggested-task ledger, the chips. /chips alone brings this session's open tasks up to date: it applies what the ledger helper says, settles stale and split tasks, cards what can start and reports the board, and /chips all also takes the ship-list tasks and the ones no live session owns, and merges duplicate tasks across the board. Use for /chips, /chips offer, start or drop, \"what chips are open\", \"suggest a task for X\", \"update the chips\", \"clean up the chips\", \"which chips are stale\", \"is this chip still worth doing\", \"merge duplicate chips\", at the last hand-back of a run that offered a task, and whenever pstack would file a tracked issue, a follow-up, a reflect Backlog item or an out-of-band PR.
Also in 3 projects that use this
bibektimilsina00Skillreact-query-best-practices
Audit and fix React Query usage in apps/web — enforce query key factories, signal forwarding, staleTime, and proper mutation patterns. Use when reviewing or fixing server-state code.
Also in 3 projects that use this
bibektimilsina00Skillyou-might-not-need-a-callback
Analyze and fix useCallback anti-patterns in your code
Also in 3 projects that use this
Scylla23Skillredo
Re-run the last routed task one model tier up (haiku → sonnet → opus → fable). User-invoked escalation when the previous result missed. Pass --dry-run to preview without running.
Also in 3 projects that use this
Aetheria-Labs1Skillplan-page
Plan one storefront page from strategy through final copy, section order, proof, offers, template direction, responsive layout, and production asset requirements. Stops at an approved execution-ready specification.
Also in 3 projects that use this
SocialKit-APISkillvideo-transcripts
Extract transcripts from social videos through SocialKit across YouTube, TikTok, Instagram, Facebook, X/Twitter, LinkedIn, and direct video file URLs. Use when the user asks to transcribe, get captions or subtitles, pull the spoken text, or read what a video says, including one video or many at once. Returns full text plus timestamped segments. Not for posting, private accounts, or unrelated website scraping.
Also in 3 projects that use this
- +3 more from bibektimilsina00
Other versions75 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 75
- simstudioai/sim★ 30ksame name
- pipecat-ai/pipecat★ 17ksame name
- udecode/plate★ 17ksame name
- civitai/civitai★ 7.3ksame name
- mampfes/hacs_waste_collection_schedule★ 2.3ksame name
- trycompai/comp★ 2.1ksame name
- udecode/dotai★ 1.2ksame name
- LedgerHQ/ledger-live★ 627same name
- ericboy0224/learn-docker-and-k8s★ 472same name
- udecode/better-convex★ 452same name
65 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 repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- breakdownSkill
- bug-investigationSkill
- code-review-adversarialSkill
- code-review-multiSkill
- code-review-with-followupSkill
- document-changesSkill
- easy-issuesSkill
- grillingSkill
- type-test-codeSkill
- explain-changesSkill
- github-actions-ciSkill
- github-appSkill
- github-ticketsSkill
- implementation-planSkill
- implement-simpleSkill
- implementSkill
- implement-ttcSkill
- orchestrationSkill
- pull-requestSkill
- review-and-wrap-upSkill
- verusSkill
- specSkill
- ticketsSkill
- update-working-copySkill
- verifySkill
- wrap-upSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 8 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 63 edited versions we read keep these.
8
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 22
Stop and report if the branch is unmerged, has an open PR, or is the base of another branch.
- Distinctive: line 27
Start the working copy elsewhere.
- Distinctive: line 41
Delete the local branch with the safe form, so git itself refuses an unmerged branch:
- Distinctive: line 48
Delete the remote branch with the configured access path, then verify:
- Distinctive: line 60
Look for what this work created, and keep the scope to it:
- Distinctive: line 68
Use the repository's ignore rules and modification times to find candidates, and list them before deleting.
- Distinctive: line 77
If you are unsure, report them to the operator instead.
- Distinctive: line 79
Remove test images created by this session.
- Very specific: line 81
Never remove shared base images, containers or images of other worktrees and active agents, or volumes holding data.
- Very specific: line 85
Prefer the project's own teardown commands over raw docker commands when the repository documents one.
“Common” is measured: kept by at least 6 in 10 of the 63 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 after merge
Reclaim what a finished branch consumed. Discover the footprint first, then delete. Every deletion below is irreversible: confirm the work is merged and that nothing else depends on what you are removing.
Confirm the work is merged
Discover the remote and default branch from repository instructions and
git remote show, rather than assuming origin and main.
Fetch, then verify the branch landed in the default branch. A squash or rebase
merge leaves commit hashes unmatched, so check for the change itself:
git log <default> --oneline --grep, the PR's merged state, or a diff of the
branch against the default branch. git branch --merged alone is not proof.
Stop and report if the branch is unmerged, has an open PR, or is the base of another branch. Do not clean up work that can still be needed.
Remove the branch and its worktree
Start the working copy elsewhere. If the current checkout is the branch being removed, switch to the updated default branch first; git refuses to delete a branch that is checked out.
git worktree list
git worktree remove <worktree-path>
git worktree prunegit worktree remove refuses a dirty worktree. Inspect what is uncommitted,
and only pass --force when the user authorizes discarding it. Never remove a
worktree belonging to another branch or another agent's active task.
Delete the local branch with the safe form, so git itself refuses an unmerged branch:
git branch -d <branch> # -D only if a squash merge makes the check mootDelete the remote branch with the configured access path, then verify:
git push <remote> --delete <branch> # or the github-app wrapper's push
git ls-remote --heads <remote> <branch> # expect no outputSome projects keep the branch for a stacked PR's base, or delete remotely on merge already. Check before pushing a delete.
Remove temp files
Look for what this work created, and keep the scope to it:
- workflow artifacts such as task briefs, implementation plans, results, and review notes
- scratch directories, coverage and build output outside version control
- editor and agent caches keyed to the branch or worktree path
- the worktree directory itself, once git no longer tracks it
Use the repository's ignore rules and modification times to find candidates, and list them before deleting. Leave user data, dependencies to be reinstalled deliberately, and artifacts belonging to other branches. Ask when a path is ambiguous or outside the repository.
Stop leftover processes and containers
Enumerate processes and containers. For any that you are certain belong to your session, kill/stop them. If you are unsure, report them to the operator instead.
Remove test images created by this session.
Never remove shared base images, containers or images of other worktrees and
active agents, or volumes holding data. Volume and system-wide prunes
(docker volume prune, docker system prune) need explicit approval.
Prefer the project's own teardown commands over raw docker commands when the
repository documents one.
Report
Summarize what was removed: branch and worktree, remote branch, temp files, containers, images, and killed processes. List what you deliberately left, with the reason, and anything needing an operator decision.
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.

