⚠️ Disclaimer — please read first: This project was primarily developed with AI assistance and has not undergone a complete human security audit. Use it only after understanding the source code, the identity of each cleanup candidate, and the consequences of deletion. Back up important data separately.
This repository includes a standalone C# WPF desktop application, Disk Cleanup Assistant. It targets .NET Framework 4.8. Scanning, rule evaluation, and cleanup run entirely on your computer, without online AI APIs or telemetry. All candidates are unchecked by default. Standard cleanup sends files to the Recycle Bin; permanent deletion and emptying the Recycle Bin each require two consecutive confirmations.
Build locally:
.\build.ps1 -Configuration ReleaseThe portable executable is generated at artifacts\DiskCleanupAssistant.exe, alongside a SHA-256 file. See docs/APP.md for features, safety boundaries, build instructions, and signed release requirements. Regular GitHub Actions CI artifacts are explicitly marked unsigned and for testing only. Public release workflows fail if a trusted code-signing certificate or a separate update-manifest private key is missing.
The repository also provides a Windows disk-space inventory skill for Codex. It quickly scans C:, D:, or a specified directory for caches, temporary files, crash dumps, old logs, development-tool caches, suspected leftover installers, and optionally large files with identical contents.
Core principle: Generate a read-only candidate report first; let the user decide what to clean up.
- Scan
C:andD:together, or inspect a specified drive or absolute directory. - Check common cache locations first, then perform a time-limited broad scan.
- Report stable candidate IDs, risk levels, estimated sizes, and scan completeness.
- Before asking for a decision, explain each candidate's known or suspected identity, evidence, deletion impact, confidence, and recommended action.
- Optionally detect duplicate files with SHA-256; matching filenames alone do not count as duplicate contents.
- Do not delete, move, or modify anything on scanned drives by default.
- Follow the standard Codex skill layout; install at
C:\Users\<username>\.agents\skills\disk-cleaner.
Ask Codex:
Quickly check C: and D: for caches, temporary files, and suspected redundant files. Give me a list first; do not delete anything.
Or run the scanner directly:
python .\scripts\scan_candidates.py C: D: `
--max-seconds 45 `
--min-size-mb 50 `
--output .\reports\disk-cleaner-report.json `
--csv .\reports\disk-cleaner-report.csvTo check for large duplicate files:
python .\scripts\scan_candidates.py D: `
--duplicates `
--max-seconds 90 `
--output .\reports\d-duplicates.jsonScanning writes only the report files you specify. There is no deletion option.
low: Usually rebuildable cache or temporary data. Close the relevant applications first.medium: Deletion may affect diagnostics or require downloading or compiling again.high: Unknown purpose, possible backups or installers, or duplicate copies that require a retention decision.
Potentially reclaimable space is an estimate of candidate sizes. It does not mean those candidates should necessarily be deleted or that the same amount of space will actually be recovered.
Words such as cache, temp, or logs in a path are not sufficient authorization to delete it. Codex should first inspect ownership and necessary read-only metadata. If a candidate's identity remains unclear, continue investigating and label assumptions explicitly until the user has enough information to decide.
disk-cleaner/
├── app/ # Disk Cleanup Assistant WPF application
├── app-tests/ # Safety-rule tests without a third-party test runtime
├── DiskCleanupAssistant.sln
├── build.ps1 # Build, test, single-EXE packaging, and SHA-256
├── SKILL.md
├── scripts/
│ └── scan_candidates.py
├── references/
│ └── windows-safety.md
├── evals/
│ └── evals.json
└── tests/
└── test_scan_candidates.py
python -m unittest discover -s tests -p "test_*.py" -v
python -m py_compile scripts\scan_candidates.pyRead references/windows-safety.md before cleanup. Do not directly delete core system directories, application installation directories, user libraries, source repositories, backups, virtual disks, or unidentified contents of synchronized drives. Prefer official cleanup tools for Windows Update, browsers, game platforms, and package-manager caches.
MIT