windows-disk-cleanup
Skill2 starsChanged 5 months agoMITView on GitHub
Find what fills a Windows machine's disk and what can be removed without harm, give the user the commands to remove it, and re-measure after they run them. Measures with a bundled read-only PowerShell script (reported size AND real on-disk size, so cloud placeholders, sparse and compressed files are not mistaken for waste), sorts every large item into safe to delete / cache / shrink / your call / do not delete. Use whenever the user asks to free disk space, clean up the C drive, find what is taking space, check which files or folders can be removed, asks whether the folders a program left behind after it was uninstalled can be deleted, or pastes `du`, TreeSize or WinDirStat output and asks what is safe to delete; also for "check again" after a cleanup. Do NOT use for cleaning up after a coding session in a repository (branches, scratch files, worktrees - session-cleanup), for removing dead code (dead-code-removal), or on Linux or macOS.
9 other projects use a version of this.
Adopted by
Most recently taken up by
- Hotakus/hotakus-useful-skillstheir own version, first seen Nov 29, 2026
- ptn1411/skilltheir own version, first seen Nov 29, 2026
- songbaidong169-cyber/windows-disk-cleanuptheir own version, first seen Nov 22, 2026
- come1314/windows-disk-cleanuptheir own version, first seen Nov 22, 2026
- tomato2004ee/dsh-windows-skillstheir own version, first seen Nov 22, 2026
- imcjdbt/windows-disk-cleanuptheir own version, first seen Nov 15, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- ptn1411/skill★ 334same name
- linad3d/drivekeeper★ 4same name
- Hotakus/hotakus-useful-skills★ 2same name
- tomato2004ee/dsh-windows-skills★ 2same name
- come1314/windows-disk-cleanup★ 1same name
- GitZhiQing/agent-skills★ 1same name
- imcjdbt/windows-disk-cleanup★ 1same name
- iris0050724-lab/windows-disk-cleanup★ 1same name
- songbaidong169-cyber/windows-disk-cleanup★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- find-skillsSkill
- skill-creatorSkill
- anti-sycophancySkill
- clear-and-shortSkill
- coding-standardsSkill
- convert-plan-to-featureSkill
- dead-code-removalSkill
- delegation-promptSkill
- document-generateSkill
- execute-changeSkill
- live-app-security-auditSkill
- new-featureSkill
- plan-eng-reviewSkill
- pr-review-requestSkill
- pr-reviewSkill
- repo-change-summarySkill
- security-vulnerability-scanSkill
- session-cleanupSkill
- session-handoffSkill
- sonar-issue-checkSkill
- sonar-issue-fixSkill
- systematic-debuggingSkill
- trim-initial-bundleSkill
- unslopSkill
- update-dependenciesSkill
- verify-frontend-changeSkill
- verify-implementationSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 36
Every size comes from a measurement taken in this session: No size from memory, from the user's pasted output alone, or from an earlier …
- Distinctive: line 56
Follow the user's or project's wording rules for the report.
- Distinctive: line 63
Run the measuring script from this skill's folder.
- Very specific: line 70
If the user pasted du or similar output, use it only to decide where to look.
- Distinctive: line 102
When the user says they ran the commands, measure again (the script, or the specific paths) and compare with the earlier numbers, item by …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
windows-disk-cleanup
Finds what fills a Windows disk, says what can go and how, and checks the result after the user runs the commands. Two bundled scripts:
scripts/Measure-DiskUsage.ps1— read-only. Drive free space, the Temp variables, the largest folders with reported and on-disk size, known locations with a category, large folders no installed program matches, Docker and WSL virtual disks, and repeating Temp growth.scripts/Clear-DiskSpace.ps1— deletes the "safe to delete" groups for the user, with-DryRun. It restarts itself elevated for the two Windows folders.
references/locations.md holds what each location is and the exact procedures (Docker shrink,
Visual Studio Installer task, second database server, Chrome model, OneDrive files kept on this
PC, placeholders, never-delete list). Read the section for a location before recommending anything about it.
Rules
- You never delete. You measure, explain, and give commands; the user runs them. This holds even when the user asks you to run them: hand over the command instead.
- Every size comes from a measurement taken in this session. No size from memory, from the user's pasted output alone, or from an earlier check after the user changed something. Output cut short by a limit or a filter proves nothing about what is missing from it.
- Reported size is not space used. Recommend on the on-disk size. A large gap means
placeholders, sparse or compressed files; deleting those frees little. Hard links (WinSxS)
show no gap: both columns count every link in full (
references/locations.md). - Name the Temp folder by full path (
$env:LOCALAPPDATA\Temp), never$env:TEMP. The user'sTEMPcan point to another folder, and your shell's environment can differ from the user's, so a check in your shell can measure a different folder than their command cleans. - A folder is a leftover only after you confirm its program is not installed, not a Store
package, and not running; no environment variable or PATH entry points into it; and no
extension of an installed editor uses it (
references/locations.md→ Folders of uninstalled programs). - Unreadable is not empty. Without admin,
C:\Windows\LiveKernelReportsand similar folders read as nothing. Report them as "not checked (needs admin)". - Before removing anything that holds data, look inside: database servers (database count, port), Docker volumes (list them), backups. Say what would be lost.
- A path you tell the user to run must exist. Give the script's full path in this skill's
installed folder (
${CLAUDE_SKILL_DIR}, written out as the real path) and check the file is there first. Never give a path in a scratch folder, or a folder you only suggested copying to. - Follow the user's or project's wording rules for the report. Use plain words: "delete", "cache", "downloads again".
Workflow
Step 1 — Measure
Run the measuring script from this skill's folder. It takes several minutes on a full profile (it walks every file once); run it in the background and wait for it.
powershell -NoProfile -ExecutionPolicy Bypass -File "${CLAUDE_SKILL_DIR}/scripts/Measure-DiskUsage.ps1"If the user pasted du or similar output, use it only to decide where to look; the numbers in
your report come from the script or from your own follow-up measurements.
Step 2 — Look closer at anything large and unexplained
For each large item the script does not classify: list its children with reported and on-disk
size, open a few files or names to see what it is, and match it against
references/locations.md. For anything that keeps coming back (thousands of similar items,
regular creation times), find what creates it: compare creation times with scheduled task run
times and running processes. The source is the fix; deleting the result is not.
Step 3 — Report
Five groups, each a table with the path, the on-disk size, what it is, and how to remove it:
| Group | Meaning |
| Safe to delete | Temporary or regenerated by Windows; nothing is lost |
| Caches | Download again when needed; costs time on the next build |
| Shrink, do not delete | Virtual disks, WinSxS; give the procedure |
| Your call | Personal files, models, backups, second versions of programs; say what is lost |
| Do not delete | System folders and data; say what to do instead, if anything |
Then the commands: one per fenced powershell block, each marked when it needs an admin shell,
and the warnings that go with each (close VS Code first, quit Docker first, the port changes).
Offer Clear-DiskSpace.ps1 when several "safe to delete" groups apply, by its full installed
path (rule 8); run it with -DryRun yourself first and show the numbers, and pass confirmed
leftover folders in -LeftoverPaths.
Name anything you could not check and why.
Step 4 — Check again
When the user says they ran the commands, measure again (the script, or the specific paths) and
compare with the earlier numbers, item by item. For anything that did not change, find out why
before saying anything else: the command targeted a different folder, a program was still running
(Docker Desktop's start time is in Get-Process), a prune applied to a different builder, or a
cache was refilled by use. Report free space before and after. Say plainly when a step of yours
was wrong, and fix the command or script.
Reference
references/locations.md— every location, its category, and the procedures.scripts/Measure-DiskUsage.ps1— the measurement. Works in Windows PowerShell 5.1 and 7.scripts/Clear-DiskSpace.ps1— the deletion of the safe groups. Parameters:-TempDays(default 2),-WorkspaceDays(default 60),-LeftoverPaths(semicolon-separated),-DryRun.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

