Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add glebis/claude-skills --skill disk-cleanupgit clone --depth 1 https://github.com/glebis/claude-skillsWrote 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/glebis/claude-skills/disk-cleanup)<a href="https://agentmods.dev/skills/glebis/claude-skills/disk-cleanup"><img src="https://agentmods.dev/badge/skills/glebis/claude-skills/disk-cleanup/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/glebis/claude-skills/disk-cleanup"><img src="https://agentmods.dev/badge/skills/glebis/claude-skills/disk-cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Privilege Escalation · line 56 Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
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.00153 | $0.01982 |
| Opus 5.5 | $0.00061 | $0.00793 |
| Sonnet 5.5 | $0.00031 | $0.00396 |
| Haiku 4.5 | $0.00015 | $0.00198 |
Grade B, and why
disk-cleanup scanned grade B 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 24d 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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
deletes, sudo for system caches) — never invoke it from the agent. **Never shell out to `mo` How it starts
The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Disk Cleanup
Deterministic by design. All target knowledge lives in targets.json; all measuring and
deleting lives in scripts/survey.py (read-only) and scripts/clean.py (executor, dry-run by
default). They run headless with zero dependencies (stdlib only) — a user can run them in a
terminal without any agent. The agent's job is small: run the scripts, relay the compressed
output, and decide the handful of things that need human judgment.
The two scripts
python3 scripts/survey.py # read-only: sizes, risk, flags, uncategorized. Touches nothing.
python3 scripts/survey.py --json # same, machine-readable (preferred for the agent)
python3 scripts/clean.py --preset safe # DRY-RUN plan (default — nothing deleted)
python3 scripts/clean.py --preset safe --go # execute (safe risk only)
python3 scripts/clean.py --preset full --allow-medium --go --empty-trash # safe+medium, then empty Trash
python3 scripts/clean.py --ids cargo-registry-cache,go-mod-cache --go # specific targets
python3 scripts/clean.py --preset safe --skip ollama-models --go # exclude one
trash is used for all file removal (never rm); freed space sits in Trash until emptied
(--empty-trash, or the user empties it). Sizes are du estimates — approximate on APFS.
Safety model (enforced in code, not prose)
- Risk gating:
saferuns automatically;mediumneeds--allow-medium;neveris refused even if named by id.advisorytargets only print guidance, never execute. - Preflight on every trashed path: canonical
realpath→ must resolve under anallowed_rootsentry → must not be a symlink → never$HOMEor/. Anything failing is skipped and reported, not deleted. - Dry-run by default:
clean.pyprints the plan and touches nothing unless--go.
Agent workflow
- Run
python3 scripts/survey.py --json. Relay the compressed summary: disk free,safe/mediumrecoverable totals, anyflags(e.g. crash-loop), and the top targets. Do not dump the whole JSON. - Auto-path: for a plain "clean up safe stuff", show the
safetotal and runclean.py --preset safe --go(offer--empty-trash). Safe targets are regenerable. Disk-full emergency (ENOSPC is blocking other work): don't start with the fullsafepreset. It quits running apps (electron-app-caches: Notion, Figma, Obsidian, Codex, Dropbox), and itstrash-method targets free nothing until the Trash is emptied, which also deletes the user's other trashed items. Run the command-method caches first, because they free space immediately:clean.py --ids uv-cache,npm-cache --go. Command-method caches often free far more than theirduestimate. - Escalate to the user ONLY for (these are genuine judgment calls the scripts deliberately
refuse to auto-decide):
mediumtargets (ML models, device support, projectnode_modules) — confirm before--allow-medium. ML-model targets (ollama-models,huggingface-models) carry alast_used_daysfield (newest file atime under the target, aggregate across all models in that store — not per-model) as a "how stale is this" signal; surface it before suggesting deletion.uncategorizeddiscoveries — unknown dirs >100 MB; ask or investigate before adding.advisorynotes — surface them (Telegram cache, simulators viasimctl,uv/tools, Chrome whole-dir, Xcode Archives,mo cleandeep-clean); never act on them automatically. Formole-deep-clean: suggest the user runmo cleanthemselves (interactive TUI, permanent deletes, sudo for system caches) — never invoke it from the agent. Never shell out tomoat all (not even--dry-run): it's TUI-only and blocks waiting for a real terminal even in dry-run mode — confirmed hanging under a piped subprocess,stdin=DEVNULL, and even ascript(1)-allocated pty. Amoleflag in survey.py's output only reads the mtime of mole's own leftover~/.config/mole/clean-list.txt(last-run recency), never invokes it.- surgical Docker / simulator decisions (see below).
- Run
clean.pywith the resolved selection. Relay the result (freed_human, disk before→after).
What ships with it
9 files 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.
- 24d ago Changed · +7 lines 98967686ddb2
- 27d ago Changed · +153 tokens per session d95331f7fdca
- 2mo ago First seen · 107 lines · 0 tokens per session scan B 55d04fe78a4e
disk-cleanup is a skill published in the GitHub repository glebis/claude-skills (417 stars, last pushed today), licensed MIT. It adds 153 tokens to every session and 1,982 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
disk-cleanup compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| disk-cleanupglebis/claude-skills | Skill | 417 | today | MIT | B | 153 | Claude Code |
| switch-clientssuboss87/FDEOps | Skill | 772 | 2d ago | MIT | A | 32 | Claude Code, Codex |
| world-time-get-{timezone}bobadilla-tech/requiems-api-skills | Skill | 2 | 17d ago | MIT | A | 44 | Claude Code |
| workspace-patternsJartan-LLC/grimoire | Skill | 4 | 6d ago | MIT | B | 52 | Claude Code |
| foggy-modesoftcane/human-state-skills | Skill | 122 | 3mo ago | MIT | C | 137 | Claude Code |
| overloaded-modesoftcane/human-state-skills | Skill | 122 | 3mo ago | MIT | C | 164 | Claude Code |
| megacavedisplay-design-studio/skills | Skill | 3 | 4d ago | none | A | 54 | Claude Code, Codex |