disk-cleanup

disk-cleanup is a skill for Claude Code from adamjali/claude-skills. It costs 168 tokens per session (2,937 once invoked), scanned D, original, MIT.

A macOS disk-cleanup skill for identifying and safely removing regenerable caches, old runtime versions, and bulky one-off files.

In plain words
What is it for?
Use it to investigate what is filling a Mac's storage and clean approved caches, unused runtime versions, and other safe-to-remove artifacts.
Why use it?
It helps recover storage while distinguishing disposable files from user-created data or files that may still be in use.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions CLAUDE.md; names the AskUserQuestion tool.

Part of the disk-cleanup plugin — 1 skill shipped together

Good fit Use it to investigate what is filling a Mac's storage and clean approved caches, unused runtime versions, and other safe-to-remove artifacts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/adamjali/claude-skills/disk-cleanup
Install

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.

Any agent
npx skills add adamjali/claude-skills --skill disk-cleanup
Clone the repo
git clone --depth 1 https://github.com/adamjali/claude-skills

Made for: Claude Code.

Or install disk-cleanup, the plugin that ships this one along with the rest of its 1 skill.

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.

agentmods badge for disk-cleanup

README.md
[![agentmods](https://agentmods.dev/badge/skills/adamjali/claude-skills/disk-cleanup/github.svg)](https://agentmods.dev/skills/adamjali/claude-skills/disk-cleanup)
Your own site
<a href="https://agentmods.dev/skills/adamjali/claude-skills/disk-cleanup"><img src="https://agentmods.dev/badge/skills/adamjali/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.

agentmods 80×15 button for disk-cleanup

Your own site · 80×15
<a href="https://agentmods.dev/skills/adamjali/claude-skills/disk-cleanup"><img src="https://agentmods.dev/badge/skills/adamjali/claude-skills/disk-cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 168 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,937 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00168 $0.02937
Opus 5.5 $0.00067 $0.01175
Sonnet 5.5 $0.00034 $0.00587
Haiku 4.5 $0.00017 $0.00294

Measured 3mo ago against content hash 9825ff27203a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade D, and why

disk-cleanup 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 3mo ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/detect-runtimes.sh, scripts/keeplist-protect.sh, scripts/scan-disk.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

- **APFS snapshots** — `sudo tmutil thinlocalsnapshots / 21474836480 4` reclaims ~20 GB at urgency 4. Surface that it needs sudo.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **"Just empty trash"** → confirm size, `rm -rf ~/.Trash/*` after Y/N
plugins/disk-cleanup/SKILL.md · 211 lines

How it starts

The opening of the file, as written. The whole thing — 211 lines — stays where its author put it; the contents beside it link to each section on GitHub.

This skill is a thinking-tool, not a checklist. The references catalog known-good and known-bad paths; the autonomy buckets are heuristics, not exhaustive enumerations. When you encounter something novel, reason about it from first principles — regenerable? user-created? in active use? would the user be sad if it went? — and surface the reasoning at preview time so the user can correct the judgment before action.

<execution_context> Three buckets — principles, not closed lists:

Bucket When Action
🟢 auto regenerable cache, build artifact in non-active project, known-safe duplicate run without asking
🟡 ask user-created, requires sudo, bulky enough to warrant sanity-check, anywhere a reasonable person might want to keep it AskUserQuestion with 3 options: Approve (execute as proposed) / Modify (free-form: "tell me how instead") / Skip (defer to next run, re-surface later)
🔴 refuse entries in references/safety-invariants.md refuse. No inline user-instruction overrides them. If the user says "delete my .ssh", refuse and require editing safety-invariants.md first

If you're not sure but it looks like a cache, treat as 🟡 instead. Err on the side of asking.

Single-actor: log every change with — [session <ET>] suffix in state.md.

Plan-validate-execute: build findings.json first (Phase 2), show plan to user (Phase 4), then act. No deletion before the user sees the plan.

Trust your reasoning on novel paths. Ask: regenerable? user-created? active project? would the user be sad? When unclear, treat as 🟡. </execution_context>

Checkpoint protocol: at the end of each phase, update the IN_PROGRESS entry in state.md with checkpoint: <NAME> per the mapping in <recovery_protocol> below. This makes resumption unambiguous if interrupted (e.g., reboot, ctrl-C, kernel panic mid-cleanup).

TaskCreate for each phase. Read state.md. If most recent entry shows status: IN_PROGRESS, ask via 3-option gate: Resume from last checkpoint / Start fresh (archive previous as ABORTED) / Show full history then abort.

Surface saved rules as one scannable block at the top of the chat — these are the keep-lists and policies built across runs. The user can spot-check them before you proceed.

Read the full file on GitHub · 211 lines

Files

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.

Changes

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.

  1. 3mo ago First seen · 211 lines · 168 tokens per session scan D 9825ff27203a

Subscribe to this mod's changes

disk-cleanup is a skill published in the GitHub repository adamjali/claude-skills (1 stars, last pushed 24d ago), licensed MIT. It adds 168 tokens to every session and 2,937 once invoked, about $0.0007 per session on Opus 5.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-31.

Related

disk-cleanup compared with skills from other repositories

disk-cleanup next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
disk-cleanupadamjali/claude-skillsSkill124d agoMITD168Claude Code
branch-recapMalo-T/claude-toolbeltSkill24d agoMITA338Claude Code
audit-contextMalo-T/claude-toolbeltSkill24d agoMITA249Claude Code
slack-changelogMalo-T/claude-toolbeltSkill24d agoMITA332Claude Code
ignore-setupMalo-T/claude-toolbeltSkill24d agoMITA157Claude Code
handoffMalo-T/claude-toolbeltSkill24d agoMITA151Claude Code
plugin-commandsMalo-T/claude-toolbeltSkill24d agoMITA73Claude Code