cleanup
Skill0 starsChanged 24 days agoMITView on GitHub
Remove landed worktrees in this repository, then remove unverified and landed-probable ones only after the maintainer confirms each
71 other projects use a version of this.
Adopted by
Most recently taken up by
- udecode/better-convextheir own version, first seen Nov 9, 2026
- fynnhaupt/skillstheir own version, first seen Nov 8, 2026
- LeonardiFranco/skillstheir own version, first seen Nov 8, 2026
- frnkgns/Overgeared-Skillstheir own version, first seen Nov 8, 2026
- Integralist/agent-skillstheir own version, first seen Nov 6, 2026
- buildomator/buildomatortheir own version, first seen Nov 4, 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 versions71 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 71
- 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
61 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 repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- lumberjackSkill
- setupSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 0 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 61 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Run every command from the repository root with Python 3.11+ as python or python3.
- Very specific: line 38
Keep the worktree lines whose tier= is unverified or landed-probable, plus any worktree step 1 reported as blocked ...: dirty.
- Very specific: line 77
Only the answer for that group counts.
- Very specific: line 87
Read docs, doc_strategy and trash.
- Very specific: line 93
When doc_strategy is {}, ask in one message, with these choices, then save the answers:
- Very specific: line 100
Write them as JSON with keys scope, trash_days and grace_days (plus roots, a table of root to keep, when they named any) to a temporary …
- Very specific: line 114
If --clear answers no Markdown in scope, only other files are left: say so and do not offer it again.
“Common” is measured: kept by at least 6 in 10 of the 61 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
lumberjack cleanup
Clear old worktrees in the repository this command runs in. The sweep script does all
removal; you relay its lines and ask. Never remove a worktree the maintainer did not
confirm by name, and never pass --force to git.
Resolve the script at ../../scripts/sweep_worktrees.py relative to this skill's
directory. Use its absolute path in place of SWEEP below, quoted for the active shell.
Run every command from the repository root with Python 3.11+ as python or python3;
use the name that reports 3.11+ in place of python below. If missing or older, stop and point
to https://www.python.org/downloads/ .
1. Sweep
python "SWEEP" --cleanup
git worktree prune --verbose--cleanup fetches origin and removes landed worktrees (integrated,
content-integrated, landed-pr) that nothing blocks, keeping their branches.
git worktree prune drops records whose directories are gone. Relay both outputs
verbatim. A skipped line or a lumberjack: config error ends the sweep step; still
go on to step 2.
2. List what is left
python "SWEEP"Keep the worktree lines whose tier= is unverified or landed-probable, plus any
worktree step 1 reported as blocked ...: dirty. Show them as one numbered list: branch,
path, tier and reason. The path is everything after the branch, already absolute; use it
as PATH below. If there are none, say so and stop.
3. Ask about each one
One worktree at a time, in list order. Ask whether to remove it, and say its branch is kept. Only an explicit yes for that worktree counts; anything else, silence included, means keep it. A yes to one is not a yes to the next. On a yes, run:
python "SWEEP" --remove "PATH"Relay its one line verbatim: a cleaned line and exit 0 (directory left means the
maintainer deletes the leftover directory by hand), or a blocked line with its reason
and exit 1, after which the worktree stays and you move on. Do not work around a block
(commit, stash, delete files or cd away) unless the maintainer asks for that step by
name; a per-group answer under "Stray files" below is that request.
Stray files (dirty or ignored files)
An ignored files line names up to three entries; for all of them, and for dirty, run
git -C "PATH" status --porcelain -uall --ignored.
Stray entries are the untracked (??) ones and the ignored (!!) ones other than caches
(node_modules, .venv, __pycache__, tool caches, .coverage, Claude's .claude/settings.local.json). Modified tracked files (M, D)
are not stray: show them and leave them. Group the stray entries by what produced them:
one tool's output, one file type, one directory. Never ask file by file. Ask one question
per group, naming its files and the three choices:
- delete:
git -C "PATH" clean -f -x -- <files>; removal would delete them anyway. - ignore (
??entries only): add one pattern to.git/info/excludein the primary checkout, which covers every worktree of this clone without a commit, or to.gitignoreon the primary branch through its own pull request; then delete the copies as above. - commit:
git -C "PATH" add -f -- <files>, commit on the branch and push; the files reach the primary branch through its pull request, a new one if the old one merged.
Only the answer for that group counts; silence keeps its files, and the worktree stays
while any group is kept. Once every group is settled, run --remove "PATH" again and
relay its line.
4. Work documents
python "SWEEP" --jsonRead docs, doc_strategy and trash. When no doc has state linked and trash is
empty, skip to step 5. Never remove a bundle outside this step's commands, and never
by hand.
Strategy (first run only)
When doc_strategy is {}, ask in one message, with these choices, then save the answers:
- scope:
markdown(only.mdfiles) orbundle(whole entries, run output included) - trash days: whole days a trashed folder is kept (suggest 30)
- grace days: whole days a bundle must stay linked before session start trashes it, 0 or more (suggest 7)
- doc roots to always keep, if any (saved as
roots, each root mapped tokeep)
Write them as JSON with keys scope, trash_days and grace_days (plus roots, a table of root to
keep, when they named any) to a temporary file and
run python "HELPER" strategy FILE, where HELPER is
../../scripts/setup_lumberjack.py relative to this skill's directory. Relay its output and
say the maintainer commits .lumberjack.toml. If they decline, remove nothing and go to
step 5. A saved strategy is never asked for again; follow it.
Offer
Take the linked docs whose action is not keep; the sweep sets action from the
strategy, so never work it out yourself. Ask once per group (same action and doc root),
never bundle by bundle, listing the paths, tickets and sizes. Only an explicit yes counts.
With cleanup = "prune" the session start already trashed the trash ones (step 1 relayed the
cleared lines); any left were over the time budget, blocked or inside grace_days, so offer them as below.
If --clear answers no Markdown in scope, only other files are left: say so and do not offer it again.
- trash: the bundle moves to the trash, kept
trash_daysdays. On a yes, runpython "SWEEP" --clear "PATH" "PATH" ...once with the group's paths. - promote: offer only promote or keep; keep is the default. To promote, write
the findings into a document without naming the bundle's folder and get it tracked on
origin/<primary_branch>through its pull request, or push the work as aprototype_prefixbranch. Only then runpython "SWEEP" --clear "PATH" --promoted "REF"with that document's path or branch name; it fetchesoriginfirst, so a just-merged pull request counts.
Relay each line verbatim. A blocked line (exit 1 when any path is blocked) means that
bundle stays; do not work around it.
Trash
With cleanup = "prune" the session start already purges trash past trash_days (step 1
relayed the purged lines); any folder trash still lists was over the time budget, blocked or
kept by cleanup. Show those with their age and ask once whether to purge them now. On a yes,
run python "SWEEP" --purge-trash (everything past retention, in one run) and relay its lines.
Without a yes, leave them.
5. Report
List what was removed, what was kept and what was blocked with its reason (worktrees,
bundles and trash). Mention that a removed worktree comes back with git worktree add <path> <branch>.
Then run python "SWEEP" --tally and relay its three tally: lines: bundles trashed and files
purged since the session start and in all, and what the trash still holds. If the maintainer
asks which files, run it again with --files <bundle path> (or bare --files) and relay the file lines.
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.

