Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Windows C盘、项目垃圾、Docker/WSL、Git worktree、CodeGraph、Agent 会话或内存异常需要安全审计、清理和验证时使用。
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 306% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 485% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 221% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 138% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 198% | 0% |
Run an evidence-first Windows maintenance workflow that is safe to invoke at any time and is not tied to one project, drive, application, or prior incident.
Distinguish storage from RAM before collecting data:
Classify authorization:
AUDIT_ONLY: inspect and report. Phrases such as “哪些可以删” do not authorize deletion.PLAN_ONLY: produce exact manifest IDs, commands, recovery, and predicted impact without changing state.APPLY_APPROVED: execute only the candidate IDs the user explicitly approved or an exact safe-clean scope the user explicitly requested after seeing the classification.Scanning is always read-only. A report, HTML button, color, ignored status, or large size is never authorization.
Protect user work before reclaiming space:
git clean -fdX, blanket docker volume prune, or raw recursive worktree deletion.git worktree remove, Docker object IDs, official DISM analysis/cleanup, transactional SQLite maintenance, or moving a review item to the Recycle Bin.Create a timestamped run directory outside all scanned or cleaned targets:
textrun/ scope.json baseline/ projects/projects.json storage/storage.json memory/ cleanup-manifest.json changes/action-log.jsonl verification/ report.html final-report.md
Record timestamps, boot time, scan roots, excluded roots, access failures, commands and exit codes, tool availability, free bytes, and whether sizes are logical, allocated, compressed, sparse, or unknown.
Enumerate fixed volumes, capacity, filesystem, free bytes, BitLocker visibility when available, and prior trustworthy snapshots. Do not call normal variation “rapid growth” without a before/after delta.
Run scripts/Get-ComputerProjectInventory.ps1 with explicit scan roots. Start with every known development root, registered Git worktree root, user Documents/Desktop, temporary development roots, and additional fixed-volume workspace roots. Avoid broad Windows and application-install roots unless the evidence points there.
For one repository or a small set of known repositories, run scripts/Get-ProjectCleanupAudit.ps1 first. It adds git clean -ndX and git clean -nd previews, release/evidence summaries, active-owner evidence without exporting command lines, and explicit review_required_ignored_paths. This is still an audit: it never deletes or stops processes. Read project-cleanup-classification.md.
Run scripts/Get-ComputerStorageInventory.ps1 for system and user storage candidates. Use scripts/Measure-PathUsage.ps1 for exact follow-up measurements. Record inaccessible trees instead of silently treating them as zero.
Default root discovery is heuristic, not proof of complete-computer coverage. For a whole-computer claim, explicitly enumerate all fixed volumes, known workspace roots, and every path returned by git worktree list --porcelain; list excluded and inaccessible roots in the report.
For each discovered Git repository, worktree, or manifest-backed project, record:
node_modules, .venv, target, .next, test caches, browser output, CodeGraph databases, and build directories;output, dist, release, datasets, models, reports, validation runs, and agent context.Do not infer that dist, build, output, .runtime, .codex, .claude, or .codegraph is disposable. Classify their contents and role first. Read whole-computer-project-audit.md.
Inspect, when present:
Use package managers' own inventory/prune operations. A cache's total size is an upper bound, not guaranteed reclaimable space. Read storage-classification.md and docker-storage.md.
Use stable machine classes; colors may mirror them in the human report but never grant permission:
SAFE_REBUILDABLE: exact generated object with a proven regeneration path, inactive owner, contained target, and no evidence/user data.REVIEW_REQUIRED: useful history, project dependencies, clean but unverified clones, backups, sessions, installers, downloads, models, inactive Docker objects, or anything with judgement cost.KEEP_USER_OR_EVIDENCE: source, dirty work, current/archived evidence, databases, restore volumes, current sessions, and unknown ownership.SYSTEM_MANAGED_DO_NOT_DELETE: protected Windows files, component/installer/driver/recovery stores, or storage whose official analysis is unavailable.ADMIN_EVIDENCE_REQUIRED: DISM, VSS, restore-point, Reserved Storage, VHDX compaction, or other facts not visible without elevation.The detailed deletion gates are also summarized in cleanup-classification.md.
Every candidate needs a confidence level, current bytes, owner, activity check, deletion impact, recovery/regeneration, exact action, expected verification, and approval state.
Keep scan data separate from analysis. Generate a local static report with scripts/New-StorageAuditReport.ps1 after classifications are present. Use this reading order:
The report may contain private project names and absolute paths. Keep it local by default and redact before sharing. It must not expose direct hard-delete controls. The report information architecture has documented design provenance; see design-provenance.md.
Create cleanup-manifest.json before any state change:
json{ "id": "project-cache-001", "class": "SAFE_REBUILDABLE", "action": "pnpm-store-prune", "target": "C:\\absolute\\path-or-object-id", "expected_command_path": "C:\\absolute\\path\\to\\pnpm.cmd", "bytes": 123, "owner": "tool-or-project", "preconditions": ["path-contained", "size-rechecked", "owner-inactive"], "recovery": "documented regeneration command", "approved": false }
Before applying an approved item:
For the built-in semantic allowlist, run scripts/Invoke-ApprovedCleanupManifest.ps1 first without -Apply and pass the exact -ApprovedId values. Record its PreflightToken. Apply only after the entire batch passes, using the same manifest and IDs plus -Apply -PreflightToken <token>; the executor reruns all preflights and rejects a stale token before the first mutation. Package actions must bind target to the cache path reported by the owning tool and bind expected_command_path to the reviewed .exe or .cmd. The executor intentionally rejects arbitrary commands, raw recursive deletion, string booleans, unapproved items, non-SAFE_REBUILDABLE classes, active or ambiguous owners, reparse paths, and unverified worktrees. Unsupported actions remain manual review items; never broaden the script's allowlist during a cleanup run merely to make an item pass.
For multiple IDs, complete preflight for the entire batch before the first mutation, then execute in smallest-risk order. A failed later item does not make earlier actions transactional; the action log must say exactly what happened.
Run scripts/Get-DockerStorageAudit.ps1. Keep logical objects separate from VHDX physical storage. Do not start an auto-restarting container fleet only to obtain inventory without considering impact. VHDX compaction requires a current logical inventory, all consumers stopped, wsl --shutdown, detached/no-handle proof, and administrator access. Never promise the arithmetic sparse difference. Read docker-storage.md.
A worktree becomes eligible only when it is registered, clean including untracked files, inactive, and its HEAD is contained in the verified remote default branch. Remove it with git worktree remove, then prune metadata. A standalone temporary clone also needs clean status and remote containment; prefer recoverable removal when value is uncertain.
Treat .codegraph as rebuildable only after verifying it is an index, not project evidence, and that the project has no active indexing transaction. Separate the main database from WAL/SHM. Prefer fixing codegraph.json exclusions and rebuilding rather than repeatedly deleting a growing WAL. Exclusions change semantic search coverage, not project build inputs, unless project code explicitly reads that configuration.
Retain by default. Consider transparent compression or retention review before deletion. Database maintenance requires owner shutdown, a verified recovery copy, integrity checks, transactional changes, and post-checks. Keep at least one current backup and one pre-maintenance recovery point unless the user approves a different retention policy.
Run scripts/Collect-WindowsHealthSnapshot.ps1 at clean login, during representative workload, after it ends, and at long-run milestones. Separate processes, paged/nonpaged kernel pool, pool tags, cache/standby, and pagefile. Never join trends across different boot times.
Use scripts/Get-LongRunMemoryAssessment.ps1 and these outcome labels:
VERIFIED_FIXED: representative workload plus valid 48-hour same-boot coverage, no warning/critical sample, no sustained pool growth, and functional gates pass.HEALTHY_SO_FAR_PENDING_LONG_RUN: healthy evidence but less than 48 hours or incomplete representative workload.ROOT_CAUSE_NOT_PROVEN: abnormal growth exists but no reproducible component/driver A/B proves ownership.WARNING_REVIEW_REQUIRED: thresholds or sustained growth are exceeded.ROLLBACK_REQUIRED: a change caused functional or event-log regression.Fast Startup affects shutdown plus power-on, not Restart. It can preserve a leaking kernel session but does not create the leak. Restore it only after 24/48-hour stability evidence and an explicit experience tradeoff. Do not disable Defender, storage, network, audio, graphics, or other drivers from one sample or a tag-name association. Read memory-diagnosis.md and quality-gates.md.
Measure actual volume free-byte change; do not sum candidate logical sizes as released bytes. Re-run affected project status, worktree lists, package/cache status, Docker/WSL inventory, database checks, and application smoke tests. For system changes, verify networking/VPN, audio/microphone, OneDrive, input/Fn controls, search, and touched vendor software.
Lead with the outcome and use these sections:
Never call an audit a cleanup, a candidate size released space, or healthy current memory a proven root-cause fix.
Other measured skills in the registry, with their headline benchmark lift.