Audit machine storage and clean up disk space. Scans for large files, caches (pip, HuggingFace, W&B, torch, conda), model checkpoints, training output directories, duplicate git repos, and zombie/temp files. Presents categorized findings with sizes, then asks user for confirmation before deleting anything. Use when: (1) User asks to "check disk space", "clean up storage", "audit storage", "free up space", "list big files", "what's taking up space", (2) User mentions disk is full or running low, (3) User wants to remove old training runs, caches, or stale artifacts from the machine.
Run the scan script to collect storage data:
bash <skill-path>/scripts/scan.sh
Parse each SECTION: block from the output. Build a summary table covering:
| Category | What to report |
|---|---|
| Disk overview | Total/used/available, usage percentage |
| Large directories | Top dirs under $HOME by size |
| Caches | pip, HuggingFace, W&B, torch, conda, npm, yarn, go-build, bazel |
| Training outputs | output/, checkpoints/, runs/, wandb/, mlruns/, lightning_logs/ dirs |
| Large files (>100M) | Individual files, grouped by category (model weights, CUDA libs, git LFS, etc.) |
| Git repos | All repos with sizes, flag duplicates sharing same remote origin |
| Zombie files | __pycache__/, *.tmp, *.swp, core.*, nohup.out, .DS_Store |
Present findings as a ranked table sorted by size (largest first).
Categorize cleanup candidates into:
pip cache purge, ~/.cache/huggingface/, ~/.cache/wandb/), zombie files, empty/failed training runs (4K dirs with no checkpoints)For training output directories: identify which runs have actual model checkpoints vs. empty/crashed runs. For runs with checkpoints, check W&B summaries or metrics logs to find the best run by primary metric and flag the rest as cleanup candidates.
Use the AskUserQuestion tool to present cleanup options and get explicit confirmation. Structure as:
NEVER delete without user confirmation. After each approved deletion, report bytes freed.
After all deletions, run df -h / and show the before/after comparison.
These paths are always protected regardless of what the scan finds:
~/.vscode-server/ — VS Code server, extensions, settings~/.ssh/ — SSH keys~/.gitconfig — Git identity~/.local/lib/ — Installed Python packages (pip site-packages, CUDA libs)| Target | Command |
|---|---|
| pip cache | pip cache purge |
| HuggingFace cache | rm -rf ~/.cache/huggingface/ |
| W&B cache | rm -rf ~/.cache/wandb/ |
| W&B local logs | rm -rf <project>/wandb/ |
| Torch cache | rm -rf ~/.cache/torch/ |
| Single output dir | rm -rf <path> |
| All pycache | find <root> -type d -name __pycache__ -exec rm -rf {} + |
| Temp/swap files | find <root> -type f \( -name "*.tmp" -o -name "*.swp" -o -name "*.swo" \) -delete |