From e7f7e786db425911ab2f82d8ef8f2483ec7862d2 Mon Sep 17 00:00:00 2001 From: Andrew Yim Date: Sat, 21 Mar 2026 12:57:29 +0900 Subject: [PATCH] docs: add /mac-optimizer slash command Co-Authored-By: Claude Opus 4.6 (1M context) --- .claude/commands/mac-optimizer.md | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .claude/commands/mac-optimizer.md diff --git a/.claude/commands/mac-optimizer.md b/.claude/commands/mac-optimizer.md new file mode 100644 index 0000000..7ce1049 --- /dev/null +++ b/.claude/commands/mac-optimizer.md @@ -0,0 +1,35 @@ +--- +description: macOS system health audit and optimization (packages, environment, security, cleanup, resources) +--- + +# Mac Optimizer + +Run macOS system health audits and apply optimizations with user consent. + +## Module Routing + +| Keywords | Sub-command | +|----------|-------------| +| brew, npm, pip, packages, update, outdated | `/mac-packages` | +| path, shell, zshrc, environment, env vars | `/mac-environment` | +| security, firewall, sip, gatekeeper, filevault | `/mac-security` | +| cache, cleanup, logs, disk space, trash | `/mac-cleanup` | +| cpu, memory, disk, battery, processes, slow | `/mac-resources` | +| doctor, full check, health, everything | `/mac-doctor` (runs all 5) | + +Default to **/mac-doctor** when the request is ambiguous. + +## Workflow + +1. **Audit** — run read-only scripts, collect JSON findings +2. **Report** — present findings grouped by severity (critical → warning → info) +3. **Consent** — ask which actions to perform +4. **Execute** — dry-run first, then apply approved actions only + +## Safety Rules + +- Never execute cleanup without explicit user approval +- Always show sizes before deleting anything +- No sudo by default — ask first if needed +- Security module is read-only (findings + guidance only) +- Back up shell configs before modifying