macos-cleaner

macos-cleaner is a skill for Claude Code from daymade/claude-code-skills. It costs 131 tokens per session (4,107 once invoked), scanned C, original, MIT.

A macOS storage diagnostic and cleanup guide. It helps identify what is using disk space and reclaim approved space safely.

In plain words
What is it for?
Use it to investigate caches, logs, leftover application files, large or duplicate files, Docker and OrbStack data, Homebrew, development packages, Xcode, and Apple Content Caching.
Why use it?
It reduces the risk of deleting needed files or disrupting services while trying to free storage. It also focuses investigation on the most likely source instead of scanning everything blindly.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Codex.

Part of the daymade-macos plugin — 4 skills shipped together

About the project

Claude Code Skills Marketplace is a collection and marketplace of skills, plugins, agents, and instructions that extend Claude Code with specialized development workflows. It is for developers who want to install existing workflows or create, validate, and package their own Claude Code skills.

daymade/claude-code-skills · 1,377 stars · on GitHub

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/daymade/claude-code-skills/macos-cleaner
Any agent
npx skills add daymade/claude-code-skills --skill macos-cleaner
Clone the repo
git clone --depth 1 https://github.com/daymade/claude-code-skills

Made for: Claude Code.

Or install daymade-macos, the plugin that ships this one along with the rest of its 4 skills.

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 macos-cleaner

README.md
[![agentmods](https://agentmods.dev/badge/skills/daymade/claude-code-skills/macos-cleaner.svg)](https://agentmods.dev/skills/daymade/claude-code-skills/macos-cleaner)
Your own site
<a href="https://agentmods.dev/skills/daymade/claude-code-skills/macos-cleaner"><img src="https://agentmods.dev/badge/skills/daymade/claude-code-skills/macos-cleaner.svg" alt="Measured on agentmods" height="20"></a>
Per session 131 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,107 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00131 $0.04107
Opus 5 $0.00066 $0.02054
Sonnet 5 $0.00026 $0.00821
Haiku 4.5 $0.00013 $0.00411

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

Security

Grade C, and why

macos-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 2d ago.

The scan reads SKILL.md. This mod also ships 10 executable files (scripts/analyze_caches.py, scripts/analyze_code_sign_clones.py, scripts/analyze_dev_env.py, …), 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.

Recursive force deletehighDestructive command

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

7. **Avoid broad destructive shell forms.** Do not recommend or execute broad `rm -rf` or glob deletion. For exact approved ordinary files, prefer Finder Trash. The bundled legacy helper permanently deletes and has only
daymade-macos/macos-cleaner/SKILL.md · 228 lines

How it starts

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

macOS Cleaner

Diagnose the actual source of disk pressure, reclaim only approved space, and prove that the cleanup did not damage user data or co-resident services.

Entry router

Choose the narrowest path that can answer the request:

User signal Route
Apple Content Caching, AssetCacheManagerUtil, CacheUsed, ActualCacheUsed, iCloud cache, or “Caching needs more space” Read references/apple_content_caching.md completely before probing or proposing commands
Docker, OrbStack, images, containers, or volumes Read references/docker_analysis.md; inspect every object and never use prune-family commands
Docker build cache Measure with docker builder du; this skill reports it but does not delete it because Docker exposes category-wide prune controls rather than per-record intent
Chrome, ChromeDriver, Playwright, Codex Computer Use, Edge, or Chromium has large *.code_sign_clone directories Read references/chromium_code_sign_clones.md completely; use the bundled analyzer to separate active, inactive, and unknown exact children and never equate du with physical release
A named cache, directory, application, or service is already the suspect Inspect that target first and read the matching semantics in references/cleanup_targets.md; do not start a home-directory or whole-disk scan
The source is genuinely unknown Use the general analysis workflow below; Mole is optional, not the universal first step

User-provided scope exclusions override every generic scan suggestion. Do not inspect personal directories, credentials, databases, application state, or unrelated services when the user excludes them.

Safety and authorization contract

  1. Separate observation from mutation. Complete a read-only diagnosis first. Do not delete, stop a service, edit settings, install or upgrade tools, or run a cleanup preview that may mutate state during that phase.
  2. Confirm the exact target. On a remote Mac, record the current host identity before any other work. Never infer the machine from an IP, old PID, directory name, or prior report.
  3. Plan before asking. Before any state change, list every command, what it changes, expected physical space reclaimed, impact, recoverability, and postconditions. Then stop if the user requested a plan-only phase.
  4. Require explicit approval. If the user supplies an exact confirmation phrase, require that phrase. Otherwise ask for unmistakable approval of the listed commands and targets. Approval for one plan does not authorize a fallback or a wider cleanup.
  5. Use precise supported controls. Prefer an application's supported cache-management command or an exact object ID. If no supported control exists, an exact application-owned cache directory may be removed only after verifying its owner, confirming the application is stopped or the directory is otherwise inactive, explaining rebuild/redownload impact, and receiving approval. Never target a broad cache root or active application state.
  6. Never use Docker prune-family commands. This includes image, container, volume, system, builder, and buildx prune. Category-wide deletion cannot express per-object user intent.
  7. Avoid broad destructive shell forms. Do not recommend or execute broad rm -rf or glob deletion. For exact approved ordinary files, prefer Finder Trash. The bundled legacy helper permanently deletes and has only the limited guards documented below; never treat it as equivalent to Trash.
  8. Preserve valuable state. Never target user documents, credentials, SSH material, active databases, application configuration, or running-service state merely to increase the reported savings. Read references/safety_rules.md before any file deletion.
  9. Execution follows the user's authorization. If the user asks only for analysis or wants to run commands personally, hand off the commands. If the user asks the agent to fix the machine and explicitly confirms the scoped plan, execute the exact approved commands and verify them. Unattended recurring deletion logic needs separate approval before it is written or enabled.
  10. Fail fast. An unexpected non-zero command, a mismatched postcondition, an unexpected target, or a changed dependency stops the cleanup. Interpret documented probe statuses such as lsof exit 1 with empty output before deciding they are failures. Report the partial state; do not improvise a fallback.

Read the full file on GitHub · 228 lines

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. 2d ago Changed · +11 lines · +7 tokens per session ab35282f939a
  2. 6d ago First seen · 217 lines · 124 tokens per session scan C 2dd06264a3b3

Subscribe to this mod's changes

macos-cleaner is a skill published in the GitHub repository daymade/claude-code-skills (1,377 stars, last pushed yesterday), licensed MIT. It adds 131 tokens to every session and 4,107 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.