disk-cleanup
Skill1 starsChanged 36 days agoMITView on GitHub
Reclaim local disk space safely on a development machine — leftover git worktrees, Docker leftovers from integration tests (Testcontainers containers, orphan anonymous volumes, dangling images, build cache) and regenerable caches (Turborepo, Vite, Yarn Berry global, npm). Use when the disk is full or nearly full, on ENOSPC / "no space left on device" errors, when Docker Desktop hangs or won't open, when a SessionStart warning reports low free space, or when the user says "libera espacio", "limpia el disco", "disk cleanup", "free up space".
20 other projects use a version of this.
Adopted by
Most recently taken up by
- addisonk/skillstheir own version, first seen Nov 8, 2026
- DaraBoth/skilljmskilltheir own version, first seen Nov 8, 2026
- jars-demo/jars-skillstheir own version, first seen Nov 1, 2026
- huihuisang/ajigu-skillstheir own version, first seen Nov 1, 2026
- TsinHzl/claude-code-configtheir own version, first seen Nov 1, 2026
- MakiDevelop/claude-skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use release.
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.
MicrosoftSkillrelease
Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).
Also in 3 projects that use this
Other versions20 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 20
- glebis/claude-skills★ 410same name
- mtarcure/claude-vibe-squad★ 220same name
- MakiDevelop/claude-skills★ 3same name
- vndee/engineering-skills★ 3same name
- DaraBoth/skilljmskill★ 2same name
- TsinHzl/claude-code-config★ 2same name
- addisonk/skills★ 1same name
- CharlesLadera/claude-custom-skills★ 1same name
- foogunlana/skills★ 1same name
- galonge/free-claude-skills★ 1same name
10 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.
- api-designSkill
- create-prSkill
- deprecationSkill
- developSkill
- diagnoseSkill
- domain-modelingSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- observabilitySkill
- prototypeSkill
- receiving-code-reviewSkill
- security-hardeningSkill
- setupSkill
- tddSkill
- to-specSkill
- to-ticketsSkill
- write-a-skillSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
0
Distinctive
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
- Very specific: line 14
Only stale worktrees to tidy, no space pressure → run scripts/worktree-cleanup.sh on its own.
- Very specific: line 21
All scripts live in scripts/ next to this file.
- Very specific: line 26
Report: Run scripts/disk-report.sh.
“Common” is measured: kept by at least 6 in 10 of the 13 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
Disk cleanup
Free space by deleting only what can be regenerated or is already safe elsewhere: a report and a plan first, an explicit OK from the user, then execution. Never touch a container's data, a named volume, uncommitted work or an unpushed commit.
When NOT to use
- Only stale worktrees to tidy, no space pressure → run
scripts/worktree-cleanup.shon its own. - Removing the worktree a PR was just opened from →
/create-prdoes that itself. - Docker data the user wants gone on purpose (reset a database, drop a named volume) — that is a deliberate, targeted command, not a cleanup sweep.
Process
All scripts live in scripts/ next to this file; run them from inside the repo.
- Unblock if the disk is at 0. With no free space even command output fails (
ENOSPC). Measure with a read-onlydf -h "$HOME"and start with the biggest safe win (usually worktrees, ~30 GB each with theirnode_modules). Docker cannot start on a full disk: free space first. - Report. Run
scripts/disk-report.sh. It prints free space and the--planof the three cleaners; nothing is deleted. Sizes of worktrees:du -sh <path>(slow — run in background). - Present the plan to the user in their language, per area: what goes, how much it frees, what is kept and why (copy the script's reasons, don't paraphrase them away). REMOVABLE worktrees (open PR, clean, pushed) are offered one by one, never bundled into "all".
- Confirm. Explicit OK per area. A subset → run per item (
worktree-cleanup.sh --remove <path>), not--execute. - Execute the confirmed areas:
- worktrees:
scripts/worktree-cleanup.sh --execute(SAFE ones) /--remove <path> - Docker:
scripts/docker-cleanup.sh --execute(needs the daemon up) - caches:
scripts/cache-cleanup.sh --execute(stop dev servers first; it skips caches in use) Long removals (worktrees) go to the background; report when they finish.
- worktrees:
- Report freed space (
df -hbefore/after) and what was kept.
Docker Desktop hung (UI won't open) → restart it without losing containers: free space, osascript
-e 'quit app "Docker"', wait; if the backend ignores it, SIGTERM com.docker.backend; SIGKILL only
once no com.docker.virtualization/krun process is left (the VM is down, data is closed). Then
open -a Docker and check docker ps -a. Never "Reset to factory defaults" / "Clean / Purge data".
Common Rationalizations
| Rationalization | Reality |
| "The script says commits not in master, so it's unmerged" | Squash merges leave the original commits out of master; check the PR state and whether the tip is pushed. |
"docker system prune -a --volumes frees the most" | It also deletes named volumes and stopped stack containers: local databases gone. |
| "The worktree is clean, its open PR doesn't matter" | No code is lost, but the user may still be working there — offer it, don't assume. |
| "Deleting the cache while the dev server runs is fine" | A running Vite/Turbo loses its cache mid-flight; stop it or let the script skip it. |
Red Flags
docker system prune,docker volume prune -aor--volumesin a command.git worktree remove --forceorgit branch -Dwithout the user naming that exact item.- Deleting before the user saw the plan, or executing "all" when they picked a subset.
- Reporting "freed X GB" without a
df -hafter.
Verification
disk-report.sh(or each--plan) output shown before deleting anything- user's OK recorded per area / per REMOVABLE worktree
df -hafter, with the freed amountdocker ps -astill lists the stack containers (if Docker was touched)- kept items listed with their reason
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.

