docs: add /mac-optimizer slash command
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
35
.claude/commands/mac-optimizer.md
Normal file
35
.claude/commands/mac-optimizer.md
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user