Borrowing it
Nothing to install: this file belongs to stevengonsalvez/agents-in-a-box. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/stevengonsalvez/agents-in-a-box/main/.claude/skills/disk-space-cleaner/SKILL.mdgit clone --depth 1 https://github.com/stevengonsalvez/agents-in-a-boxWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/stevengonsalvez/agents-in-a-box/disk-space-cleaner)<a href="https://agentmods.dev/skills/stevengonsalvez/agents-in-a-box/disk-space-cleaner"><img src="https://agentmods.dev/badge/skills/stevengonsalvez/agents-in-a-box/disk-space-cleaner/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/stevengonsalvez/agents-in-a-box/disk-space-cleaner"><img src="https://agentmods.dev/badge/skills/stevengonsalvez/agents-in-a-box/disk-space-cleaner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00143 | $0.03056 |
| Opus 5 | $0.00072 | $0.01528 |
| Sonnet 5 | $0.00029 | $0.00611 |
| Haiku 4.5 | $0.00014 | $0.00306 |
Grade C, and why
disk-space-cleaner scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
tree counts as a failure: `rm -rf` can remove part of a directory and then How it starts
The opening of the file, as written. The whole thing — 241 lines — stays where its author put it; the contents beside it link to each section on GitHub.
disk-space-cleaner
Free disk by deleting only regenerable build and dependency directories. Never touches source, never removes a worktree.
The three rules
1. Only the build directory, never its parent. Clearing a worktree's
target/ must leave the worktree itself, with all its source and any
uncommitted work, exactly where it was. The script asserts this before the
rm: the candidate must still be a directory, must live under its scan root,
and its basename must be one of the target names. A check that runs after the
deletion cannot prevent anything.
2. Decide by liveness, not by age. A target/ rebuilt an hour ago by a
session that has since finished is safe to clear. One untouched for a month can
belong to a session running right now. mtime cannot tell those apart, so it is
not used as a safety signal at all.
An age gate looks prudent and is actively misleading: on a busy machine every large build directory is recently touched, so an age-gated sweep skips exactly the directories worth reclaiming while offering no protection to the ones in use.
3. Fail closed. A signal that could not be collected is not the same as a
signal that came back empty. If ps, tmux, lsof or git is missing or
unreadable, --apply refuses and reports held (liveness incomplete) rather
than deleting blind. This is re-evaluated after every re-read, not decided once
at startup: a ps that succeeds before the sizing pass and fails during it must
stop the run, not ride the verdict it had before. An installed tool that exits
with an error counts as unreadable; only the exit status that genuinely means
"nothing found" is treated as an empty answer. --ignore-live overrides,
deliberately and loudly.
Step 1: see where the space went
df -h /System/Volumes/Data # macOS data volume
du -xh -d 1 "$HOME" 2>/dev/null | sort -rh | head -20
du -sh ~/.agents-in-a-box/worktrees/by-name/*/*/target 2>/dev/null | sort -rh | head
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago Changed · +107 lines · +17 tokens per session scan A → C 079c3263e281
- 7d ago Changed · +38 lines · -2 tokens per session scan D → A d20ef1dde74c
- 11d ago First seen · 96 lines · 128 tokens per session scan D 459b764a49d5
disk-space-cleaner is a skill published in the GitHub repository stevengonsalvez/agents-in-a-box (23 stars, last pushed today), licensed MIT. It adds 143 tokens to every session and 3,056 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
adhd-output-style
This skill should be used when the user asks for "ADHD output", "fewer output tokens", "short numbered steps", "limited working memory formatting", or explicitly invokes "adhd-output-style".
lov-organize-storage
A storage-organization tool for surveying a whole drive or archive and planning a project-based folder layout. It can rename items within the same drive after confirmation, while keeping a mapping, log, and rollback script.
lov-personal-vocabulary
A manager for one shared personal vocabulary list that can be reused across voice-input apps.
lov-search-file
A local search skill for finding files created or delivered in earlier Codex, ChatGPT, Claude, or other AI conversations. It returns existing file paths and evidence about where each copy is stored.
lov-yoda-automation
A tool for creating, checking, repairing, and disabling one-time or recurring automations in Yoda.
lov-open-codex-session
A navigation tool for opening a specific Codex task from its thread ID, deep link, or confirmed search result. Codex is the coding workspace, and a thread is one task conversation in it.