---
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
