clean-caches
Skill0 starsChanged 9 days agoMITView on GitHub
Report and clear regenerable app caches (browser caches, Homebrew, Zoom, Google Drive logs, the Claude desktop Cowork VM image) with the clean_caches command. Use when user says 'clean caches', 'clear cache', 'check for cache buildup', 'free up disk space', 'what's taking up space', or 'cache audit'.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- usrrname/agent-skillstheir own version, first seen Oct 11, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- usrrname/agent-skills★ 0same name
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 repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- audit-pathsSkill
- audit-vaultSkill
- git-statusSkill
- health-checkSkill
- ocrSkill
- update-dependenciesSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Never call app data, models, chat stores, or an installed app's runtime "cache".
- Distinctive: line 25
Check memory for known keep-lists before flagging anything.
- Distinctive: line 32
If the disk is under ~80% full, say nothing is urgent.
- Distinctive: line 35
If an item is skipped because its app is running, ask the user to quit that app, then re-run.
- Very specific: line 42
Never run clean_caches run yourself, never rm cache paths, and never run uv cache clean --force.
- Very specific: line 44
Never clear in-app items. Give the user the in-app path instead.
- Very specific: line 55
clean_caches: command not found: run install.sh in the recovery repo.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Clean Caches
/clean-caches wraps the clean_caches command (~/.local/bin/clean_caches, symlinked from the private recovery repo's bin/). The command owns the target list and every safety check; this skill only runs it, looks for new buildup, and interprets the output.
Steps
Report (read-only):
~/.local/bin/clean_caches. Each known target gets a size and a status:readyready (quits Drive, relaunches it)skip: quit <App> firstskip: no rootfs.img.zst to rebuild fromopt-in: run --coworkin-app: <where to clear it>
Items under 10M are left out.
- Scan for new buildup (read-only):
~/.local/bin/clean_caches scanlists the top dirs in~/Library/Caches,~/.cache,~/Library/Application Supportand~/Library/Containers. Flag anything ≥ 500M that the report doesn't cover, and classify it as regenerable cache, app data or models.- Never call app data, models, chat stores, or an installed app's runtime "cache".
- Check memory for known keep-lists before flagging anything.
Present:
- free space
- the ready total
- each skipped item with its reason
- numbered decisions for the user
If the disk is under ~80% full, say nothing is urgent.
- Hand the user the clear command; never run it yourself. Claude Code never deletes files, caches included. Give the user
! ~/.local/bin/clean_caches run -yto paste, so the output lands in the conversation. Add--coworkonly if the user asked for the Cowork VM image.- Without
-ythe command refuses to run outside a terminal, and!doesn't count as one. - If an item is skipped because its app is running, ask the user to quit that app, then re-run. Never quit or kill apps yourself. The command itself quits and relaunches Google Drive.
- Without
- Report, from the output the user pasted:
- the
freedline, which is measured withdfand is the real number. If other disk activity outweighed the gain, the line readsno net gain measuredinstead. - any
skipped: …,refused: …orfailed: …lines, verbatim. If Drive didn't quit, it is relaunched anyway when the command exits.
- the
Rules
- Never run
clean_caches runyourself, neverrmcache paths, and never runuv cache clean --force. Deleting is the user's step. - A new target goes into the command, never into an ad-hoc command. That means three changes: add it to
collect_items, add its basename to thesafe_targetallowlist, and add a fake-HOME test case. - Never clear
in-appitems. Give the user the in-app path instead.
Notes
- uv: uninstalled, so the command skips its row. If uv comes back, its cache is locked while any session runs uvx MCP servers: clear it from a plain terminal after quitting them.
- Cowork VM image: the app rebuilds it from
rootfs.img.zstthe next time Cowork runs, so the space comes back. - Regrowth: browser caches regrow within days, so the gain is temporary.
- Sizes: they are upper bounds (APFS clones share blocks), so the
freedline is usually smaller than the ready total.
Troubleshooting
clean_caches: command not found: runinstall.shin the recovery repo. Alternatively,ln -s ~/Code/mac-config/bin/clean_caches ~/.local/bin/clean_caches.- Homebrew
failed:followed by asudo chownhint (a root-owned keg): the user runs! sudo chown -R $USER <keg path>, then re-runs the command. - An item that always shows
skip: quit <App> first: the app is still running in the background. Ask the user to quit it fully (⌘Q, or from its menu-bar icon).
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.

