From optimize
Targeted disk space cleanup for Windows. Use when the user only wants to free up space on their drives without touching startup, services, or system settings. Trigger for: "free up disk space", "my C: is full", "clean up my SSD", "delete temp files", "what's eating my disk", "recover space on Windows".
How this skill is triggered — by the user, by Claude, or both
Slash command
/optimize:storageThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Analyzes what's using space on your drives and recovers it safely, without touching
Analyzes what's using space on your drives and recovers it safely, without touching services, startup items, or system configuration.
Run scripts/02_benchmark.ps1 -Label "pre" as Administrator.
Run scripts/01_diagnose.ps1 as Administrator.
Focus on these fields from the output:
C_Free_GB — current free spaceCleanupPotential_MB — recoverable from known safe locationsTopCleanupItems — what's biggestDevCaches_MB — dev caches if presenttop_folders_c.json — largest folders on C: for contextPresent a table like:
CLEANUP CANDIDATES
%TEMP% X.X GB — safe to delete
C:\Windows\Temp X.X GB — safe to delete
WinSxS (DISM cleanup) ~X GB — safe (keeps rollback for current patch)
Windows Update cache X.X GB — safe to delete
C:\AMD / C:\NVIDIA X.X GB — driver installer leftovers
Chrome cache X.X GB — safe to delete
npm cache X.X GB — safe (recreates automatically)
pip cache X.X GB — safe (recreates automatically)
...
TOTAL POTENTIAL: ~X GB
Ask if there's anything they want to skip.
Stop services that lock files before cleaning:
Stop-Service wuauserv, BITS, WSearch, DiagTrack -Force
Clean in this order:
Safe, always clean:
%TEMP% (user temp)C:\Windows\TempC:\tmp (if exists)C:\Windows\SoftwareDistribution\DownloadC:\AMD, C:\NVIDIA, C:\Intel (driver leftovers, if they exist)%LOCALAPPDATA%\Microsoft\Windows\WER\ReportArchive + ReportQueuetaskkill /f /im chrome.exe etc.)%LOCALAPPDATA%\Spotify\Storage)Dev caches (only if dev tools are present on this machine):
npm cache clean --force or delete %APPDATA%\npm-cachepnpm store prunepip cache purge or delete %LOCALAPPDATA%\pip\Cache%USERPROFILE%\.cargo\registry\cache (src/ stays)%USERPROFILE%\.gradle\caches
Ask before cleaning dev caches — confirm the user has dev tools installed.DISM WinSxS cleanup (takes 10-30 min, significant space):
DISM /Online /Cleanup-Image /StartComponentCleanup
DISM /Online /Cleanup-Image /StartComponentCleanup /ResetBase
/ResetBase removes rollback for already-installed updates. Safe unless you
plan to uninstall recent Windows updates. Ask before running.
Disk Cleanup (cleanmgr):
Set StateFlags0099 = 2 for all categories, then run cleanmgr /sagerun:99.
⚠️ Monitor it — if CPU usage freezes at an exact value for 10+ minutes,
kill the cleanmgr process. The space it found is already counted.
Delivery Optimization cache:
Delete-DeliveryOptimizationCache -Force
Restart services after:
Start-Service wuauserv, BITS, WSearch
Start-Process explorer.exe
If after cleanup space is still tight, look at installed_software.json from the
diagnosis and top_folders_c.json for large items to discuss with the user:
docker system prune, wsl --unregisterNever uninstall anything without explicit user confirmation.
Run scripts/02_benchmark.ps1 -Label "post" — prints the delta automatically.
scripts/01_diagnose.ps1scripts/02_benchmark.ps1npx claudepluginhub julianprincipe/windows-pc-optimizer --plugin optimizeWindows 11 disk cleanup and health playbook using native tooling (Storage Sense, DISM, cleanmgr) with a drift-protected HTML UI and Task Scheduler alerting. For full/slow PCs, BSODs, or commit-memory pressure.
Cross-drive storage audit and cleanup. Surveys all drives, finds orphaned git worktrees, large AI tool caches, and build artifacts. Produces a prioritized action plan with migration commands.
Identifies and cleans disk hogs like Rust target/, node_modules, Python venvs, git garbage, Docker images, Homebrew caches, and hidden temps. Use when disk space is low or full.