CommunityResearch & Data Analysisgithub.com

1751569571/windows-disk-cleaner

Safely scan, clean, and migrate Windows application and development caches, including desktop apps and Codex Skill.

What is windows-disk-cleaner?

The Windows Disk Cache Cleaner skill provides a safe, read-only analysis and interactive cleanup of Windows application and development caches. It uses a built-in graphical cleaner that only removes files pre-approved by a whitelist, enforcing strict safety rules: no deletion of entire system directories, no forced shutdowns without user consent, and no handling of critical system files. The skill also supports cache migration for tools like Unity Package Manager, Gradle, and npm by setting official environment variables (e.g., `UPM_CACHE_ROOT`, `GRADLE_USER_HOME`) on a user-specified drive, ensuring the target is a healthy NTFS partition with sufficient space. Users run PowerShell scripts to verify and launch the cleaner, which requires no additional .NET installation. After cleaning, it reports freed space, skipped items, and software kept closed. This skill is designed for Windows systems and integrates with both desktop interfaces and Codex agent workflows.

Works with~Claude Code✓Codex CLI~Cursor
npx skills add 1751569571/windows-disk-cleaner

Installed? Explore more Research & Data Analysis skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Windows Disk Cache Cleaner

When performing deletion operations, use the built-in cleaner. Only perform read-only analysis until the user explicitly requests cleanup.

Workflow

  1. Confirm the current system is Windows and identify the disk specified by the user.
  2. Record available disk space before any modifications.
  3. If the user requests analysis only, read disk capacity and known cache directories without deleting files.
  4. If the user requests cleanup:
    • Inform the user that this Skill will open an interactive cleaner.
    • Obtain permission before opening the graphical interface or closing software.
    • Run scripts/launch-cleaner.ps1 -Action Verify.
    • Run scripts/launch-cleaner.ps1 -Action Run to open the cleaner.
    • Let the user inspect paths and selections in the interface before confirming cleanup.
  5. After cleaning, reread available space and report freed capacity, skipped items, and software that remained closed.

Run the scripts using the following commands:

powershell.exe -NoProfile -ExecutionPolicy Bypass -File "<skill-dir>\scripts\launch-cleaner.ps1" -Action Verify
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "<skill-dir>\scripts\launch-cleaner.ps1" -Action Run

The graphical program is a self-contained version and does not require a separate .NET installation.

Safety Rules

  • Only process candidates generated by the built-in cleaner's whitelist.
  • Do not delete entire AppData, user directories, disk root, Windows, Program Files, or project directories.
  • Do not process pagefile.sys, component store, driver store, browser credentials, chat history, desktop files, Downloads directory, or Recycle Bin.
  • Do not follow directory junctions or symbolic links.
  • Do not force-close software unless explicitly authorized by the user; prefer normal shutdown.
  • Do not request administrator privileges when cleaning regular user caches.
  • Screenshots are for initial assessment only; always verify the current file system state before reporting results.
  • If the program's hash verification fails, stop immediately.

Cache Migration

Prefer using the software's official supported environment variables instead of directory junctions:

  • Unity Package Manager: UPM_CACHE_ROOT
  • Gradle: GRADLE_USER_HOME
  • npm: npm_config_cache

Before setting variables:

  1. Check existing values at process, user, and system levels.
  2. Check Unity override variables: UPM_NPM_CACHE_PATH, UPM_CACHE_PATH, and UPM_GIT_LFS_CACHE_PATH.
  3. Confirm the target drive is a healthy NTFS partition with sufficient free space.
  4. Use short paths like D:\DevCaches.
  5. Obtain the user's permission before creating directories and writing user-level variables.
  6. Verify the persisted variables and the actual cache location npm uses.
  7. Explain that newly launched software will read the new variables; existing processes must be restarted.

Do not migrate entire AppData, browser configurations, instant messaging data, or the Windows temporary directory.

Built-in Resources

  • assets/disk-cleaner.exe: Windows x64 self-contained graphical program verified by SHA-256 checksum.
  • scripts/launch-cleaner.ps1: Locates, verifies, and launches the built-in program.

Related Skills