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
- Confirm the current system is Windows and identify the disk specified by the user.
- Record available disk space before any modifications.
- If the user requests analysis only, read disk capacity and known cache directories without deleting files.
- 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 Runto open the cleaner. - Let the user inspect paths and selections in the interface before confirming cleanup.
- 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:
- Check existing values at process, user, and system levels.
- Check Unity override variables:
UPM_NPM_CACHE_PATH,UPM_CACHE_PATH, andUPM_GIT_LFS_CACHE_PATH. - Confirm the target drive is a healthy NTFS partition with sufficient free space.
- Use short paths like
D:\DevCaches. - Obtain the user's permission before creating directories and writing user-level variables.
- Verify the persisted variables and the actual cache location npm uses.
- 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.