Guides macOS disk cleanup, dev machine optimization, and proactive health alerting for Apple Silicon laptops with AI/Docker workloads. Use for low disk space, kernel panics, Jetsam events, or alert setup.
npx claudepluginhub codealive-ai/ai-driven-development --plugin ai-driven-developmentThis skill uses the workspace's default tool permissions.
Recovery and prevention playbook for macOS disk and memory crises. Validated against a real watchdog-timeout kernel panic on Apple Silicon caused by `vm_compressor` segments saturated to 100 % with the disk over 90 % full. The same playbook works for routine cleanup or first-time setup on a new machine.
Deep cleans macOS caches including dev tools like Node.js/npm/Xcode, uninstalls apps with remnants, purges project artifacts like node_modules, analyzes disk usage, optimizes system, and monitors stats using Mole CLI.
Cleans Mac caches, logs, browser data, app remnants, and project artifacts like node_modules/target/venv/build. Optimizes system services with dry-run previews.
Automates Mac disk cleanup with Mole wrapper: detects/installs deps, previews tiered strategies (Air/Pro/Max), whitelists paths, generates CSV reports, shows stats/achievements. For low storage or cache cleaning.
Share bugs, ideas, or general feedback.
Recovery and prevention playbook for macOS disk and memory crises. Validated against a real watchdog-timeout kernel panic on Apple Silicon caused by vm_compressor segments saturated to 100 % with the disk over 90 % full. The same playbook works for routine cleanup or first-time setup on a new machine.
Trigger on any of:
JetsamEvent-*.ips with vm-compressor-space-shortage| File | Use for |
|---|---|
references/triage.md | First 5 minutes — which signal fired, which tier of cleanup to start with |
references/cleanup-tiers.md | Tiered cleanup playbook (10 tiers, zero-risk → discuss-first), copy-paste-safe shell blocks |
references/never-touch.md | Categories that must not be deleted even under sudo (Mole-derived blacklist + incident-derived additions) |
references/mole-techniques.md | What Mole does that we borrow: marker→target map for mo purge, safe-path validators, age thresholds |
references/alerting.md | Full alerter design: 3 CRITICAL-only triggers, hysteresis, calibration, alerter vs terminal-notifier vs osascript, install/restore commands |
assets/mac-health-check | Production-ready bash script (~250 lines, bash 3.2 compatible) |
assets/com.local.mac-health-check.plist | LaunchAgent plist with StartCalendarInterval (StartInterval is broken on laptops) |
assets/config.sh | Default config with safe thresholds |
Read the relevant reference before acting. Do NOT operate from memory of these files — the details are calibrated to a real incident and small changes break safety.
brew install --cask stats) — you see issues forming, not just when they explode.vm-compressor-space-shortage. Anything else is noise.mo purge and mo clean are the right primary tools./System, /bin, /usr, /etc, /var/db outside specific allowlisted subpaths; bin/ only under .NET; vendor/ only under PHP; protect AI/password/VPN/keychain bundle IDs.references/triage.md, identify which signal fired and how urgent.df -h /System/Volumes/Data and write down free GB.references/cleanup-tiers.md. Each tier ends with a df checkpoint.mo purge if dev projects exist. Mole's marker-based detection + bin/.NET guard + vendor/PHP guard makes it safer than hand-rolled find.mo clean --dry-run for cache categories Mole knows about. Show user before confirming.assets/mac-health-check to ~/bin/mac-health-check (mkdir first; chmod +x).assets/com.local.mac-health-check.plist to ~/Library/LaunchAgents/.assets/config.sh to ~/.config/mac-health/config.sh (mkdir first).brew install vjeantet/tap/alerter (NOT terminal-notifier — it's broken in 2026 on Sequoia/Tahoe).brew install --cask stats for passive layer.launchctl load -w ~/Library/LaunchAgents/com.local.mac-health-check.plist.alerter once interactively (alerter --message test) so macOS asks for Notification Center permission.config.sh after a week if pattern noisy.Verify with launchctl list | grep mac-health (should show PID and exit 0) and tail -f ~/Library/Logs/mac-health/health.log.
Read references/alerting.md § Troubleshooting. Common causes:
terminal-notifier (the cask) instead of alerter — replace.launchctl bootstrap gui/$(id -u) <plist>.touch ~/.config/mac-health/silent to suppress.mo uninstall <app> — Mole scans 12+ locations for app traces (Application Support, Containers, Group Containers, Caches, Preferences, Saved State, LaunchAgents, LaunchDaemons, login items, etc.). Always show dry-run first, never bypass.
references/never-touch.md — even if user explicitly asks. Push back, explain the consequence.mo purge and mo clean always with --dry-run first. Show estimated reclaim, get confirm.tmutil delete <path>, never rm. TM-tagged paths require the tmutil API./Library, /private/var/db/*: only the allowlisted subpaths from references/never-touch.md § Sudo allowlist.references/alerting.md).rm /private/var/vm/swapfile* while running = guaranteed kernel panic./bin/bash 3.2.57. set -u + local var (no init) = unbound on first reference. The shipped script handles this.EnvironmentVariables.PATH and use absolute paths for interpreters.StartInterval clock pauses during sleep on Apple Silicon laptops (radar 6630231). Use StartCalendarInterval with explicit minute entries (the shipped plist has all 12).terminal-notifier is effectively unmaintained (last release 2019-11) and silently fails on Sequoia/Tahoe Apple Silicon. Use alerter instead.osascript display notification from launchd attributes to "Script Editor" and is unreliable. Use alerter from launchd context.log show --last 6m is too slow (30+ s) for periodic checks. Poll /Library/Logs/DiagnosticReports/JetsamEvent-*.ips instead — async write delay is acceptable on a 5-min cadence.JetsamEvent-*.ips files live in /Library/Logs/DiagnosticReports/ (system-wide), NOT ~/Library/Logs/DiagnosticReports/.df may not show the change immediately; wait or run diskutil info /System/Volumes/Data | grep "Container Free".A representative recovery from a Mac that hit ~8 % free after long memory-pressure sessions on a heavily-loaded dev profile (Docker, multiple AI tools, IDEs, browsers):
mo purge (~30–50 GB across many scan paths)~/Downloads review (old installers, recordings, archived repos): ~15 GBActive alerter installed with 7-day calibration window; verified via synthetic disk-trigger test before going live. Stats menubar app installed for passive monitoring.
Numbers scale with workload and disk size. Light users will see less; heavy AI/Docker/IDE users will see more.