本文へ移動
cccskills
無料GitHub で公開

yq-windows-trash-cleaner

Windows C盘、项目垃圾、Docker/WSL、Git worktree、CodeGraph、Agent 会话或内存异常需要安全审计、清理和验证时使用。

インストール方法を見る

含まれるファイル(27)

  • SKILL.md14.2 KB
  • agents/openai.yaml320 B
  • evals/evals.json7.9 KB
  • evals/files/approved-cleanup-fixture.json801 B
  • evals/files/disk-inventory.json936 B
  • evals/files/memory-longrun-samples.csv697 B
  • evals/files/project-dirty-repo/processes.json238 B
  • evals/files/project-dirty-repo/status.txt37 B
  • evals/files/project-ignored-paths/.gitignore37 B
  • evals/files/whole-computer-project-inventory.json2.1 KB
  • references/cleanup-classification.md1.5 KB
  • references/design-provenance.md1.1 KB
  • references/docker-storage.md1.4 KB
  • references/memory-diagnosis.md2.2 KB
  • references/project-cleanup-classification.md2.7 KB
  • references/quality-gates.md1.5 KB
  • references/storage-classification.md1.9 KB
  • references/whole-computer-project-audit.md2.4 KB
  • scripts/Collect-WindowsHealthSnapshot.ps16.9 KB
  • scripts/Get-ComputerProjectInventory.ps111.4 KB
  • scripts/Get-ComputerStorageInventory.ps111.2 KB
  • scripts/Get-DockerStorageAudit.ps12.5 KB
  • scripts/Get-LongRunMemoryAssessment.ps15.1 KB
  • scripts/Get-ProjectCleanupAudit.ps112.5 KB
  • scripts/Invoke-ApprovedCleanupManifest.ps113.8 KB
  • scripts/Measure-PathUsage.ps12.1 KB
  • scripts/New-StorageAuditReport.ps19.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

YQ Windows Trash Cleaner

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.

Route the request

Distinguish storage from RAM before collecting data:

  • Storage intent: C drive/full disk, rapid GB growth, caches, projects, worktrees, Docker/WSL images, backups, sessions, compression, or cleanup.
  • RAM intent: processes consuming memory, paged/nonpaged pool, pool tags, startup storms, long-running workload growth, Fast Startup, or suspected leaks.
  • Mixed intent: run the storage and memory tracks separately and reconcile them only in the final report.

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.

Safety contract

Protect user work before reclaiming space:

  • Never delete documents, downloads, sessions, databases, credentials, models, evidence, backups, dirty/unmerged worktrees, release artifacts, Docker volumes, system files, or unknown directories by category name alone.
  • Do not run whole-repository git clean -fdX, blanket docker volume prune, or raw recursive worktree deletion.
  • Do not hand-delete WinSxS, DriverStore, Windows Installer, pagefile, hiberfil, recovery data, or VSS data.
  • Do not follow reparse points while measuring or deleting. Resolve every target and reject a target equal to an approved root, outside it, or sharing only a text prefix.
  • Keep active projects protected. Read repository instructions and current-state documents; check Git state, worktrees, running processes, locks, manifests, lockfiles, evidence paths, and regeneration commands.
  • Prefer semantic maintenance: package-manager prune commands, git worktree remove, Docker object IDs, official DISM analysis/cleanup, transactional SQLite maintenance, or moving a review item to the Recycle Bin.
  • Hard deletion is off by default. It requires a fresh explicit decision, exact paths/IDs, full preflight, and an action log.

Run layout

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.

Whole-computer storage workflow

1. Establish current volume state and historical delta

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.

2. Inventory every project semantically

For each discovered Git repository, worktree, or manifest-backed project, record:

  • canonical root, remote/default branch, branch/HEAD, dirty and untracked state;
  • registered worktrees and whether each HEAD is contained in the verified remote default branch;
  • active process command lines that point inside the root;
  • project instructions and current-state/evidence documents;
  • manifests and lockfiles that prove a cache can be rebuilt;
  • generated candidates such as node_modules, .venv, target, .next, test caches, browser output, CodeGraph databases, and build directories;
  • ambiguous data such as 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.

3. Inventory cross-project and application storage

Inspect, when present:

  • npm, pnpm, yarn, Bun, pip, uv, Cargo, NuGet, Gradle, Maven, browser, model, and updater caches;
  • Codex/Claude/other agent sessions, runtimes, plugins, managed caches, and worktrees;
  • Docker logical objects separately from VHDX physical allocation;
  • WSL distributions and VHDX files;
  • Temp, Recycle Bin, WER/dumps, update delivery, driver installers, application backups, and databases;
  • pagefile, hiberfil, component store, DriverStore, Installer cache, Reserved Storage, VSS, and restore points as system-managed or official-tool-only categories.

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.

4. Classify decisions, not just directories

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.

5. Produce both JSON and a local report

Keep scan data separate from analysis. Generate a local static report with scripts/New-StorageAuditReport.ps1 after classifications are present. Use this reading order:

  1. volume overview and coverage gaps;
  2. top space consumers;
  3. recommended priority;
  4. candidates by class;
  5. retained risks and long-term prevention.

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.

Manifest and controlled execution

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:

  1. Resolve and contain the exact target; reject reparse escapes.
  2. Recheck size, owner, Git state, process state, and other drift fields.
  3. Confirm the action type is compatible with the class.
  4. Capture the pre-action free bytes and relevant backup/status evidence.
  5. Execute only this ID. Stop on drift or unexpected output; never widen scope.
  6. Record exit status, released bytes, recovery status, and post-action verification.

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.

Special storage rules

Docker and WSL

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.

Git worktrees and temporary clones

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.

CodeGraph

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.

Sessions, backups, databases, and models

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.

Memory workflow

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.

Verification and outcome

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:

  • Verified facts
  • Cleanup actions taken
  • Actual released bytes
  • Retained and protected items
  • Unverified/admin-blocked items
  • Rollback or regeneration
  • Next maintenance milestone

Never call an audit a cleanup, a candidate size released space, or healthy current memory a proven root-cause fix.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

使用 AACT (Aggregate Analysis of ClinicalTrials.gov) PostgreSQL 数据仓库进行批量、历史、聚合性临床试验数据挖掘。Use this skill when the user requests bulk SQL analysis over the full clinical trials data warehouse — historical trial trends, disease landscapes, similar-design matching, or multi-year aggregations across hundreds of thousands of NCT records. 触发场景包括:AACT 查询、临床试验批量分析、PostgreSQL 试验数据、全量 NCT 检索、试验数据挖掘、历史试验分析、clinical trials data warehouse、SQL trials、bulk trial analysis、disease landscape、试验设计相似性匹配、跨年度聚合、sponsor/phase/country 多维统计。**与 clinical-trials-v2 差异**:本 skill 走批量 SQL · 离线大数据(PostgreSQL);v2 走实时 API · 单查询。两者互补:单条 NCT 实时状态用 v2,百万级历史挖掘用本 skill。支持云端公共 PostgreSQL(aact-db.ctti-clinicaltrials.org · 零部署)和每日 dump 本地还原(高性能 · 离线)两种连接方式,自动检测优先用本地。跨平台(macOS/Linux/Windows)参数化 SQL 防注入,read-only 强制保护。

日本語の概要は準備中です。原文の説明を表示しています。

EthanYoQ/Skill-hub112026年10月5日 更新

使用 AACT (Aggregate Analysis of ClinicalTrials.gov) PostgreSQL 数据库进行大批量临床试验历史分析与数据挖掘。触发场景包括:AACT 查询、临床试验批量分析、PostgreSQL 试验数据、全量 NCT 检索、试验数据挖掘、clinical trials data warehouse、疾病领域全景分析、设计相似试验匹配、跨年度试验趋势聚合。本 skill 通过 SQL 接口处理百万级试验记录,支持云端公共 PostgreSQL 服务(aact-db.ctti-clinicaltrials.org)和每日 dump 本地还原两种连接方式,自动检测并优先使用本地高性能模式。

日本語の概要は準備中です。原文の説明を表示しています。

EthanYoQ/Skill-hub112026年10月5日 更新

Use when work produces a deliverable, factual claim, dataset, code change, decision, publication, deployment, automation, or irreversible action whose failure would matter; when the user asks for a quality gate, acceptance criteria, QA, completeness, validation, audit, evidence, preflight, release readiness, or a definition of done; or before claiming completion on medium- or high-risk work. Automatically decide whether a formal gate is warranted, derive task-specific pass/fail criteria, gather evidence, and block unsupported completion. Make sure to use this skill even when the user does not say "quality gate" if consequential work needs acceptance criteria or completion evidence. Skip formal gating for trivial, reversible, low-impact requests.

日本語の概要は準備中です。原文の説明を表示しています。

EthanYoQ/Skill-hub112026年10月5日 更新

Create a changeset file in .changeset/ that describes a user-facing change for the release notes

日本語の概要は準備中です。原文の説明を表示しています。

EthanYoQ/Skill-hub112026年10月5日 更新

Add a new competitor to the AI Visibility Tool Directory — researches the tool, generates data, takes a screenshot, and inserts into the codebase

日本語の概要は準備中です。原文の説明を表示しています。

EthanYoQ/Skill-hub112026年10月5日 更新

add-lang

無料

Add tree-sitter language support to codegraph end-to-end — wire the grammar + extractor, write tests, then benchmark extraction quality and retrieval value on 3 popular real-world repos. Use when the user runs /add-lang <language> or asks to add/support a new language (e.g. Lua, Elixir, Zig, OCaml) in codegraph.

日本語の概要は準備中です。原文の説明を表示しています。

EthanYoQ/Skill-hub112026年10月5日 更新

EthanYoQ のスキルをすべて見る

このスキルの問題を報告する