skill
c-drive-cleaner-skill
Safety-first Codex skill for auditing and cleaning reclaimable Windows C: drive space.
Set up
Skills are installed by placing their folder where your agent loads skills.
The download comes from github.com/MickeyWzt/c-drive-cleaner-skill itself, not from our server, so what you get is exactly what its author published.
Install instructions come from the README
README
synced Oct 26, 2026C Drive Cleaner Skill
A safety-first Codex skill for auditing and cleaning reclaimable space on a Windows C: drive.
It is built for the boring but important version of disk cleanup: scan first, show exactly what is reclaimable, require explicit approval, and avoid personal files.
If this helped you avoid an unsafe cleanup command, please consider starring the repo so other Windows + Codex users can find it.
At a Glance
| Field | Details |
|---|---|
| Project status | Working Codex skill and PowerShell cleanup script for Windows. |
| Best for | Auditing reclaimable C: drive space before deciding what to clean. |
| First thing to try | Run an audit-only command and inspect the JSON report before any cleanup. |
| Important caveat | It intentionally avoids personal folders and requires explicit approval for cleanup actions. |
Project Links
- Development guide
- FAQ
- Examples
- Support and troubleshooting
- Changelog
- Roadmap
- Contributing guide
- Code of conduct
- Security policy
- Safety reference
Why Use This
Windows cleanup requests can get dangerous quickly. This skill gives Codex a cautious workflow and a deterministic PowerShell script instead of improvising deletion commands.
Use it when you want to:
- Inventory the full drive read-only, with directory hotspots, large files, inaccessible paths, and skipped reparse points.
- Inventory project trees read-only and separate reproducible dependencies/compiler output from ambiguous releases and deliverables.
- Audit reclaimable space on
C:. - Clean user temp and Windows temp files with an age threshold.
- Use deeper opt-in cleanup presets for browser caches, recycle bin contents, Windows update caches, delivery optimization caches, error reports, thumbnails, shader caches, and diagnostic dumps.
- Run Windows component store cleanup through DISM when explicitly requested.
- Produce a JSON report before and after cleanup.
- Compare script-counted deletions with the drive's actual free-space increase.
- Keep downloads, documents, projects, synced folders, and app installs out of scope.
Safety Model
The default behavior is intentionally conservative:
- Audit first, clean second.
- Cleanup requires
-Mode Clean -ConfirmClean. - Temp/cache cleanup defaults to files older than 7 days.
- Browser caches are opt-in with
-IncludeBrowserCaches. - Recycle bin cleanup is opt-in with
-IncludeRecycleBin. - Deep cleanup is opt-in with
-Preset Deep. - Maximum cleanup is opt-in with
-Preset Maximumand adds DISM component cleanup. - Large-file scanning is advisory only and never deletes personal files.
- Deletion is restricted to an allowlist of temp/cache locations.
- pip, npm/npx, and uv caches have separate explicit opt-ins; NVIDIA downloaded updates and Squirrel installer temp are also opt-in and are not silently added by a preset.
- Ordinary browser-cache cleanup excludes Service Worker storage, cookies, history, passwords, extensions, and login data.
Cleanup Presets
| Preset | What it includes | Best for |
|---|---|---|
Standard | User temp and C:\Windows\Temp | Safe first pass |
Deep | Standard plus browser caches, recycle bin, Windows Update download cache, Delivery Optimization cache, Windows Error Reporting, Explorer thumbnail/icon cache, DirectX/NVIDIA shader caches, diagnostic dumps, and large-file hints | Finding more reclaimable space while staying allowlist-based |
Maximum | Deep plus dism.exe /Online /Cleanup-Image /StartComponentCleanup in clean mode | The strongest built-in cleanup path after reviewing the audit |
The script still does not automatically delete Downloads, Documents, Desktop files, source code, synced folders, installed applications, package-manager caches, restore points, or Windows.old.
Contents
c-drive-cleaner/
SKILL.md
agents/openai.yaml
references/package-caches.md
references/project-artifacts.md
references/safety.md
scripts/c_drive_cleaner.ps1
scripts/project_artifact_inventory.ps1
scripts/storage_inventory.ps1
Quick Start
Run a comprehensive read-only inventory:
powershell -NoProfile -ExecutionPolicy Bypass -File .\c-drive-cleaner\scripts\storage_inventory.ps1 -Drive C: -ReportPath .\c-drive-inventory.json
Run a reclaimable-space audit:
powershell -NoProfile -ExecutionPolicy Bypass -File .\c-drive-cleaner\scripts\c_drive_cleaner.ps1 -Mode Audit -ReportPath .\c-drive-cleaner-report.json
Audit with browser caches included:
powershell -NoProfile -ExecutionPolicy Bypass -File .\c-drive-cleaner\scripts\c_drive_cleaner.ps1 -Mode Audit -IncludeBrowserCaches -ReportPath .\c-drive-cleaner-report.json
Run a deeper audit for more reclaimable space:
powershell -NoProfile -ExecutionPolicy Bypass -File .\c-drive-cleaner\scripts\c_drive_cleaner.ps1 -Mode Audit -Preset Deep -ReportPath .\c-drive-cleaner-deep-report.json
Audit selected high-yield package and installer caches without deleting them:
powershell -NoProfile -ExecutionPolicy Bypass -File .\c-drive-cleaner\scripts\c_drive_cleaner.ps1 -Mode Audit -IncludeNpmCache -IncludeUvCache -IncludeNvidiaDownloadCache -IncludeInstallerTemp -ReportPath .\c-drive-cleaner-extra-report.json
Inventory rebuildable project artifacts without deleting them:
powershell -NoProfile -ExecutionPolicy Bypass -File .\c-drive-cleaner\scripts\project_artifact_inventory.ps1 -RootPath C:\path\to\projects -MinSizeMB 16 -ReportPath .\project-artifacts.json
Run an approved temp-file cleanup:
powershell -NoProfile -ExecutionPolicy Bypass -File .\c-drive-cleaner\scripts\c_drive_cleaner.ps1 -Mode Clean -ConfirmClean -MinAgeDays 7 -ReportPath .\c-drive-cleaner-after.json
Run the strongest built-in cleanup after reviewing a maximum audit:
powershell -NoProfile -ExecutionPolicy Bypass -File .\c-drive-cleaner\scripts\c_drive_cleaner.ps1 -Mode Audit -Preset Maximum -ReportPath .\c-drive-cleaner-maximum-report.json
powershell -NoProfile -ExecutionPolicy Bypass -File .\c-drive-cleaner\scripts\c_drive_cleaner.ps1 -Mode Clean -Preset Maximum -ConfirmClean -MinAgeDays 7 -ReportPath .\c-drive-cleaner-maximum-after.json
Example Output
See examples/sample-audit-report.json for a fuller sample report.
Mode: Audit
Preset: Deep
Drive: C:
Free: 52.05 GB
Estimated reclaimable: 267.21 MB
Deleted: 0 B
Targets:
- User temp
- Windows temp
- Windows Update download cache
- Explorer thumbnail cache
- Diagnostic crash dumps
The scripts skip locked or permission-denied files, never follow reparse points, and record bounded evidence in the report instead of forcing deletion. Project artifact discovery is advisory: even node_modules or Rust target needs an exact preflight and item-level approval. Inventory directory sizes are logical estimates; NTFS hard links can make Windows component directories overlap, so WinSxS must be analyzed and cleaned only through supported Windows tooling.
Install as a Local Codex Skill
Copy the c-drive-cleaner folder into your Codex skills directory:
Copy-Item -Recurse .\c-drive-cleaner "$env:USERPROFILE\.codex\skills\c-drive-cleaner"
Then invoke it in Codex with:
Use $c-drive-cleaner to audit my Windows C drive and prepare a safe cleanup plan.
Repository Link
https://github.com/MickeyWzt/c-drive-cleaner-skill
Contributing
Useful contributions:
- Add more safe cache categories with clear allowlist boundaries.
- Improve report formatting.
- Add tests for path safety rules.
- Document Windows cleanup edge cases.
Before expanding cleanup behavior, read c-drive-cleaner/references/safety.md.
For bugs, edge cases, or cache categories that should be reviewed, open a feedback issue using the repository issue template.
Security
This project is designed around cautious deletion. If you find a path-safety bug or any behavior that may delete data outside the documented allowlist, please report it privately first. See SECURITY.md.
License
MIT