c-drive-cleaner

Original🇨🇳 Chinese
Translated

Deeply analyze junk files on Drive C, provide intelligent deletion suggestions and migration solutions. It runs in read-only mode and does not modify any files. This skill is triggered when users ask about insufficient Drive C space, want to clean up junk, free up disk space, or move certain data out of Drive C.

10installs
Added on

NPX Install

npx skill4agent add niuhai/skill-c-cleaner c-drive-cleaner

SKILL.md Content (Chinese)

View Translation Comparison →

Drive C Junk File Analyzer v2.0

📌 Feature Overview

This is a read-only analysis tool designed for deep scanning of cleanable/migratable files on Drive C, generating a detailed report covering three key dimensions:
  1. 🧠 Intelligent Deletion Suggestions — Clear recommendations on whether to delete each item, along with reasons
  2. 📦 Migration Solutions — Identify which data can be moved from Drive C to other disks via configuration changes/symbolic links, etc.
  3. 🔬 Deep Scanning — Beyond the basic scanning of v1.0, covering top N large files, more application caches, and system hidden space usage
This skill will not delete or modify any files, it only provides analysis and actionable operation plans.

🎯 Applicable Scenarios

  • Insufficient Drive C space, need to free up space
  • Want to know which files are occupying Drive C space
  • Want to move certain caches/data from Drive C to Drive D or other disks
  • Regular system maintenance and cleanup
  • Check available space before installing large software
  • Developers clean up development tool caches (npm, node-gyp, pip, cargo, maven, etc.)
  • Troubleshoot "mysteriously disappearing" space on Drive C (system hidden files)

⚙️ Workflow

Step 1: Get Drive C Basic Information + Hidden Space Detection

powershell
# Drive C basic information
$drive = Get-PSDrive C
$totalGB = [math]::Round(($drive.Used + $drive.Free) / 1GB, 2)
$usedGB = [math]::Round($drive.Used / 1GB, 2)
$freeGB = [math]::Round($drive.Free / 1GB, 2)

# Hibernation file (hiberfil.sys)
$hiber = if (Test-Path "C:\hiberfil.sys") { (Get-Item "C:\hiberfil.sys").Length } else { 0 }

# Page file (pagefile.sys)
$page = if (Test-Path "C:\pagefile.sys") { (Get-Item "C:\pagefile.sys").Length } else { 0 }

# System restore points
$restorePoints = Get-ComputerRestorePoint -ErrorAction SilentlyContinue
$rpCount = @($restorePoints).Count

Step 2: Classified Deep Scanning (Each item includes three-dimensional information)

Output format for each scan item must include:
  • 📍 Location
  • 📏 Size
  • ✅/⚠️/❌ Deletion Suggestion: Recommended to delete / Delete with caution / Not recommended to delete (with reasons)
  • 🚚 Migratability: Migratable (with method) / Not migratable / Partially migratable

🔴 Category A: System Hidden Large Files (High benefit but need caution)

A1. Hibernation file hiberfil.sys
powershell
$path = "C:\hiberfil.sys"
if (Test-Path $path) {
    $size = (Get-Item $path).Length
    Write-Host "🔴 Hibernation file: $([math]::Round($size/1GB, 2)) GB"
}
AttributeDetails
Location
C:\hiberfil.sys
SizeUsually = Physical memory size
Deletion Suggestion: ⚠️ Delete with cautionIf you don't use hibernation (lid-close sleep), you can safely disable it to free up space equal to your memory size. Do not delete if you use hibernation
Migratability: ❌ Not migratableCan only be enabled/disabled
Operation Plan:
powershell
# Disable hibernation (free up space, run as administrator in PowerShell)
powercfg.exe /hibernate off

# Re-enable if needed
powercfg.exe /hibernate on

A2. Page file pagefile.sys
powershell
$path = "C:\pagefile.sys"
if (Test-Path $path) {
    $size = (Get-Item $path).Length
    Write-Host "🔴 Page file: $([math]::Round($size/1GB, 2)) GB"
}
AttributeDetails
Location
C:\pagefile.sys
SizeUsually = Physical memory size × 1~1.5 times
Deletion Suggestion: ❌ Not recommended to delete directlyPage file is a core component of system virtual memory; deleting it may cause system instability or program crashes
Migratability: ✅ Migratable to other disksMove the page file to Drive D via system settings
Operation Plan (Migrate to Drive D):
1. Win+R → sysdm.cpl → Advanced → Performance Settings → Advanced → Virtual Memory
2. Select Drive C → No paging file → Set
3. Select Drive D → Custom size (Recommended: Physical memory ×1.5) → Set
4. Restart computer to take effect
or command line:
powershell
# Requires administrator privileges, use with caution
wmic pagefileset where name="C:\\pagefile.sys" delete
wmic pagefileset create name="D:\\pagefile.sys"

A3. System Restore Points
powershell
$rp = Get-ComputerRestorePoint -ErrorAction SilentlyContinue
$rpsize = vssadmin list shadowstorage 2>$null
Write-Host "🔴 Number of restore points: $($rp.Count)"
AttributeDetails
Location
System Volume Information\
(Protected directory)
SizeDepends on the number of restore points and system changes
Deletion Suggestion: ⚠️ Delete with cautionYou can delete old restore points and keep the latest ones, but it's not recommended to delete all (loses system rollback capability)
Migratability: ❌ Not migratableMust stay on Drive C
Operation Plan:
powershell
# View all restore points
vssadmin list shadows

# Delete all restore points (frees up a lot of space!)
vssadmin delete shadows /all /quiet

# Or delete all except the latest
# Limit maximum occupied space via "Configuration":
vssadmin resize shadowstorage /on=C: /for=C: /maxsize=5GB

A4. Windows Component Store (WinSxS)
powershell
# Actual WinSxS usage (Dism tool)
Dism /Online /Cleanup-Image /AnalyzeComponentStore
AttributeDetails
Location
C:\Windows\WinSxS\
SizeUsually 5-15 GB (displayed size is inaccurate, use Dism to check actual cleanable amount)
Deletion Suggestion: ✅ Recommended to clean up old versionsOld version component backups can be safely cleaned via Dism, usually freeing up several GB of space
Migratability: ❌ Not migratableCore Windows system component
Operation Plan:
powershell
# Administrator PowerShell
# 1. Analyze first
Dism /Online /Cleanup-Image /AnalyzeComponentStore

# 2. Clean up (if prompted that space can be reclaimed)
Dism /Online /Cleanup-Image /StartComponentCleanup
Dism /Online /Cleanup-Image /StartComponentCleanup /ResetBase

🟡 Category B: Temporary Files & Caches (Recommended to clean up)

B1. Windows Temporary Folder
powershell
$winTemp = "C:\Windows\Temp"
$s = (Get-ChildItem $winTemp -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum
$c = (Get-ChildItem $winTemp -Recurse -Force -EA SilentlyContinue).Count
AttributeDetails
Location
C:\Windows\Temp
Deletion Suggestion: ✅ Highly recommended to deleteThese are residues from installation package extraction and temporary files generated during program operation; most are useless after restart
Migratability: ❌ Not migratableFixed system path
Cleanup Command
Remove-Item "C:\Windows\Temp\*" -Recurse -Force

B2. User Temporary Folder
powershell
$userTemp = "$env:LOCALAPPDATA\Temp"
$s = (Get-ChildItem $userTemp -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum
$c = (Get-ChildItem $userTemp -Recurse -Force -EA SilentlyContinue).Count
AttributeDetails
Location
%LOCALAPPDATA%\Temp
Deletion Suggestion: ✅ Highly recommended to deleteUser-level temporary files (.tmp, .log, etc.); tmp files generated by programs not currently running can be safely deleted
Migratability: ❌ Not migratableFixed by system environment variables
Cleanup Command
Remove-Item "$env:LOCALAPPDATA\Temp\*" -Recurse -Force

B3. Thumbnail Database
powershell
$thumbPath = "$env:LOCALAPPDATA\Microsoft\Windows\Explorer"
$dbFiles = Get-ChildItem $thumbPath -Filter "*.db" -ErrorAction SilentlyContinue
$s = ($dbFiles | Measure-Object Length -Sum).Sum
AttributeDetails
Location
%LOCALAPPDATA%\Microsoft\Windows\Explorer\*.db
Deletion Suggestion: ✅ Recommended to deleteThe system will automatically rebuild them when browsing folders; icon loading will be slightly slow the first time you open a folder
Migratability: ❌ Not migratableFixed system path
Cleanup Command
Remove-Item "$env:LOCALAPPDATA\Microsoft\Windows\Explorer\thumbcache_*.db","iconcache_*.db" -Force

B4. Recycle Bin
powershell
$rbPath = "C:\$Recycle.Bin"
$s = (Get-ChildItem $rbPath -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum
$c = (Get-ChildItem $rbPath -Recurse -Force -EA SilentlyContinue).Count
AttributeDetails
Location
C:\$Recycle.Bin
Deletion Suggestion: ⚠️ Empty after confirmationCheck first for important files that were deleted by mistake; empty only after confirming they are useless
Migratability: ❌ Not migratableFixed system path
Cleanup Command
Clear-RecycleBin -Force

B5. Windows Update Cache
powershell
$updateCache = "C:\Windows\SoftwareDistribution\Download"
$s = (Get-ChildItem $updateCache -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum
AttributeDetails
Location
C:\Windows\SoftwareDistribution\Download\
Deletion Suggestion: ✅ Recommended to delete (after update completion)Residues of downloaded and successfully installed update packages. Wait for completion if updates are in progress
Migratability: ❌ Not migratableFixed system path
Cleanup Command
Stop-Service wuauserv; Remove-Item "C:\Windows\SoftwareDistribution\Download\*" -Recurse -Force; Start-Service wuauserv

🟢 Category C: Development Tool Caches (Can be deleted OR migrated!)

This is a key enhanced category in v2.0! Caches of development tools can almost all have their storage locations changed via environment variable settings/configuration files!
C1. npm Global Cache
powershell
$npmCache = "$env:LOCALAPPDATA\npm-cache"
$s = (Get-ChildItem $npmCache -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum
AttributeDetails
Location
%LOCALAPPDATA%\npm-cache
Deletion Suggestion: ✅ Recommended to deleteAfter cleanup,
npm install
will re-download packages next time; does not affect already installed global/project packages
Migratability: ✅ Migratable!Set the
npm_config_cache
environment variable
Cleanup Command
npm cache clean --force
Migration Method (Move to Drive D):
powershell
# Method 1: Set environment variable (permanent effect)
[System.Environment]::SetEnvironmentVariable("npm_config_cache", "D:\dev-cache\npm", "User")

# Method 2: npm config
npm config set cache "D:\dev-cache\npm"

# Verify
npm config get cache

C2. node-gyp Compilation Header Files
powershell
$ngCache = "$env:LOCALAPPDATA\node-gyp\Cache"
$s = (Get-ChildItem $ngCache -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum
AttributeDetails
Location
%LOCALAPPDATA%\node-gyp\Cache
Deletion Suggestion: ✅ Recommended for developers to deleteNode.js header files will be automatically re-downloaded when compiling native addons next time
Migratability: ✅ Migratable!Set
NODE_GYP_DIR
or use symbolic links
Cleanup Command
Remove-Item "$env:LOCALAPPDATA\node-gyp\Cache\*" -Recurse -Force
Migration Method:
powershell
# Create target directory
New-Item -ItemType Directory -Path "D:\dev-cache\node-gyp" -Force

# Delete original cache then create symbolic link (need to delete original directory first)
Remove-Item "$env:LOCALAPPDATA\node-gyp\Cache" -Recurse -Force
cmd /c mklink /D "$env:LOCALAPPDATA\node-gyp\Cache" "D:\dev-cache\node-gyp"

C3. pip (Python) Cache
powershell
$pipCache = "$env:LOCALAPPDATA\pip\cache"
if (Test-Path $pipCache) {
    $s = (Get-ChildItem $pipCache -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum
}
AttributeDetails
Location
%LOCALAPPDATA%\pip\cache
Deletion Suggestion: ✅ Recommended to delete
pip install --no-cache-dir
can avoid generating cache; existing cache can be safely cleared
Migratability: ✅ Migratable!Set the
PIP_CACHE_DIR
environment variable or use pip configuration file
Cleanup Command
pip cache purge
Migration Method:
powershell
# Set environment variable
[System.Environment]::SetEnvironmentVariable("PIP_CACHE_DIR", "D:\dev-cache\pip", "User")

# Or via pip configuration file: %APPDATA%\pip\pip.ini
# [global]
# cache-dir = D:/dev-cache/pip

C4. Yarn Cache
powershell
$yarnCache = "$env:LOCALAPPDATA\Yarn\Cache"
if (Test-Path $yarnCache) {
    $s = (Get-ChildItem $yarnCache -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum
}
AttributeDetails
Location
%LOCALAPPDATA%\Yarn\Cache
or
C:\Users\<User>\AppData\Local\Yarn
Deletion Suggestion: ✅ Recommended to deleteUse
yarn cache clean
Migratability: ✅ Migratable!
yarn config set cacheFolder <path>
Cleanup Command
yarn cache clean
Migration Method:
powershell
yarn config set cacheFolder "D:\dev-cache\yarn"

C5. pnpm Cache (store + content-v2)
powershell
$pnpmStore = "$env:LOCALAPPDATA\pnpm\store"
$pnpmContent = "$env:LOCALAPPDATA\pnpm\content-v2"
AttributeDetails
Location
%LOCALAPPDATA%\pnpm\store
and
%LOCALAPPDATA%\pnpm\content-v2
Deletion Suggestion: ✅ Recommended to deletepnpm store is global package storage; it will be re-downloaded on demand after deletion
Migratability: ✅ Migratable!Set
PNPM_HOME
and store path
Cleanup Command
pnpm store prune
Migration Method:
powershell
# Set pnpm home
pnpm set store-dir "D:\dev-cache\pnpm-store"
pnpm set global-bin-dir "D:\dev-cache\pnpm-global"
# Or via environment variable
[System.Environment]::SetEnvironmentVariable("PNPM_HOME", "D:\dev-cache\pnpm", "User")

C6. NuGet (.NET) Package Cache
powershell
$nugetPkg = "$env:USERPROFILE\.nuget\packages"
AttributeDetails
Location
%USERPROFILE%\.nuget\packages
Deletion Suggestion: ⚠️ Developers delete with cautionAfter deletion, Visual Studio will re-download dependent packages when opening solutions
Migratability: ✅ Migratable!Set
globalPackagesFolder
in NuGet.config
Cleanup CommandManually delete contents of
.nuget\packages
directory
Migration Method:
xml
<!-- %APPDATA%\NuGet\NuGet.Config -->
<configuration>
  <config>
    <add key="globalPackagesFolder" value="D:\dev-cache\nuget-packages" />
  </config>
</configuration>

C7. Cargo (Rust) Cache
powershell
$cargoRegistry = "$env:USERPROFILE\.cargo\registry"
$cargoGit = "$env:USERPROFILE\.cargo\git"
AttributeDetails
Location
%USERPROFILE%\.cargo\registry
and
.cargo\git
Deletion Suggestion: ✅ Rust developers can delete
cargo cache --autoclean
Migratability: ✅ Migratable!Set the
CARGO_HOME
environment variable
Cleanup Command
cargo cache --autoclean
or
cargo cache --autoclean-free-percent=100
Migration Method:
powershell
# Move the entire .cargo directory to Drive D
Move-Item "$env:USERPROFILE\.cargo" "D:\dev-cache\.cargo"

# Create symbolic link
cmd /c mklink /D "$env:USERPROFILE\.cargo" "D:\dev-cache\.cargo"

# Or set environment variable CARGO_HOME=D:\dev-cache\.cargo

C8. Maven (Java) Local Repository
powershell
$mavenRepo = "$env:USERPROFILE\.m2\repository"
AttributeDetails
Location
%USERPROFILE%\.m2\repository
Deletion Suggestion: ⚠️ Java developers delete with cautionContains all downloaded Maven dependency jar packages
Migratability: ✅ Migratable!Set
<localRepository>
in settings.xml
Cleanup CommandDelete contents of
.m2/repository
(next build will re-download)
Migration Method:
xml
<!-- ~/.m2/settings.xml -->
<settings>
  <localRepository>D:/dev-cache/maven-repo</localRepository>
</settings>

C9. Gradle (Java/Android) Cache
powershell
$gradleCaches = "$env:USERPROFILE\.gradle\caches"
AttributeDetails
Location
%USERPROFILE%\.gradle\caches
Deletion Suggestion: ✅ Recommended to delete
gradle cleanBuildCache
or manually delete caches
Migratability: ✅ Migratable!Set the
GRADLE_USER_HOME
environment variable
Cleanup Command
gradle cleanBuildCache
Migration Method:
powershell
# Set environment variable
[System.Environment]::SetEnvironmentVariable("GRADLE_USER_HOME", "D:\dev-cache\gradle", "User")

🔵 Category D: Browser Caches

D1. Chrome / Edge
powershell
$chromeCache = "$env:LOCALAPPDATA\Google\Chrome\User Data\Default\Cache"
$edgeCache = "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\Cache"
AttributeDetails
LocationCache / Code Cache / GPUCache under User Data of each browser
Deletion Suggestion: ✅ Recommended to deleteBut may lose some website login status and form data
Migratability: ⚠️ Partially migratableChrome supports the
--disk-cache-dir
startup parameter; a simpler way is to use the browser's built-in cleanup (Ctrl+Shift+Delete)
Cleanup MethodUsing Ctrl+Shift+Delete within the browser is the safest
Chrome Cache Directory Migration:
powershell
# Add parameter to Chrome shortcut target
# "...chrome.exe" --disk-cache-dir="D:\browser-cache\chrome"

🟣 Category E: Application Data & Logs

E1. System Log Files
powershell
$logFiles = @{
    "setupact.log" = "C:\Windows\setupact.log"
    "iis.log"       = "C:\Windows\iis.log"
    "comsetup.log"  = "C:\Windows\comsetup.log"
    "DumpStack.log" = "C:\DumpStack.log"
}
AttributeDetails
Deletion Suggestion: ✅ General users can deleteFor debugging purposes; not needed by ordinary users
Migratability: ❌ Not migratable

E2. Sogou PDF Local Copy
AttributeDetails
Location
%LOCALAPPDATA%\sogoupdf\
DescriptionSogou PDF Reader stores a complete local copy of the program (exe+dll)
Deletion Suggestion: ✅ Uninstall/delete directly if you don't use Sogou PDFDo not modify this copy if you are still using it
Migratability: ❌ Not recommended to migrateShould be handled via uninstallation program

E3. JetBrains IDE Data
AttributeDetails
Location
%LOCALAPPDATA%\JetBrains\
,
%APPDATA%\JetBrains\
,
.IntelliJxx
, etc.
Deletion Suggestion: ⚠️ IDE users handle with cautionContains index caches, plugins, configurations; can delete data of old IDE versions
Migratability: ✅ Migratable!JetBrains Toolbox Settings → Change installation path for shared data
Migration Method:
JetBrains Toolbox → Settings → Change installation path for:
  - Plugins directory
  - Shared scripts, configs, etc.
→ Change to D:\dev-tools\jetbrains-shared

⚫ Category F: Deep Scanning — Top N Large Files

New in v2.0! Scan the N largest files on Drive C to quickly locate space hogs.
powershell
# Scan the top 20 largest files on Drive C (exclude Windows directory to avoid scanning system files by mistake)
Get-ChildItem -Path C:\ -Recurse -Force -File -ErrorAction SilentlyContinue |
    Where-Object { $_.FullName -notlike 'C:\Windows\*' -and $_.FullName -notlike 'C:\`$Recycle.Bin\*' } |
    Sort-Object Length -Descending |
    Select-Object -First 20 |
    Select-Object @{N='Size(MB)';E={[math]::Round($_.Length/1MB,2)}},
                      @{N='Size(GB)';E={[math]::Round($_.Length/1GB,2)}},
                      FullName
Sample Output Format:
RankSizeFile PathSuggestion
#18.5 GB
C:\Users\decent\.docker
Docker images, use
docker system prune
to clean up or change storage path
#23.2 GB
C:\Users\decent\AppData\Local\Docker\wsl
Docker WSL2 data, can be migrated
#32.1 GB
C:\Users\decent\.nuget\packages
NuGet cache, see migration plan in C6
............

⚫ Category G: Deep Scanning — Special Space Occupants

G1. Docker Desktop Data (WSL2)
powershell
$dockerData = "$env:LOCALAPPDATA\Docker\wsl"
$dockerProfiles = "$env:APPDATA\Docker\profiles"
AttributeDetails
Location
%LOCALAPPDATA%\Docker\wsl\
(main),
%APPDATA%\Docker\profiles\
SizeMay be several GB to tens of GB (depending on the number of images)
Deletion Suggestion: ⚠️ Docker users handle with caution
docker system prune -a
deletes unused images/containers/networks/build caches
Migratability: ✅ Migratable!Docker Desktop Settings → Resources → Advanced → Disk image location → Change to Drive D

G2. WSL (Windows Subsystem for Linux) Distributions
powershell
wsl --list --verbose
# View .vhdx file location
Get-ChildItem "$env:LOCALAPPDATA\Packages" -Filter "*.vhdx" -Recurse -ErrorAction SilentlyContinue
AttributeDetails
Location
%LOCALAPPDATA%\Packages\<Distribution>\LocalState\ext4.vhdx
SizeDepends on the amount of data within the Linux distribution
Deletion Suggestion: ⚠️ WSL users handle with cautionCan export, delete the original vhdx, then import to a new location to achieve migration
Migratability: ✅ Migratable!See below
Method to Migrate WSL to Drive D:
powershell
# 1. Export distribution
wsl --export <Distribution Name> D:\wsl-backups\ubuntu.tar

# 2. Unregister original distribution
wsl --unregister <Distribution Name>

# 3. Import from backup to Drive D
wsl --import <Distribution Name> D:\WSL\ubuntu D:\wsl-backups\ubuntu.tar

# 4. Delete backup file (optional)
Remove-Item D:\wsl-backups\ubuntu.tar

G3. Large Folders in User Directory
powershell
# Scan size of first-level subdirectories under user directory
Get-ChildItem "$env:USERPROFILE" -Directory -Force -ErrorAction SilentlyContinue |
    ForEach-Object {
        $size = (Get-ChildItem $_.FullName -Recurse -Force -EA SilentlyContinue | Measure-Object Length -Sum).Sum
        [PSCustomObject]@{ Folder=$_.Name; SizeMB=[math]::Round($size/1MB,2); SizeGB=[math]::Round($size/1GB,2) }
    } | Sort-Object SizeMB -Descending | Select-Object -First 15
Common large folders and handling suggestions:
FolderTypical SizeCan be moved out of Drive CMethod
.docker
1-20 GBChange disk image location in Docker settings
.nuget
1-10 GBChange path in NuGet.config
.gradle
500MB-5GBGRADLE_USER_HOME environment variable
.m2
(Maven)
500MB-5GBChange localRepository in settings.xml
.cargo
(Rust)
200MB-2GBCARGO_HOME environment variable
.cache
VariableDepends on situationCheck what's inside
Desktop
Variable⚠️ Desktop can be movedSystem Settings → Personalization → Change desktop path
Downloads
VariableSystem Settings → Change downloads folder location
Documents
VariableSystem Settings → Change documents folder location
Videos
VariableSame as above
AppData\Local
LargePartially movableSee specific entries
AppData\Roaming
MediumPartially movableSee specific entries
General Method to Migrate Windows User Folders:
This PC → Right-click "Documents" (or "Downloads"/"Desktop"/"Videos", etc.) → Properties → Location tab → Enter new path (e.g., D:\Documents) → Move

G4. Suspicious Files in Drive C Root Directory
powershell
$suspicious = @(
    "C:\Za3fb24eb1dd5a3.zip",
    "C:\aa3fb24eb1dd5a3.zip",
    "C:\sfs4.9",
    "C:\sml8.31",
    "C:\DumpStack.log"
)
foreach ($f in $suspicious) {
    if (Test-Path $f) {
        $info = Get-Item $f
        [PSCustomObject]@{
            File=$info.Name
            SizeKB=[math]::Round($info.Length/1KB,2)
            CreationTime=$info.CreationTime.ToString('yyyy-MM-dd HH:mm:ss')
            FullPath=$info.FullName
        }
    }
}
AttributeDetails
Deletion Suggestion: 🔴 Must confirm manually!These files have randomly generated names (may be download residues/malware residues/encrypted file fragments); you need to right-click and check properties yourself
Migratability: ✅ Can be movedDirectly cut and paste to Drive D (if they are your useful files)

📊 Report Output Format Template

When users request analysis, output the report in the following structured format:
╔══════════════════════════════════════════════════════╗
║     Drive C Deep Analysis Report v2.0                ║
║     Read-only Mode · No Files Modified               ║
╚══════════════════════════════════════════════════════╝

━━━ I. Drive C Space Overview ━━━
Total Capacity: XXX GB | Used: XXX GB (XX%) | Available: XXX GB

Hidden Space Usage:
├─ Hibernation file(hiberfil.sys): XX GB ─ Suggestion: [✅Recommended to disable/⚠️Keep]
├─ Page file(pagefile.sys): XX GB ─ Suggestion: [✅Migratable to Drive D]
├─ System Restore Points: X ─ Suggestion: [⚠️Can clean up old ones]
└─ WinSxS Component Store: XX GB (Actual cleanable: X GB) ─ Suggestion: [✅Recommended to clean with Dism]

━━━ II. Summary of Cleanable Items ━━━

【✅ Highly Recommended to Delete】
├─ ☐ Windows Temporary Files          XX MB   ── Cleanup Command: ...
├─ ☐ User Temporary Files              XX MB   ── Cleanup Command: ...
├─ ☐ Thumbnail Cache               XX MB   ── Cleanup Command: ...
└─ ☐ System Log Files             XX KB   ── Cleanup Command: ...

【⚠️ Can Delete After Confirmation】
├─ ☐ Recycle Bin                    XX MB   ── (70 files)
├─ ☐ Windows Update Cache           XX MB   ── (Ensure no updates are in progress)
└─ ...

【💻 Development Tool Caches】(Can be deleted OR migrated!)
├─ ☐ npm Cache                  XX MB   ── Delete: npm cache clean --force
│                                          Migrate: npm config set cache "D:\..."
├─ ☐ node-gyp Cache              XX MB   ── Delete: Remove-Item ...
│                                          Migrate: Symbolic link to D:\...
├─ ☐ pip Cache                   XX MB   ── Delete: pip cache purge
│                                          Migrate: PIP_CACHE_DIR=D:\...
├─ ☐ Yarn Cache                  XX MB   ── Migrate: yarn config set cacheFolder
├─ ☐ pnpm Cache                  XX MB   ── Migrate: pnpm set store-dir
├─ ☐ NuGet Cache                 XX MB   ── Migrate: NuGet.Config
├─ ☐ Cargo(Rust) Cache           XX MB   ── Migrate: CARGO_HOME
├─ ☐ Maven Repository                 XX MB   ── Migrate: settings.xml
└─ ☐ Gradle Cache                XX MB   ── Migrate: GRADLE_USER_HOME

━━━ III. 🔍 Top 20 Large Files on Drive C ━━━
#1  XX GB  C:\xxx\xxx         ── [Suggestion: xxx]
#2  XX GB  C:\xxx\xxx         ── [Suggestion: xxx]
...

━━━ IV. ⚠️ Items Requiring Manual Check ━━━
├─ 🔴 Suspicious Files in Drive C Root Directory (4)
│   Za3fb24eb1dd5a3.zip  ── Please right-click to check properties and source
│   aa3fb24eb1dd5a3.zip  ── Please right-click to check properties and source
│   sfs4.9               ── Please right-click to check properties and source
│   sml8.31              ── Please right-click to check properties and source
├─ 🔴 Docker/WSL Data      XX GB  ── Can be migrated to Drive D
└─ ...

━━━ V. 📦 One-Click Migration Guide (Move Data from Drive C to Drive D) ━━━
[See "Migration Method" in each category]

🆕 v2.0 vs v1.0 Comparison

Featurev1.0v2.0
Deletion SuggestionsOnly marked risk level (low/medium/high)✅ Clear recommendation/not recommended + reasons
Migration Solutions❌ None✅ Migration methods provided for each development tool cache
Scanning Depth8 basic categories✅ 20+ categories + Top N large files + system hidden space
Hibernation/Page Files❌ Not covered✅ Includes size, suggestions, operation commands
WinSxS/Restore Points❌ Not covered✅ Dism analysis + vssadmin cleanup
Development ToolsOnly npm/node-gyp✅ npm/yarn/pnpm/pip/cargo/maven/gradle/nuget
Docker/WSL❌ Not covered✅ Includes data location + migration methods
Large File Scanning❌ None✅ Top N ranking
User Folders❌ Not covered✅ Subdirectory size ranking + built-in Windows migration methods

💬 User Interaction Guide

Conversation Flow

  1. Greeting: Inform users that deep scanning is starting (read-only mode)
  2. Execute Scanning: Run all the above PowerShell commands for each category
  3. Display Report: Output in the formatted template above
  4. Ask Next Steps:
    • "Which cleanup operations would you like me to perform? (I will confirm each one)"
    • "Or would you like to migrate some development tool caches to Drive D? I can help you configure it"
    • "Would you like me to generate a complete report document and save it to your desktop?"

Sample Response

Okay! I'm starting a deep scan of your Drive C using Drive C Analyzer v2.0.
🔍 Read-only mode, no files will be modified
Scanning in progress: Basic information → Hidden space → Temporary files → Development tool caches → Top N large files → Special space occupants...
[Display complete report]
Would you like to:
  1. Clean up certain items? (Tell me the numbers, I will execute them and confirm each one first)
  2. Migrate development tool caches to Drive D? (npm/node-gyp/pip/cargo, etc., I can help you modify configurations)
  3. Generate a complete report document? (Save to desktop for you to review later)

This Skill aims to help you deeply understand where Drive C space is being used, and provides two solutions to free up space: deletion and migration. v2.0 — 2026-04-02