Getting it into your agent
There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.
Wrote 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/majiayu000/spellbook/disk-cleaner)<a href="https://agentmods.dev/skills/majiayu000/spellbook/disk-cleaner"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/disk-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/majiayu000/spellbook/disk-cleaner"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/disk-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.00037 | $0.02641 |
| Opus 5 | $0.00018 | $0.01321 |
| Sonnet 5 | $0.00007 | $0.00528 |
| Haiku 4.5 | $0.00004 | $0.00264 |
Grade D, and why
disk-cleaner scanned grade D with 2 findings 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 10d 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.
- 如果遇到权限问题,先用 `chmod -R u+w` 尝试,不要用 sudo - `du` 对大目录可能很慢,给所有 Bash 调用设置 `timeout: 120000` Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf /Users/xxx/.cache/uv/cache /Users/xxx/.cache/uv/sdists-v9 How it starts
The opening of the file, as written. The whole thing — 242 lines — stays where its author put it; the contents beside it link to each section on GitHub.
磁盘空间清理工具
你是一个磁盘空间管理专家,帮助用户找出可以安全删除的文件和目录,释放磁盘空间。
用户传入的参数(如有):$ARGUMENTS
将 $ARGUMENTS 视为用户指定的扫描范围,不要忽略。用户没有传入参数时,不要假设代码一定在某个固定目录;先从当前工作目录和用户主目录做有边界的探索,找出真实存在的项目根目录,再基于这些目录扫描。
扫描流程
第一步:解析扫描范围
先确定本次扫描根目录,后续所有代码相关扫描都必须基于这些根目录。
规则:
- 如果用户传入路径参数,逐个解析为绝对路径;只扫描这些路径及其子目录。
- 如果用户没有传入参数,以当前工作目录和用户主目录为起点做探索。
- 不要硬编码
~/Desktop/code、~/Developer、~/Projects等目录;只有探索结果中真实出现的目录才可作为扫描根目录。 - 代码根目录通过项目标记发现,例如
.git、Cargo.toml、package.json、pyproject.toml、go.mod、pnpm-workspace.yaml、bun.lockb。 - 探索时跳过明显不该递归的大目录:
Library、.Trash、node_modules、target、.git、应用数据缓存目录。 - 输出去重后的绝对路径列表,命名为“扫描根目录”,并在报告里展示。
- 后续命令中先把扫描根目录写入
scan_roots=(...)数组;不要原样执行模板里的占位路径。
可用的探索命令:
pwd
printf '%s\n' "$HOME"
用户没有传入参数时,用下面的方式探索项目根目录:
find "$HOME" -maxdepth 5 \
\( -path "$HOME/Library" -o -path "$HOME/.Trash" -o -path "*/node_modules" -o -path "*/target" \) -prune -o \
\( \( -name ".git" -type d -prune \) -o -name "Cargo.toml" -o -name "package.json" -o -name "pyproject.toml" -o -name "go.mod" -o -name "pnpm-workspace.yaml" -o -name "bun.lockb" \) -print 2>/dev/null \
| awk '{ if ($0 ~ /\/\.git$/) sub(/\/\.git$/, "", $0); else sub(/\/[^\/]+$/, "", $0); print }' \
| sort -u | head -80
如果探索结果过多,优先选择:
- 当前工作目录所在项目
- 占用明显较大的项目父目录
- 最近用户提到或传入的目录
第二步:全量并行扫描
一次性并行执行以下所有扫描(每个一个 Bash 调用):
- 磁盘概况 + 主目录一级
df -h / && echo "---" && du -d1 -h "$HOME" 2>/dev/null | sort -rh | head -30
- 隐藏目录占用
du -sh ~/.[!.]* 2>/dev/null | sort -rh | head -20
- Rust target 编译缓存(基于扫描根目录,用 -prune 避免递归进入)
# 将 /absolute/root1 /absolute/root2 替换为第一步解析出的扫描根目录
scan_roots=(/absolute/root1 /absolute/root2)
for root in "${scan_roots[@]}"; do
find "$root" -maxdepth 5 -name "target" -type d -not -path "*/node_modules/*" -prune -exec du -sh {} \; 2>/dev/null
done | sort -rh
- node_modules 依赖(基于扫描根目录)
# 将 /absolute/root1 /absolute/root2 替换为第一步解析出的扫描根目录
scan_roots=(/absolute/root1 /absolute/root2)
for root in "${scan_roots[@]}"; do
find "$root" -maxdepth 5 -name "node_modules" -type d -prune -exec du -sh {} \; 2>/dev/null
done | sort -rh | head -15
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.
- 10d ago First seen · 242 lines · 37 tokens per session scan D df40f67463f7
disk-cleaner is a skill published in the GitHub repository majiayu000/spellbook (277 stars, last pushed yesterday), licensed MIT. It adds 37 tokens to every session and 2,641 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it D with 2 findings (asks for root, 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
pneuma-session
Instructions for renaming an active Pneuma session and replacing its default preview with a useful title and summary. A Pneuma session is one work area inside a larger project.
session-handoff
Use when the user wants to hand off, transfer, pause, or continue the current session in a new session or with another agent — asks for a "session handoff", a "prompt para a próxima sessão", to "continuar de onde paramos", or invokes /session-handoff; also when context is running low and in-flight work must survive a…
aenv
Use when the user wants to set up, switch between, or manage aenv namespaces — named bundles of CLAUDE.md, skills, MCP entries, and other AI-coding-harness config — in a project OR globally across $HOME. Triggers include aenv … mentioned directly, "switch namespace/profile", "activate/deactivate", "create/snapshot a…
cao-session-management
Interact with CAO (CLI Agent Orchestrator) — launch multi-agent sessions, check status, send follow-up instructions, unblock stuck terminals, or shut down sessions. Use when working with CAO sessions in any capacity.
adhoc-flow
Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.
session-handoff-resume
Skill to save ultra-compact project checkpoints and seamlessly resume work across accounts or new chat sessions with minimum token consumption / Skill untuk menyimpan checkpoint proyek yang super ringkas dan melanjutkan pekerjaan secara efisien saat ganti akun/sesi tanpa boros token.