mac-disk-cleanup

mac-disk-cleanup is a skill for Claude Code, Codex from Mateeb11/skills. It costs 166 tokens per session (1,523 once invoked), scanned D, original, MIT.

A read-only macOS disk scan that finds reclaimable space such as caches, duplicates, build files, Docker data, simulators, and old downloads, then shows the findings for review.

In plain words
What is it for?
It is for checking what is using disk space, grouping findings by size and safety, and removing selected caches, rebuildable files, duplicates, or leftovers.
Why use it?
It helps locate large removable files without risking documents, source code, photos, mail, or other real data. Nothing is deleted until the user explicitly approves it.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: names the AskUserQuestion tool.

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.

agentmods
npx agentmods add skills/mateeb11/skills/mac-disk-cleanup
Any agent
npx skills add Mateeb11/skills --skill mac-disk-cleanup
Clone the repo
git clone --depth 1 https://github.com/Mateeb11/skills

Made for: Claude Code, Codex.

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 mac-disk-cleanup

README.md
[![agentmods](https://agentmods.dev/badge/skills/mateeb11/skills/mac-disk-cleanup.svg)](https://agentmods.dev/skills/mateeb11/skills/mac-disk-cleanup)
Your own site
<a href="https://agentmods.dev/skills/mateeb11/skills/mac-disk-cleanup"><img src="https://agentmods.dev/badge/skills/mateeb11/skills/mac-disk-cleanup.svg" alt="Measured on agentmods" height="20"></a>
Per session 166 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,523 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 findings. Scan, not verified.
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.00166 $0.01523
Opus 5 $0.00083 $0.00762
Sonnet 5 $0.00033 $0.00305
Haiku 4.5 $0.00017 $0.00152

Measured 5d ago against content hash fcb71e818250, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade D, and why

mac-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 5d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/scan.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.

- App Store apps and anything root-owned need the user's password — you can't `sudo` non-interactively. Tell the user to run `! sudo rm -rf "<path>"` themselves (the `!` prefix runs it in-session so the password prompt w

Recursive force deletehighDestructive command

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

- Some files are read-only; if `rm -rf` reports "Permission denied" / "Directory not empty", `chmod -R u+w <dir>` first, then retry.
skills/mac-disk-cleanup/SKILL.md · 75 lines

How it starts

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

Mac Disk Cleanup

Help the user reclaim disk space on macOS safely. The golden rule: you find and show, the user decides. Never delete anything the user hasn't explicitly approved, and only ever surface things that are genuinely safe to remove (caches, rebuildable artifacts, duplicates, leftovers) — never their actual documents, code, photos, mail, or app data.

Core principles (read these first)

  1. Scan is read-only. Deletion is interactive. The scan never deletes. After showing findings, ask the user what they want removed, then delete only those.
  2. Only surface SAFE-to-delete items. Safe = regenerates automatically (caches), is rebuildable (node_modules, build output), is a duplicate, or is a leftover (old versions, updater installers, orphaned temp files). When something holds real data (databases, mail, project source, photos, volumes), either leave it out or clearly label it "🔴 real data — review only" and never delete it without an explicit, specific yes.
  3. Always show before deleting. Present findings grouped by size and safety. Let the user see exactly what would go and how much it frees.
  4. The user has the call. Use the AskUserQuestion tool to let them pick categories/folders. Default to the safest option. Never assume "delete everything."
  5. Ask when unsure. If a folder's purpose or structure isn't clear (e.g. an unfamiliar app, an ambiguous project layout, something that might be real data), ask the user what it is before treating it as deletable. It's always better to ask than to delete something that mattered.
  6. Verify, don't claim. After deleting, re-measure and report the actual space freed. Never report something as cleaned without confirming it's gone.

Workflow

Step 1: Run the scan

Run the bundled scanner — it's read-only and prints findings grouped by category with sizes:

bash <skill-path>/scripts/scan.sh

It accepts optional flags:

  • --deep — also scans ~/Documents, ~/Desktop, ~/Developer, and other common project locations for node_modules and Python .venv directories (slower, but finds the biggest wins).
  • --path <dir> — scan an additional custom directory for project artifacts.

Read the full file on GitHub · 75 lines

Files

What ships with it

2 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. 5d ago First seen · 75 lines · 166 tokens per session scan D fcb71e818250

Subscribe to this mod's changes

mac-disk-cleanup is a skill published in the GitHub repository Mateeb11/skills (1 stars, last pushed 2mo ago), licensed MIT. It adds 166 tokens to every session and 1,523 once invoked, about $0.0008 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-31.

Related

Other skills, from other repositories

xcode-disk-cleanup

Audit and safely clean Xcode-related developer storage on macOS. Use whenever a developer mentions low disk space, Xcode storage, DerivedData, simulator devices or runtimes, stale beta platforms in Xcode Settings, DeviceSupport, archives, dSYMs, CocoaPods caches, simulator dyld caches, project .build folders…

AvdLee/Xcode-Disk-Cleanup-Agent-Skill · 147 tokens

macos-disk-cleanup

診斷並清理 macOS 磁碟空間,特別是「系統資料 / System Data」這類看不出內容的用量。涵蓋開發者工具殘骸(Xcode iOS DeviceSupport、Simulator runtime、DerivedData)、套件管理器快取(Homebrew、pnpm、pip、npm、cargo、go、uv)、容器與 VM 磁碟(Docker、podman、lima)、瀏覽器 profile、以及已移除 app 的孤兒 container。使用時機:(1) 使用者說磁碟快滿了、System Data 佔太多、想清空間 (2) 詢問某個資料夾或快取能不能刪 (3) 移除 app 後想清乾淨殘留檔案、完整解除安裝 (4) 想知道…

himynameisben/macos-disk-cleanup · 284 tokens

free-space

Free up disk space on a Mac safely. Scans for reclaimable space — app caches, developer caches (npm/uv/cargo/gradle/…), local AI models (Ollama/HuggingFace), Trash, Xcode build data, Docker images, leftover data from uninstalled apps, old nodemodules, and large stray files — then deletes only what the user approves.…

NikOneZ1/mac-space-cleaner · 115 tokens

peekaboo

Capture and automate macOS UI with the Peekaboo CLI.

JansenAnalytics/claudex · 17 tokens

notifications

Send notifications through the unified notification router.

vellum-ai/vellum-assistant · 9 tokens

gmail-trigger

Beta. Act on new Gmail as it arrives: get pinged only for urgent mail, digest newsletters, forward invoices — any standing instruction, across one or several accounts.

vellum-ai/vellum-assistant · 37 tokens