agentleFS
alvaroofernaandezalvaroofernaandez/aval/skills/mac-disk-cleanup/SKILL.md

mac-disk-cleanup

Skill5 starsChanged 2 days agoMITView on GitHub

Trigger: liberar espacio, disco lleno, limpiar caches, free disk space, docker ocupa mucho. Reclaim macOS disk space safely: caches, build artifacts, Kiri Docker data.

9 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    NEVER delete: Docker images/volumes/containers, ~/.local/share/opencode/opencode.db, Steam games, WhatsApp data, without asking.

    line 17
  2. Very specific:

    Before deleting images, list them (repo:tag, size, age) and recommend keeping the current/latest tag.

    line 21

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Activation Contract

Load when the user asks to free disk space on this Mac, says the disk is full, or asks to clean caches or Docker data.

Hard Rules

  • Measure free space (df -h /System/Volumes/Data) BEFORE and AFTER; report both.
  • Regenerable caches (Tier 1) need no confirmation. Everything else needs explicit user approval, item by item.
  • NEVER delete: Docker images/volumes/containers, ~/.local/share/opencode/opencode.db, Steam games, WhatsApp data, without asking.
  • Docker runs only on Kiri (OrbStack and Colima are retired). Delegate all Docker cleanup to the docker-space-optimizer skill; never install or start OrbStack or Colima.
  • zsh does not word-split variables: write docker --context X ... literally, never $C rmi.
  • Report the active docker context at the end (must be kiri).
  • Before deleting images, list them (repo:tag, size, age) and recommend keeping the current/latest tag.

Decision Gates

FindingAction
Tier 1 cachesDelete directly
Docker build cache / imagesLoad docker-space-optimizer
Old image tags / big appsList + recommend + ask

Execution Steps

  1. Baseline df; measure paths in references/targets.md with du -sh; run docker context ls, docker system df.
  2. Tier 1: run the cache commands in references/targets.md.
  3. Docker: follow docker-space-optimizer (safe prunes via aval docker cleanup; it ends with an fstrim of the VM disk; measure ~/Library/Application Support/Kiri/vm/data.img before/after). If only trimming is wanted, use the manual trim in that skill.
  4. Present Tier 2 candidates (images, big dirs) as a table with sizes; delete only what the user approves.
  5. Final df; note that shared image layers may free ~0 B even when many tags are removed.

Output Contract

Return: before/after free space, what was deleted with sizes, what was left untouched and why, the remaining biggest consumers, and the active docker context.

References

  • references/targets.md — paths, cleanup commands, and history of past passes.
  • ../docker-space-optimizer/SKILL.md — Docker/Kiri cleanup.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.