mcpField
W
win-disk-cleaner

win-disk-cleaner

github.com/orzclsOther5267 installsUpdated 28w ago
Repository

About win-disk-cleaner

win-disk-cleaner is a skill for assessing Windows C: drive space and preparing a tailored PowerShell cleanup plan. It guides script customization and recommends free tools and maintenance steps.

Key features

  1. 01Ten-module PowerShell cleanup script
  2. 02Dry-run preview and skip flags
  3. 03Cleanup tailored to user context
  4. 04Free disk-tool recommendations
  5. 05Long-term storage maintenance advice

Use cases

  1. 01Freeing space on a crowded C: drive
  2. 02Choosing cleanup targets for developers
  3. 03Preserving hibernation on laptops
  4. 04Planning recurring Windows maintenance

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/orzcls/win-disk-cleaner --skill win-disk-cleaner

After installing, type/win-disk-cleanerin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

LICENSE
install.sh
install.ps1
README.md
references/
free_tools.md
scripts/
disk_cleaner.ps1

Details

From the project README

Windows Disk Cleaner

Free, universal C: drive cleanup — no paid software needed.

Workflow

1. Assess the situation

Ask user for context if not provided:

  • Windows version (10/11)
  • Current free space and total drive size
  • Any scan results (screenshots from WinDirStat, TreeSize, etc.)
  • Whether they are a developer (affects which dev caches to target)
  • Whether they use hibernation/sleep mode
2. Generate the cleanup script

Read and deliver scripts/disk_cleaner.ps1 to the user. The script:

  • Requires admin privileges (#Requires -RunAsAdministrator)
  • Has -DryRun mode for safe preview
  • Has skip flags: -SkipHibernation, -SkipWinSxS, -SkipRestorePoints
  • Covers 10 modules: temp, recycle bin, WU cache, browsers, system logs, app caches, dev caches, hibernation, WinSxS, restore points
  • Includes bonus Windows Disk Cleanup utility invocation

Encoding requirement: Save as UTF-8 with BOM for Chinese Windows compatibility. Use Python:

import codecs
with codecs.open('disk_cleaner.ps1', 'w', encoding='utf-8-sig') as f:
    f.write(content)
3. Customize for user's environment

Adapt the script based on user context:

  • Non-developers: Remove module 7 (dev caches) or comment it out
  • Laptop users who need sleep: Add -SkipHibernation to recommended command
  • Users with specific large files: Add targeted cleanup commands (e.g., Android SDK, USMT.ppkg, Docker images)
  • Chinese software users: Ensure QQ/WeChat/DingTalk/Baidu paths are included
4. Recommend free tools

For details, read references/free_tools.md. Key recommendations:

  • BleachBit — open-source CCleaner replacement
  • WizTree — fastest disk analyzer (reads NTFS MFT)
  • Everything — instant file search (size:>500mb trick)
  • dupeGuru — open-source duplicate finder
5. Long-term maintenance advice

Provide these tips:

  • Enable Storage Sense (Settings > System > Storage)
  • Move default install path to D: drive
  • Redirect Downloads/Desktop/Documents to D: drive
  • Use mklink /D for symlink migration of installed apps
  • Schedule monthly BleachBit/script runs

Common large file targets

File/FolderTypical SizeSafe to Remove?
hiberfil.sysRAM sizeYes if not using hibernate
pagefile.sys1-16 GBReduce if RAM >= 16GB
WinSxS5-20 GBDISM cleanup only (never delete manually)
Windows.old10-30 GBYes after confirming new OS works
C:\Recovery\ USMT.ppkg1-3 GBYes after factory setup
Android SDK images2-10 GBYes if not developing
Docker WSL vhdx5-50 GBCompact with wsl --shutdown + diskpart
npm/pip/yarn cache0.5-5 GBYes (re-downloads on demand)
JetBrains caches1-5 GBYes (rebuilds automatically)
Shader caches (NVIDIA/Intel/AMD)0.2-2 GBYes (rebuilds on next launch)

Resources

  • scripts/disk_cleaner.ps1 — Main PowerShell cleanup script (10 modules, DryRun support)
  • references/free_tools.md — Curated list of free/open-source disk tools with usage tips

Comments

Markdown supported