SHAHRIAR LABSIntelligence in Motion
    Back to Blog
    AI SkillsJune 7, 2026

    clean-my-mac: Safe Disk Cleanup for Dev Teams

    clean-my-mac is a staged, dry-run-safe macOS cleanup skill that recovers GBs from Xcode, Docker, and caches — never deletes without per-phase approval.

    clean-my-mac is a staged, dry-run-safe macOS cleanup skill that recovers GBs of storage from Xcode, Docker, caches, and node_modules — without ever deleting files without approval. Built by Shahriar Labs for the developer workflow: it understands active tools, respects running processes, and treats every cleanup phase as reversible until confirmed.

    The 7-Phase Cleanup Model

    clean-my-mac profiles your system first — installed tools, active processes, disk usage by directory — then runs 7 cleanup phases in safety-priority order:

    1. System caches: ~/Library/Caches, /Library/Caches, Safari/Chrome caches. Safe to clear fully.
    2. Logs: ~/Library/Logs, /var/log rotated logs. Compresses before deleting old entries.
    3. Xcode DerivedData: Biggest single-tool win. Checks no Xcode build is running before wiping.
    4. npm/yarn/pnpm caches: Package manager caches. Rebuilds automatically on next install.
    5. node_modules: Only in inactive projects (no active git activity in 30+ days). Never touches active workspaces.
    6. Docker: Stopped containers, dangling images, unused volumes. Checks no containers are running first.
    7. Time Machine local snapshots: APFS local snapshots older than 7 days. Last phase, requires explicit confirmation.

    Dry-Run First, Always

    Every phase shows you what would be deleted and how much space it recovers before touching anything. You approve each phase individually. This is the opposite of aggressive cleanup tools that delete first and ask questions never.

    On Apple Silicon Macs with 256 GB SSDs — the most constrained developer setup — clean-my-mac typically recovers 30–60 GB on a first run. That's the difference between a machine that swap-thrashes during builds and one that doesn't.

    Frequently Asked Questions

    What is the clean-my-mac skill?
    An AI skill that recovers GBs of macOS storage across 7 staged phases with dry-run preview and per-phase approval.
    Is it safe?
    Yes — dry-runs before every deletion, respects active tools, never touches active project node_modules.
    How much space can it recover?
    Typically 20–80 GB on developer Macs with 6+ months of active use.
    Does it work on Apple Silicon?
    Yes — optimized for M1/M2/M3/M4, works on Intel too.

    Written by Shihab Shahriar Antor — AI Engineer & Founder of Shahriar Labs. Building LetX, QuantumSketch, and open-source AI agent skills.