Files
our-claude-skills/custom-skills/92-mac-optimizer/commands/mac-cleanup.md
Andrew Yim 8d5cfb69fd refactor: convert mac-optimizer from raw skill to proper plugin
Restructured 92-mac-optimizer from a CLAUDE.md-based skill into a full
Claude Code plugin with .claude-plugin/plugin.json, 6 slash commands
(/mac-doctor, /mac-packages, /mac-environment, /mac-security,
/mac-cleanup, /mac-resources), and auto-trigger SKILL.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 22:46:12 +09:00

54 lines
1.4 KiB
Markdown

---
allowed-tools: Bash(bash *audit_cleanup.sh*), Bash(bash *cleanup_execute.sh*), Bash(du *), Bash(brew *), Bash(npm *), Bash(pip *), Bash(docker *), Bash(rm *)
description: Scan and clean caches, logs, and clutter — shows sizes first, cleans only with consent
---
## Your task
Scan for reclaimable disk space and offer cleanup.
### Step 1 — Run the audit
```bash
bash $CLAUDE_PLUGIN_ROOT/skills/mac-optimizer/scripts/audit_cleanup.sh
```
### Step 2 — Report
Parse JSON output and present as a table sorted by size (largest first):
| Category | Size | Risk | Target |
|---|---|---|---|
Show the total reclaimable space.
### Step 3 — Ask for consent
Ask which categories to clean. Group by risk level (Safe / Moderate / Risky).
### Step 4 — Dry run first
For approved targets, always run dry-run first:
```bash
bash $CLAUDE_PLUGIN_ROOT/skills/mac-optimizer/scripts/cleanup_execute.sh --dry-run <targets>
```
Show the output and ask for final confirmation.
### Step 5 — Execute
Only after explicit confirmation:
```bash
bash $CLAUDE_PLUGIN_ROOT/skills/mac-optimizer/scripts/cleanup_execute.sh --execute <targets>
```
### Safety rules
- Never execute cleanup without explicit user approval
- Always show sizes before deleting anything
- Always run --dry-run before --execute
- Docker cleanup uses `docker system prune`, never direct file deletion
- No sudo by default — if an action needs sudo, state why and ask first