From mac-maintenance
Safe, scan-first macOS maintenance — inventory disk usage, updates, caches and startup items read-only, report what is reclaimable, then clean/upgrade ONLY what the user approves. Use when the user asks to clean up, speed up, do maintenance on, or free disk space on their Mac, or to find what to update or uninstall. Triggers: 'clean up my mac', 'free up disk space', 'system maintenance', 'speed up my mac', 'what can I uninstall', 'what needs updating', 'údržba systému', 'projdi mi mac', 'uvolnit místo', 'zrychlit systém', 'co aktualizovat', 'co odinstalovat'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mac-maintenance:mac-maintenanceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Scan-first maintenance for any Mac: find what is safe to update, clean, or remove — then act **only** on what the user explicitly approves. The whole point is to be safe on someone's primary machine, so the scan is read-only and every destructive step is gated behind confirmation.
Scan-first maintenance for any Mac: find what is safe to update, clean, or remove — then act only on what the user explicitly approves. The whole point is to be safe on someone's primary machine, so the scan is read-only and every destructive step is gated behind confirmation.
node_modules, app data, backups) show what would be lost before touching it.Run these in parallel; none of them modify anything. Adjust head limits to taste.
# System + hardware + real uptime
sw_vers; sysctl -n hw.model machdep.cpu.brand_string; echo "RAM bytes: $(sysctl -n hw.memsize)"; uptime
# TRUE free space — see "Pitfalls": df -h / lies on modern macOS
diskutil info / | grep -iE "Container (Total|Free) Space"
df -h /System/Volumes/Data | tail -1
# Biggest folders in HOME
du -sh "$HOME"/* 2>/dev/null | sort -rh | head -25
# The usual space hogs
du -sh "$HOME/Library/Caches" "$HOME/Library/Logs" \
"$HOME/Library/Application Support" "$HOME/Library/Containers" 2>/dev/null | sort -rh
du -sh "$HOME/Library/Caches"/* 2>/dev/null | sort -rh | head -15
du -sh "$HOME/Library/Application Support"/* 2>/dev/null | sort -rh | head -15
du -sh "$HOME/Library/Containers"/* 2>/dev/null | sort -rh | head -10
# Updates available
brew outdated 2>/dev/null; brew list --cask 2>/dev/null
softwareupdate --list 2>&1 | head -20 # can take ~30–60s, hits Apple servers
command -v mas >/dev/null && mas outdated # App Store apps, if mas is installed
# Startup / background load & apps
ls -1 "$HOME/Library/LaunchAgents" /Library/LaunchAgents /Library/LaunchDaemons 2>/dev/null
ls -1 /Applications "$HOME/Applications" 2>/dev/null
# Trash + Docker VM disk (a very common silent hog)
du -sh "$HOME/.Trash" 2>/dev/null
du -sh "$HOME/Library/Containers/com.docker.docker" 2>/dev/null
See references/cleanup-targets.md for the full catalog of what each path is and how risky it is to clear.
Summarize findings as a scannable report, grouped by category. Sort space hogs largest-first and tag each with a risk level:
node_modules, app media, device backups).Also list: available updates (Homebrew / macOS / App Store), and — if asked — uninstall candidates (see below). End with a rough "reclaimable: ~X GB safe / ~Y GB total" and ask which categories to run. Prefer a multiple-choice prompt so the user can pick batches.
Confirm which IDEs / apps are closed before clearing their caches, then act. Delete the contents/dirs under ~/Library/Caches; apps recreate them.
# App / dev caches (safe; close the owning app first) — pick only approved ones
rm -rf "$HOME/Library/Caches/JetBrains" "$HOME/Library/Caches/Yarn" \
"$HOME/Library/Caches/ms-playwright" "$HOME/Library/Caches/electron" \
"$HOME/Library/Caches/typescript" "$HOME/Library/Caches/node-gyp"
# Package-manager caches (prefer the tool's own command)
brew cleanup # frees old versions + download cache
yarn cache clean 2>/dev/null
npm cache clean --force 2>/dev/null
pnpm store prune 2>/dev/null
pip cache purge 2>/dev/null
go clean -cache 2>/dev/null
rm -rf "$HOME/Library/Developer/Xcode/DerivedData"/* 2>/dev/null # Xcode only
# Updates — see Pitfalls about dependent upgrades (e.g. mysql)
brew upgrade # or an explicit list to hold risky formulae
mas upgrade 2>/dev/null
Deleting large caches is slow — a Yarn or JetBrains cache is millions of tiny files. Run the rm in the background and poll for the process to finish + track diskutil info / free space, rather than blocking on one call.
Docker.raw grows and never shrinks by itself. With Docker Desktop running:
docker system df # show images / containers / volumes / build cache
docker system prune # remove dangling/unused (keeps named volumes)
docker system prune -a --volumes # aggressive — DELETES unused images AND volumes
Always show docker system df and confirm before prune -a --volumes — named volumes may hold databases the user cares about.
Don't guess "unused". Rank by last-opened date, then let the user choose:
mdls -name kMDItemLastUsedDate -name kMDItemDisplayName /Applications/*.app 2>/dev/null
kMDItemLastUsedDate = (null) means Spotlight has no recorded launch — treat it as "possibly unused", not as proof (system apps and apps launched by other means also show null).
For Homebrew casks/formulae, brew uninstall <name> then brew autoremove to drop orphaned deps. Never remove an app you can't attribute to the user (bundled/system/managed apps).
If any of these appear in /Library/LaunchDaemons / /Library/LaunchAgents or /Applications, treat the Mac as corporate-managed: leave the agent alone and don't remove its app. Flag OS upgrades as "coordinate with IT."
com.manageengine.*, com.jamf.*, com.microsoft.intune.*, jamfcom.cisco.anyconnect.*, com.paloaltonetworks.GlobalProtect.*com.microsoft.*, CrowdStrike, SentinelOnedf -h / reports the sealed, read-only System volume (~a few GB) on modern macOS — it is NOT your free space. Use diskutil info / → Container Free Space, or df against /System/Volumes/Data.brew upgrade drags in dependents. Upgrading e.g. openssl@3 / protobuf makes brew try to upgrade mysql too. To hold a risky package (DB data-dir migration), brew pin <formula> first, or pass an explicit upgrade list. Always verify the actually-installed version afterward (brew list --versions mysql) — brew's summary can announce an upgrade it then skips.mds/mdworker) is indexing. Re-check after a few minutes before calling it a performance problem.docker system prune or resetting the disk image from Docker Desktop.diskutil info / instead of expecting it at once.rm.diskutil, softwareupdate, brew, mdls) are macOS-specific.brew upgrade") — just do that; don't run the full scan ceremony.Report: what was actually deleted/upgraded (with sizes), the measured free-space delta (before → after), what was intentionally left (and why), and any follow-ups the user declined so they can revisit later.
Guides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Resolves in-progress git merge or rebase conflicts by analyzing history, understanding intent, and preserving both changes where possible. Runs automated checks after resolution.
npx claudepluginhub freema/ai-skills --plugin mac-maintenance