Skip to content
Back to skills

Mac Disk Cleanup

ASecurity

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

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 9, 2026
ai-agentsdocker

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 20, 2026

npx -y skills add alvaroofernaandez/dotfiles --skill mac-disk-cleanup --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mac Disk Cleanup?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mac Disk Cleanup
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alvaroofernaandez-mac-disk-cleanup/badge)](https://www.skillsdirectory.com/skills/alvaroofernaandez-mac-disk-cleanup)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: mac-disk-cleanup
description: "Trigger: liberar espacio, disco lleno, limpiar caches, free disk space, docker ocupa mucho. Reclaim macOS disk space safely: caches, build artifacts, Kiri Docker data."
metadata:
  author: "alvaroofernaandez"
  version: "1.0"
---

## 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

| Finding | Action |
|---|---|
| Tier 1 caches | Delete directly |
| Docker build cache / images | Load `docker-space-optimizer` |
| Old image tags / big apps | List + 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 its `scripts/cleanup.sh`; 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.

Files in this skill

  • SKILL.md2.2 KB
  • references/targets.md4.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.