cleanuplisted
Install: claude install-skill IamBiswajitSahoo/ClaudeSkills
# Claude Code Cleanup
Scan `~/.claude/` for deletable data and help the user reclaim disk space.
**Design note:** All classification, sizing, active-session detection, safe deletion, and before/after reporting are handled deterministically by the bundled scripts. You (the model) should not compute sizes, build tables, or decide what is safe — just run the scripts and echo their pre-rendered output verbatim.
## Step 1 — Scan
```bash
bash "${CLAUDE_SKILL_DIR}/scripts/scan.sh"
```
The script emits a single JSON object. The fields you care about:
- `markdown_table` — a fully rendered markdown table (Directory / Size / Contents / Safe to delete), sorted by size descending, with **Reclaimable total** and **~/.claude/ total** footer rows already included. **Print this verbatim to the user.**
- `active_sessions_note` — single-line note about protected active sessions. Print it below the table if the count is non-zero.
- `reclaimable_human` — total size of directories marked safe-to-delete (already shown in the table footer; reference it in prose if helpful).
- `safe_dirs` — array of directory names classified safe-to-delete. Used for `-all` mode and to build the selection prompt.
- `directories[]` — per-directory records (`name`, `human`, `safe_to_delete`) for constructing the AskUserQuestion options.
Do not recompute or reformat the table. Just `echo` it.
## Step 2 — Select what to delete
### Mode: `/cleanup -all`
If `$ARGUMENTS` contains `-all`, skip the checklist and ask