reclaim-disk
Skill1 starsChanged 3 days agoApache-2.0View on GitHub
Use when the disk is filling up, a build fails with "No space left on device", or target-shared/ or a worktree's target dir has grown large — reclaims cargo build artifacts across the shared target dir and every worktree's private one with `mise run sweep`.
In this repository28 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- autopilot-supervisorSkill
- speckit-analyzeSkill
- speckit-autopilotSkill
- speckit-bugfix-patchSkill
- speckit-bugfix-reportSkill
- speckit-bugfix-switchSkill
- speckit-bugfix-verifySkill
- speckit-checklistSkill
- speckit-clarifySkill
- speckit-constitutionSkill
- speckit-convergeSkill
- speckit-docguard-diagnoseSkill
- speckit-docguard-fixSkill
- speckit-docguard-generateSkill
- speckit-docguard-guardSkill
- speckit-docguard-reviewSkill
- speckit-docguard-scoreSkill
- speckit-implementSkill
- speckit-planSkill
- speckit-specifySkill
- speckit-tasksSkill
- speckit-taskstoissuesSkill
- speckit-tdd-planSkill
- speckit-tdd-runSkill
- speckit-tdd-setupSkill
- speckit-tdd-verifySkill
- visual-passSkill
The file
Files
Reclaim disk from cargo target dirs
Sharing target-shared/ removes the multiplication — one directory instead of one per branch —
but only for builds that go through mise run, and not the growth: every branch that builds here
leaves artifacts behind and cargo never collects them, so target-shared/ creeps up on a disk that
has run out once already. Bare-cargo worktree dirs put the multiplication back, quietly, which is
how that disk reached zero bytes free. mise run sweep bounds all of them.
mise run sweep reclaims space in every target dir this repo accumulates — the shared one and
each worktree's private one — dropping artifacts unused for 7 days (installs cargo-sweep first if
missing). It walks git worktree list via scripts/sweep-targets.sh and lets each checkout resolve
its own directory.
- It refuses to run while a
cargobuild is, since the oldest artifacts in a shared directory are usually dependencies a live build is still linking against;SWEEP_FORCE=1overrides. SWEEP_ARGSreplaces the default, e.g.SWEEP_ARGS='--dry-run --time 7'to preview, orSWEEP_ARGS='--maxsize 50GB'to bound each directory by size instead of age.
mise run sweep does not clean .visual-pass/ (visual-pass working files, pinned binaries). Each
pass works in its own .visual-pass/run.* directory and removes it when it ends; one left behind
by an interrupted pass can be removed by hand once no pass is running in that worktree.
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.

