Loading...
Loading...
Hands-on playbook for Windows 11 disk cleanup, dev-machine optimization, and proactive health alerting. Use when the PC is full or slow, when a BSOD / Kernel-Power 41 / crash dump / commit-memory pressure happened, when the user asks to free disk space, audit storage, set up disk/memory alerts, or restore the same monitoring on a new PC. Built around native Microsoft-supported tooling (Storage Sense, cleanmgr, DISM, pnputil, vssadmin, wevtutil, powercfg) as the safety floor, a drift-protected HTML cleanup UI, and a Task Scheduler + BurntToast alerter. Covers dev machines with heavy AI/Docker/WSL workloads. Not for general Windows support, hardware diagnostics, GPU/driver troubleshooting, antivirus/malware removal, Windows Update repair, networking, or app-specific performance problems unrelated to disk or memory pressure.
npx skill4agent add codealive-ai/ai-driven-development maintaining-windows-healthmaintaining-macos-healthC:\Windows\Minidump% Committed Bytes In Use| File | Use for |
|---|---|
| First 5 minutes — which signal fired (disk / commit-memory / BSOD-crash / "feels slow"), read-only snapshot |
| Tiered cleanup playbook (10 tiers, low-risk → discuss-first), copy-paste-safe PowerShell blocks |
| Categories that must not be deleted even elevated (hard-protected prefixes synced with the validator + Windows-only dangers) |
| The safety floor: native Microsoft tooling, project-artifact purge marker→target map, the apply-script validator rules, third-party caveats |
| Full alerter design: 3 CRITICAL-only triggers, hysteresis, calibration, Task Scheduler interactive session, BurntToast + ntfy, S0ix/battery |
| Production PowerShell monitor (PS 5.1 compatible) |
| Default thresholds |
| Registers the scheduled task in the interactive user session; |
| Read-only preflight inventory (drives, Component Store, shadow storage, profiles, drivers, CFA, KFM, BitLocker, reparse points, dumps) |
| Interactive HTML cleanup-plan UI. Renders categorised checkboxes from a JSON of scan findings, serves on |
| The only sanctioned way to apply a cleanup selection. Reads |
| Adversarial unit tests for the validator — the safety-core gate. Runs on any OS. |
cleanmgrAvailable MBytesapply-cleanup-selection.pyselected_itemsRemove-Itemreferences/triage.mdassets/Audit-WinHealth.ps1references/cleanup-tiers.mdpy -3 --versionpython.exewinget install Python.Python.3.12references/never-touch.mdweb-searcher<path>descriptionprotected: truedefault_selected: falsewarning.7z/.zip/.iso.gguf.safetensorsitemcommanddescriptionprotectedwarningassets/render-cleanup-plan.py/ResetBasevssadmin deletewevtutil clpnputil /delete-driverpowercfg /h offprotected: truepython3 <skill>\assets\render-cleanup-plan.py %TEMP%\cleanup-data-<ts>.json127.0.0.1:18347%TEMP%\cleanup-selection-<ts>.jsonRemove-Itempython3 <skill>\assets\apply-cleanup-selection.py %TEMP%\cleanup-selection-<ts>.json
# add --scan-root D:\projects to allow bare deletes on an external dev driveselected_itemscommandprotected_overridespowershell.exe%LOCALAPPDATA%\win-health\operations.log--dry-runDism /Online /Cleanup-Image /CheckHealthsfc /scannowreferences/never-touch.md"protected": truewarningcd <skill>\assets
.\Install-WinHealthCheck.ps1 # installs BurntToast, copies script+config, registers the task, runs oncereferences/alerting.md-StartWhenAvailable.\Install-WinHealthCheck.ps1 -Testreferences/alerting.mdInstall-Module BurntToast -Scope CurrentUser-StartWhenAvailable%LOCALAPPDATA%\win-health\silentwinget uninstall --id <App.Id>Program Filesreferences/never-touch.mdRemove-ItemRemove-Itemassets/apply-cleanup-selection.pyselected_itemsRemove-Item-LiteralPathRemove-Item -Recurse-LiteralPathFILE_ATTRIBUTE_REPARSE_POINTRemove-ItemRECALL_ON_DATA_ACCESSOFFLINEAvailable MBytespagefile.sysswapfile.sysC:\Windows\InstallerPackage Cache-StartWhenAvailableweb-searcherdescriptionnode_modulesbinobjtarget.next*.vhdxDownloads