원클릭으로
yq-windows-trash-cleaner
Windows C盘、项目垃圾、Docker/WSL、Git worktree、CodeGraph、Agent 会话或内存异常需要安全审计、清理和验证时使用。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Windows C盘、项目垃圾、Docker/WSL、Git worktree、CodeGraph、Agent 会话或内存异常需要安全审计、清理和验证时使用。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Manage Agent Skills across Codex, Claude Code, local/global/project roots, Skill Hubs, GitHub, skills.sh, and managed plugin caches. Use when searching, installing, updating, upgrading, syncing, merging, auditing, deduplicating, cleaning, packaging, publishing, validating, resolving upstream sources, choosing runtime or scope, or working with skill-upgrade, check_upstreams.ps1, Claude Code plugins, skills-lock.json, or skill-upstreams.json. Do not use for ordinary software-package upgrades or non-skill file cleanup.
Create or refresh screenshot-led product hero images, localized interface captures, and image-led README sections for GitHub repositories. Use whenever a user asks to make a GitHub README show a GUI product visually, add software screenshots, design a README hero image, reproduce a screenshot-collage reference, or prepare repository-bound visual documentation. For GUI applications, default to the deterministic product-proof split hero with real software screenshots unless the user explicitly requests another visual direction.
Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.
Design engineering principles for making interfaces feel polished. Use when building UI components, reviewing frontend code, implementing animations, hover states, shadows, borders, typography, micro-interactions, enter/exit animations, or any visual detail work. Triggers on UI polish, design details, "make it feel better", "feels off", stagger animations, border radius, optical alignment, font smoothing, tabular numbers, image outlines, box shadows.
UI/UX design intelligence for web and mobile. Searchable local database with 84 styles, 192 color palettes, 74 font pairings, 192 product types, 98 UX guidelines, 104 icon entries, 16 GSAP motion presets, and 25 chart types across 22 stacks (React, Next.js, Vue, Nuxt, Svelte, Astro, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui, Jetpack Compose, Angular, Laravel, JavaFX, WPF, WinUI, Avalonia, Uno Platform, UWP, Three.js, and HTML/CSS). Use when designing, building, or reviewing UI: pages, components, color schemes, typography, layout, accessibility, animation, or data visualization.
使用 Netlify CLI 完成安装、认证、站点关联、本地开发、环境变量管理与部署。
| name | yq-windows-trash-cleaner |
| description | Windows C盘、项目垃圾、Docker/WSL、Git worktree、CodeGraph、Agent 会话或内存异常需要安全审计、清理和验证时使用。 |
| compatibility | Windows 10 or Windows 11 x64 with PowerShell 5.1 or newer. Optional Git, Docker, WSL, package-manager, and CodeGraph checks run only when those tools or artifacts exist. |
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:
run/
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:
{
"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.