Agent skill

Mac Storage Cleaner

by davila7 in davila7/claude-code-templates

Safely reclaim disk space on a Mac — the trustworthy, transparent, reversible alternative to CleanMyMac and similar tools.

MITAuto-check: warnings

Install Mac Storage Cleaner

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add davila7/claude-code-templates --skill mac-storage-cleaner -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davila7/claude-code-templates mac-storage-cleaner --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davila7/claude-code-templates.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cli-tool/components/skills/productivity/mac-storage-cleaner .claude/skills/mac-storage-cleaner && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mac-storage-cleaner
GitHub stars
33k
Token cost
~2k tokens
SKILL.md length
917 words
Files
7 (incl. scripts, references)
Skills in repo
479
Repo updated
First seen
Licence
MIT

At a glance

Safely reclaim disk space on a Mac — the trustworthy, transparent, reversible alternative to CleanMyMac and similar tools.

  • Works in 5 steps: Survey — caches (always first, read-only) → Clear the safe tier (no per-item… → Surface the "ask" tier — recommend,… → …
  • The user says their Mac disk
  • SKILL.md covers Core principles, Workflow and Safety rules
  • Runs Shell scripts from its folder; calls bash, brew and docker

What it does

Mac Storage Cleaner is an agent skill from davila7/claude-code-templates. Safely reclaim disk space on a Mac — the trustworthy, transparent, reversible alternative to CleanMyMac and similar tools. Use whenever the user says their Mac disk or storage is full or nearly full, gets a "startup disk almost full" / low-storage warning, asks to free up space, clean/clear caches, remove junk, delete leftover files from apps they uninstalled, or find what's eating their disk — in any language (e.g. English "my mac is out of space", "free up disk", "clear caches", "what's taking up my storage"…

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts and reference files (for example `references/cache-catalog.md`, `scripts/clean-safe.sh` and `scripts/find-extras.sh`).

The repository describes itself as: CLI tool for configuring and monitoring Claude Code. The licence is MIT.

When your agent uses it

  • The user says their Mac disk
  • Storage is full
  • Gets a startup disk almost full / low-storage warning
  • Asks to free up space

Example prompts

  • “startup disk almost full”
  • “s eating their disk — in any language (e.g. English”
  • “free up disk”
  • “/mac-storage-cleaner”

Requirements

  • A Bash shell
  • Docker

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Survey — caches (always first, read-only)
  2. Clear the safe tier (no per-item permission needed)
  3. Surface the "ask" tier — recommend, don't delete
  4. Go beyond caches — the space the cleaners miss (read-only scan)
  5. Report

What it can do on your machine

Read from SKILL.md and the folder at commit c0ca7da. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 5 files in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • bash
    • brew
    • docker
    • xcrun

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use docker, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mac Storage Cleaner loads about 2k tokens when it runs, and up to ~4.9k if it reads all its reference files. Until then it costs about 223 tokens; SKILL.md has 917 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~223
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:131
    data, whole app-support folders, `~/.ssh`/`~/.aws`/keychains, Time Machine

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from davila7/claude-code-templates at commit c0ca7da, republished under its MIT licence (© davila7). 917 words, ~2,041 tokens.

Download SKILL.mdSave it as .claude/skills/mac-storage-cleaner/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
mac-storage-cleaner
description
Safely reclaim disk space on a Mac — the trustworthy, transparent, reversible alternative to CleanMyMac and similar tools. Use whenever the user says their Mac disk or storage is full or nearly full, gets a "startup disk almost full" / low-storage warning, asks to free up space, clean/clear caches, remove junk, delete leftover files from apps they uninstalled, or find what's eating their disk — in any language (e.g. English "my mac is out of space", "free up disk", "clear caches", "what's taking up my storage"; Georgian "ქეში გაასუფთავე", "მეხსიერება გადამევსო", "ადგილი აღარ მაქვს"). Surveys usage first, auto-clears only pure caches, moves anything riskier to the Trash (restorable), asks before anything expensive, logs every deletion, and reports what was freed. Do NOT use for cloud storage, RAM/memory-pressure, or a single named app's own in-app cache button.

Mac Storage Cleaner

Free disk space the way a careful engineer would, and earn the trust one-click cleaners lose: measure first, delete only what provably regenerates, make anything riskier reversible, ask before anything expensive, log every action, and report honestly. The differentiator over CleanMyMac-style tools is judgment and transparency — the user sees what will go and why, and can undo it.

Scripts live in scripts/; the full tiered inventory, exact reclaim commands, and gotchas are in references/cache-catalog.md. Read the catalog whenever you hit something a script didn't classify or you need the precise command.

Core principles

  • Safe tier → delete outright (space back immediately). These are pure caches; the only cost is a slower next build/install.
  • Everything else → Trash, not rm. Ask-tier items, app leftovers, big files — move them to the Trash with trash-items.sh so the user can restore them. Reversibility is the whole point; never hard-delete a user's data.
  • When unsure, demote a tier. A slower rebuild is trivial; deleting a license, an unpushable Xcode archive, or someone's only local backup is not.
  • Every destructive run is logged to ~/Library/Logs/mac-storage-cleaner/operations.log.

Workflow

Locating the scripts. The commands below resolve $D to this skill's own directory so they work whether the skill was installed as a plugin ($CLAUDE_PLUGIN_ROOT is set) or as a standalone skill (~/.claude/skills/…). Shell state doesn't persist between commands, so each block re-resolves $D.

1. Survey — caches (always first, read-only)
bash
D="${CLAUDE_PLUGIN_ROOT:+$CLAUDE_PLUGIN_ROOT/skills/mac-storage-cleaner}"; D="${D:-$HOME/.claude/skills/mac-storage-cleaner}"
bash "$D/scripts/survey.sh"

Prints free space and sizes every cache that exists on this machine, grouped safe / ask / never / app-data. Never skip it — locations and sizes differ on every Mac. Note current free space for the before/after report.

2. Clear the safe tier (no per-item permission needed)

Tell the user briefly what the safe tier removes and roughly how much it frees, then:

bash
D="${CLAUDE_PLUGIN_ROOT:+$CLAUDE_PLUGIN_ROOT/skills/mac-storage-cleaner}"; D="${D:-$HOME/.claude/skills/mac-storage-cleaner}"
bash "$D/scripts/clean-safe.sh"

Removes only the vetted safe allowlist (nothing else — the survey's "other large caches" list is for the user to review, not for auto-deletion), handles read-only files, skips anything macOS protects (reporting rather than failing), runs brew cleanup -s --prune=all and removes unavailable simulators, logs each deletion, and prints what it reclaimed. If the user only wanted specific items, delete those directly instead.

Browser & Electron app caches (Chrome/Arc/Slack/VS Code/…) are safe but live inside app-data folders — clear only the Cache/Code Cache/GPUCache subfolders the survey lists, ideally with the app quit, and never the whole app folder. Exact paths: references/cache-catalog.md.

3. Surface the "ask" tier — recommend, don't delete

Big but not free caches (Docker images, ML models, simulator devices, Xcode Archives, module stores). List each with size + a specific recommendation; let the user choose. Use the tool-native command, and prefer Trash for file deletions. Key ones (full detail in the catalog):

  • Docker — docker system prune -a, never rm the VM disk.
  • ML models (HuggingFace/Ollama) — often duplicated variants; offer to remove unused ones.
  • Simulators — only xcrun simctl delete unavailable is safe; deleting active devices wipes state.
  • Xcode Archives — warn: holds dSYMs for crash symbolication and shippable builds.
Show full SKILL.md (432 more words)Show less
4. Go beyond caches — the space the cleaners miss (read-only scan)
bash
D="${CLAUDE_PLUGIN_ROOT:+$CLAUDE_PLUGIN_ROOT/skills/mac-storage-cleaner}"; D="${D:-$HOME/.claude/skills/mac-storage-cleaner}"
bash "$D/scripts/find-extras.sh"

Surfaces the real hogs a cache sweep ignores: leftover data from uninstalled apps, big files (>500MB), stale installers (.dmg/.pkg), and old Downloads. Everything here is ask-tier — present candidates, let the user pick, then remove reversibly:

bash
D="${CLAUDE_PLUGIN_ROOT:+$CLAUDE_PLUGIN_ROOT/skills/mac-storage-cleaner}"; D="${D:-$HOME/.claude/skills/mac-storage-cleaner}"
bash "$D/scripts/trash-items.sh" "/path/one" "/path/two"

If trashing reports "could NOT trash (permissions/TCC?)" for every item, the controlling app hasn't been granted Automation control of Finder — a normal first-run state. Tell the user to allow it in System Settings › Privacy & Security › Automation (enable Finder for the terminal/app), then re-run; or move the item to the Trash manually in Finder. Don't report space as freed when items logged trash-failed — nothing was actually removed.

App leftovers need verification. The scan lists containers whose owning app a quick check couldn't confirm is installed — but Spotlight misses un-indexed apps, so some candidates are still installed. Before proposing to remove any leftover, confirm the app is really gone (check /Applications, mdfind, or just ask the user "do you still use X?"), and always Trash it, never rm. To also clear a confirmed-uninstalled app's other leftovers (Preferences, Application Support, Logs, Saved State, etc.), see the leftover-location list in the catalog.

5. Report

In the user's language: before → after free space (df -h /System/Volumes/Data), a short list of what was cleared/trashed with sizes, a one-line note that the first build/install afterward will be slower, the still-large "ask" items each with a recommendation, and the log path.

If free space rose less than the reclaimed size suggests, explain APFS purgeable space: macOS may hold freed space as purgeable (often behind Time Machine local snapshots) and release it on demand — the space is genuinely recovered. Don't chase it with sudo.

Safety rules

Read references/cache-catalog.md for the full tiered inventory and gotchas. The essentials:

  • Never delete user data that looks like storage: iOS backups (~/Library/Application Support/MobileSync/Backup), Photos library, Mail/Messages data, whole app-support folders, ~/.ssh/~/.aws/keychains, Time Machine snapshots. Report their size so the user knows, but don't touch them.
  • Messaging-app media is user data, not cache. Telegram/WhatsApp/Slack store downloaded photos/videos in their caches. Don't bulk-delete these; point the user to the app's own "Clear Cache" (e.g. Telegram › Settings › Data and Storage › Storage Usage) so they choose what to drop.
  • Never sudo into /System, /Library/Caches, /private/var/folders, or SIP-protected areas — that's macOS's job.
  • Watch mixed directories: ~/.cargo (has installed binaries — only clear registry/), ~/.m2 (has settings.xml — only clear repository/), ~/.gradle (only caches/). ~/.npm is pure cache so it's fine whole.
  • Continue past errors and verify with du; rm -rf on multiple paths keeps going after a failure, so never assume total success or total failure.

© davila7, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (scripts, references) in cli-tool/components/skills/productivity/mac-storage-cleaner of davila7/claude-code-templates.

  • SKILL.md
  • references/cache-catalog.md
  • scripts/clean-safe.sh
  • scripts/find-extras.sh
  • scripts/lib.sh
  • scripts/survey.sh
  • scripts/trash-items.sh

Open the folder on GitHubat commit c0ca7da

Compare with similar skills

Mac Storage Cleaner next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mac Storage Cleaner compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mac Storage Cleaner this skilldavila7/claude-code-templates33k—~2kAutomated safety check: WarnMIT
Protocol Reversezhaoxuya520/reverse-skill41k2 repos~620Automated safety check: WarnMIT
macOS Reversezhaoxuya520/reverse-skill41k2 repos~366Automated safety check: PassMIT
Protocol Reversesickn33/agentic-awesome-skills47k1 repos~689Automated safety check: PassMIT
macOS Reversesickn33/agentic-awesome-skills47k1 repos~466Automated safety check: PassMIT
JS Reversesickn33/agentic-awesome-skills47k1 repos~1.8kAutomated safety check: PassMIT

Similar skills

  • Protocol Reverse

    zhaoxuya520/reverse-skill

    A skill your agent uses for authorized reverse engineering of custom binary protocols, Protobuf/gRPC, WebSocket frames, and PCAP-driven protocol recovery.

    41k GitHub starsUsed in 2 repos~620 tokens
    Backend & APIsAuto-check: warnings
  • macOS Reverse

    zhaoxuya520/reverse-skill

    A skill your agent uses for authorized macOS and Mach-O reverse engineering including codesign, Objective-C/Swift recovery, endpoint security surfaces, and Apple platform malware analysis.

    41k GitHub starsUsed in 2 repos~366 tokens
    SecurityAuto-check passed
  • Protocol Reverse

    sickn33/agentic-awesome-skills

    Authorized reverse engineering of custom binary protocols, Protobuf/gRPC schemas, WebSocket frames, and PCAP-driven protocol recovery.

    47k GitHub starsUsed in 1 repo~689 tokens
    Backend & APIsAuto-check passed
  • macOS Reverse

    sickn33/agentic-awesome-skills

    Authorized macOS and Mach-O reverse engineering: codesign inspection, Objective-C/Swift recovery, endpoint-security surfaces, and Apple-platform malware analysis.

    47k GitHub starsUsed in 1 repo~466 tokens
    SecurityAuto-check passed
  • JS Reverse

    sickn33/agentic-awesome-skills

    Front-end JavaScript reverse engineering: locate signature chains, analyze encrypted request parameters, sample runtime behavior, and reproduce logic locally in Node for evidence-based output.

    47k GitHub starsUsed in 1 repo~1.8k tokens
    SecurityAuto-check passed
  • Mobile Reverse

    sickn33/agentic-awesome-skills

    Authorized Android/iOS application reverse engineering and security testing: APK/IPA analysis, runtime instrumentation (Frida/Objection), SSL-pinning and jailbreak/root-detection bypass, per OWASP…

    47k GitHub starsUsed in 1 repo~1.5k tokens
    SecurityAuto-check passed

More from davila7/claude-code-templates

All 479 skills in this repo
  • Perplexity Web Search

    davila7/claude-code-templates

    Runs web-grounded searches through Perplexity's Sonar models over OpenRouter for current events, recent literature and cited facts beyond the model's training cutoff.

    33k GitHub starsUsed in 11 repos~3.5k tokens
    Auto-check: notes
  • Neuropixels Data Analysis

    davila7/claude-code-templates

    Analyzes Neuropixels recordings from SpikeGLX or Open Ephys through preprocessing, drift correction, Kilosort4 spike sorting, quality metrics and curation.

    33k GitHub starsUsed in 9 repos~2.8k tokens
    Auto-check passed
  • Scientific Venue Templates

    davila7/claude-code-templates

    Supplies LaTeX templates and formatting rules for journals, conferences, posters, and grant proposals, then can check a draft against them.

    33k GitHub starsUsed in 9 repos~5.1k tokens
    Auto-check: notes
  • Brand Voice Content Creator

    davila7/claude-code-templates

    Analyzes a brand's existing writing to lock in a consistent voice, then builds SEO blog posts and platform-specific social content around it.

    33k GitHub starsUsed in 3 repos~1.9k tokens
    Auto-check passed
  • CAPA Officer

    davila7/claude-code-templates

    Guides corrective and preventive action (CAPA) work in a quality management system, from initiation and root cause analysis through effectiveness verification.

    33k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Fda Consultant Specialist

    davila7/claude-code-templates

    Senior FDA consultant and specialist for medical device companies including HIPAA compliance and requirement management.

    33k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed

Questions about Mac Storage Cleaner

What does Mac Storage Cleaner do?

Safely reclaim disk space on a Mac — the trustworthy, transparent, reversible alternative to CleanMyMac and similar tools. Mac Storage Cleaner is an agent skill from davila7/claude-code-templates. Safely reclaim disk space on a Mac — the trustworthy, transparent, reversible alternative to CleanMyMac and similar tools.

When should I use Mac Storage Cleaner?

Mac Storage Cleaner fits situations like: the user says their Mac disk; storage is full; gets a startup disk almost full / low-storage warning; asks to free up space.

How do I install Mac Storage Cleaner in Claude Code?

Run `npx skills add davila7/claude-code-templates --skill mac-storage-cleaner -a claude-code`. Or copy the skill folder (cli-tool/components/skills/productivity/mac-storage-cleaner in davila7/claude-code-templates) into .claude/skills/mac-storage-cleaner in your project. Claude Code loads it when a task matches its description.

How do I install Mac Storage Cleaner in Codex?

Run `npx skills add davila7/claude-code-templates --skill mac-storage-cleaner -a codex`. Or copy the skill folder (cli-tool/components/skills/productivity/mac-storage-cleaner in davila7/claude-code-templates) into .agents/skills/mac-storage-cleaner in your project. Codex loads it when a task matches its description.

Can I use Mac Storage Cleaner in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davila7/claude-code-templates --skill mac-storage-cleaner -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mac-storage-cleaner, .gemini/skills/mac-storage-cleaner, .github/skills/mac-storage-cleaner and .opencode/skills/mac-storage-cleaner in your project.

What does Mac Storage Cleaner need to run?

Going by SKILL.md and its folder, Mac Storage Cleaner needs a shell for the scripts in its folder and the command-line tools its instructions call (bash, brew, docker and xcrun). Our summary lists: A Bash shell; Docker.

Does Mac Storage Cleaner access the network?

SKILL.md contains no URLs. Its commands use docker, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Mac Storage Cleaner safe to install?

Our automated static check of SKILL.md flagged 1 warning(s): mentions a credentials file (ssh keys, cloud or package-manager tokens). Read the flagged lines before installing; the check is not a guarantee either way. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Mac Storage Cleaner use?

Mac Storage Cleaner is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mac Storage Cleaner use?

About 2k tokens (SKILL.md is roughly 8.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.9k tokens, read only when the agent opens those files.

What are the alternatives to Mac Storage Cleaner?

Skills that share tags, products or a category with Mac Storage Cleaner: Protocol Reverse (zhaoxuya520/reverse-skill, 41k stars), macOS Reverse (zhaoxuya520/reverse-skill, 41k stars), Protocol Reverse (sickn33/agentic-awesome-skills, 47k stars) and macOS Reverse (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mac Storage Cleaner?

davila7 (a GitHub user) maintains it in davila7/claude-code-templates, which has 32,512 GitHub stars. The repository holds 479 skills in this directory. The repository was last updated on October 10, 2026.

Source: davila7/claude-code-templates on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.