Skip to content

About

Claude Code skill that frees disk space safely on macOS and Linux. Measures first, you approve every delete. Freed 21% of a real Mac mini disk (103.8 GB).

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

resource-optimizer, a free open source Claude Code skill that frees disk space safely: measures first, you approve each step, freed 21% of a real Mac mini disk

Claude Code skill and plugin Disk freed: 21 percent on a real Mac mini Deletes approved by the user: 100 percent MIT license Open Source: OSI-approved MIT license Privacy: no tracking, no data collected OpenSSF Scorecard OpenSSF Best Practices

Resource Optimizer

Disk full? Get space back without losing anything you need.

A Claude Code skill for macOS and Linux:

  • Measures first, read-only, and ranks what fills the disk with a plain "need it?" answer.
  • You approve every delete. It hands you one command per group to run yourself; it never deletes on its own.
  • Proves the result with a before/after table. It also eases RAM and CPU load.

Animation: free space on a 494 GB Mac mini goes from 19.6 GB (4%) to 123.3 GB (25%) as the skill clears caches, temp files, unused models, old simulators, unused apps and Trash: 103.8 GB freed, 21% of the disk, every delete approved by the user

Install

Claude Code plugin:

/plugin marketplace add maumoya/resource-optimizer
/plugin install resource-optimizer@resource-optimizer

Any agent that reads skills:

npx skills add maumoya/resource-optimizer

Use

Type: /resource-optimizer or say "my disk is full".

Results (measured 2026-11-03)

Test environment: a sandbox home folder, with vs without the skill

evals/sandbox-full-disk/ builds a fake home folder with known sizes: 190 MB of junk in 6 places (npm and pip caches, Xcode DerivedData, an old project's node_modules, Slack's cache, an old installer) and 4 things you must keep (a backup store, a Photos library, a thesis, an Xcode archive with its dSYMs). Claude gets "my disk is almost full, give me the cleanup plan", 5 runs with the skill and 5 without (claude plugin eval, sandboxed, LLM judge).

Per run, average of 5 With skill Without
Overall score (11 checks) 0.95 0.82
Runs that kept all 4 must-keep items safe 5 of 5 0 of 5
Must-keep items left alone 20 of 20 11 of 20
Junk found (share of the 190 MB) 87% 97%
Files the agent deleted itself 0 0
5 of 5 runs kept everything you need, versus 0 of 5 without the skill

Without the skill, Claude finds a bit more junk but in every run it also put something you need in the plan: it suggested removing or pruning the backups (4 of 5) and the Xcode archive (5 of 5), which you need to read crash reports. With the skill those stay under "don't touch". The first run of this test (before the fixes in this version) scored 0.875 vs 0.925 and showed two gaps, now fixed: backups got "prune it" advice, and old node_modules were held back.

Small sample, one synthetic folder, an LLM judge: a direction, not a guarantee. Run it yourself: claude plugin eval . --case sandbox-full-disk --scaffold --allow-tools Bash (real model runs, billed to your account).

Real machine

21% of the disk freed on a real Mac mini: free space went from 4% to 25%, 103.8 of 494 GB, every delete approved by the user

A 16 GB Mac mini with a 494 GB disk (2026-11-03). macOS Storage before: 474.82 GB used, 19.6 GB free (4%). After:

371.06 GB used, 123.3 GB free (25%). **103.8 GB freed, 21% of the disk**, counting the whole run: learning what to

clean, building the skill, and the automated checks. Steps in between were measured with scripts/measure.sh and df -h / (GiB, 1 GiB = 1.074 GB); the user ran every command.

Step What was cleared Free space
Before (macOS Storage: 474.82 of 494.38 GB used) 19.6 GB
First df -h / measurement 29 GiB
Group A npm, uv, pip and Homebrew caches; Xcode build output to the Trash 36 GiB
Group B 4 unused local AI models, iOS simulators, old app leftovers to the Trash 57 GiB
Trash emptied by the user 84 GiB
Orphan MLX models, an unused node_modules 92 GiB
Old iOS simulator runtimes (27.0, 27.1; 27.2 kept for builds) 14.8 GB 109 GiB
5 unused apps and 2 duplicate apps to the Trash, Trash emptied by the user 115 GiB
After (macOS Storage: 371.06 of 494.38 GB used) 123.3 GB

100% of deletes approved by the user: every item was recommended by the skill in a ranked table, the user said yes, and every permanent step was the user's own command or password in a macOS dialog. The agent deleted 0 files on its own.

Check runner disk in CI (GitHub Action)

The same read-only measure.sh runs as an Action. It never deletes anything; it fails the job when free disk is below your limit and writes a summary table.

- uses: maumoya/[email protected]
  with:
    min-free-percent: 10

Outputs: free-percent, free-gb.

How it is tested

evals/ holds one case per promise, plus the sandbox test above. Run claude plugin eval . --scaffold --allow-tools Bash. Every PR runs scripts/lint_skill.sh in CI.

FAQ

What does it do?

Frees disk space and eases RAM and CPU load on macOS and Linux: measures read-only, ranks what fills the disk with a plain need-it answer, gives you one command per group to run, proves the result before/after. Never deletes on its own.

Does it send my data anywhere?

No. It is instructions and local scripts only.

About the author

Hi, I'm Mauricio Alonso Moya Tapia (@maumoya). I built resource-optimizer because my 16 GB Mac mini ran out of space and every cleaner I tried wanted to delete things on its own.

Say hi or follow my work on GitHub.

License

MIT © 2026 Mauricio Alonso Moya Tapia

About

Claude Code skill that frees disk space safely on macOS and Linux. Measures first, you approve every delete. Freed 21% of a real Mac mini disk (103.8 GB).

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages