Best for
- Invoke this Skill when the user asks about:
Phoenix0531-sudo/tidy-skill/skills/tidy-skill/SKILL.md
Keep local AI agent environments clean, explainable, and recoverable. Use for repo artifact governance, workspace cache audits, WSL2/Docker hygiene, package and model cache mapping, C-drive growth diagnosis, and safe cleanup boundaries. Prevent throwaway Markdown files, audit local development environment sprawl, and provide read-only recommendations without moving tools, changing configs, or deleting risky files.
Decision brief
Stop AI agents from littering your repo with plan.md, todo.md, summary.md, and throwaway artifacts. 别让 AI Agent 把你的项目根目录变成 Markdown 垃圾场。
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/Phoenix0531-sudo/tidy-skill --skill "skills/tidy-skill"Inspect the Agent Skill "tidy-skill" from https://github.com/Phoenix0531-sudo/tidy-skill/blob/e896e05a46eb3aa0babce3d38ccb3ab7b79afb74/skills/tidy-skill/SKILL.md at commit e896e05a46eb3aa0babce3d38ccb3ab7b79afb74. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Use a three-layer model:
Invoke this Skill when the user asks about:
Stop and ask the user or strictly avoid if the request involves:
Every file an agent creates belongs to one of five classes. Class — not extension — determines treatment.
Before creating any new file, fill out this check. If you cannot answer every field, do not create the file.
Permission review
The documentation asks the agent to create, modify, or delete local files.
| **Decide** | "这个文件该不该生成?", "should I create this file or keep it in chat?" |The documentation asks the agent to create, modify, or delete local files.
*Before creating any new file**, fill out this check. If you cannot answer every field, **do not create the file.**The documentation asks the agent to read local files, directories, or repositories.
Ask for or infer the explicit scan root folder path.The documentation asks the agent to run terminal commands or scripts.
Run a read-only audit command first: `audit_dev_environment.py` for portable package/model cache mapping, or `audit-dev-environment.ps1` for Windows WSL2/Docker inspection.Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 92/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 20 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Stop AI agents from littering your repo with
plan.md,todo.md,summary.md, and throwaway artifacts. 别让 AI Agent 把你的项目根目录变成 Markdown 垃圾场。
This is not a Markdown deleter. This Skill governs the local environment where agents work: repository artifacts, workspace caches, WSL2/Docker storage, package-manager caches, model caches, and agent/IDE state.
A file or cache is not garbage just because it is large. It becomes a hygiene risk when it has no intent, no owner, no reader, no lifecycle, and no recovery path. The goal is not to delete aggressively — it is to ensure every artifact, cache, and local environment footprint has a purpose, a place, and a safe next action.
Use a three-layer model:
| Layer | Scope | Examples | Default action |
|---|---|---|---|
| Repository | Agent-created artifacts | plan.md, todo.md, .agent_tmp/, .agent_reports/ | classify, report, DryRun cleanup |
| Workspace | Development caches across projects | node_modules, .venv, target, build caches | audit, score, recommend |
| Local machine | Toolchains and virtualized environments | WSL2, Docker Desktop, package caches, model caches, agent/IDE state | read-only map, risk bucket, manual guidance |
Reports should separate:
Findings — facts observed locally.Safe Suggestions — low-risk next steps such as running DryRun or moving future reports into .agent_reports/.Manual / Risky Operations — migration, VHDX compaction, Docker data relocation, model cache relocation, or config edits. Never perform these automatically.Invoke this Skill when the user asks about:
| Trigger | Examples |
|---|---|
| Tidy / organize | "整理项目目录", "clean up this repo", "organize my project" |
| Generate artifacts | "写计划", "生成报告", "create a plan/todo/summary/report/audit" |
| Audit | "审计项目文件", "scan for agent artifacts", "列出可疑文件" |
| Clean up | "清理 Agent 文件", "clean agent temp files", "删除临时文件" |
| Decide | "这个文件该不该生成?", "should I create this file or keep it in chat?" |
| Score | "给我的仓库打洁癖分", "repo hygiene score", "how clean is my repo?" |
| Workspace audit | "扫描工作区", "audit my workspace", "找出多个仓库的 Agent 产物" |
| Local environment audit | "审计我的本地环境", "inspect local agent environment", "where are my dev caches" |
| Create rules | "创建 AGENTS.md / CLAUDE.md / Cursor Rules" |
| Task completion | Wrap-up hygiene check before exiting |
| Pollution | "多个 Agent 乱写文件", "project root is a mess of markdown" |
| Complaint | "不要生成垃圾文档", "清理 plan.md / todo.md" |
| Env Inspect | "inspect my coding environment", "where is node/python/go installed?" |
| Drive Growth | "why is my C drive growing?", "find package/model caches" |
| WSL2 / Docker | "WSL2 占用太大", "Docker Desktop disk is huge", "where is ext4.vhdx" |
| Model caches | "Ollama/Hugging Face models on C drive", "AI model cache audit" |
| Agent state | "Claude/Codex/Cursor state locations", "agent config/cache footprint" |
Stop and ask the user or strictly avoid if the request involves:
src/, lib/, app/).codex/, .claude/, .cursor/, .vscode/, *.sqlite, state.json, session.json, workspaceStorage, globalStorage, auth-token).wslconfig, Docker settings, shell profiles, or package manager configEvery file an agent creates belongs to one of five classes. Class — not extension — determines treatment.
| Class | Examples | Home | Lifecycle | Auto-delete? |
|---|---|---|---|---|
| A — Formal Documentation | README.md, CHANGELOG.md, LICENSE, docs/**, CONTRIBUTING.md, user notes | docs/, project root | Permanent | Never |
| B — User-requested Deliverables | audit report, migration plan, research write-up (user explicitly asked) | .agent_reports/ | 30 days | After retention |
| C — Temporary Working Artifacts | plan, todo, notes, scratch, progress, task_list | .agent_tmp/ | 7 days | After retention |
| D — Self-congratulatory | summary, final_report, work_summary, lessons, changes_summary | Do not create | N/A | N/A |
| E — Tool State (out of scope) | .codex/, .claude/, .cursor/, *.sqlite, state files | Tool dirs | N/A | Never |
Key rules:
<task>_<date>.md, never in project root.agent_tmp/ only, never committed, clean at task endBefore creating any new file, fill out this check. If you cannot answer every field, do not create the file.
Artifact Intent Check
─────────────────────
1. User requested a file? yes / no
2. Purpose:
3. Reader:
4. Expected lifetime: session / days / persistent / formal-doc
5. Destination path:
6. Why a chat response is not enough:
7. Class: temporary / persistent / formal-documentation
8. Should this be in .gitignore? yes / no
Decision rules:
| Scenario | Action |
|---|---|
| #1 = no, class ≠ A | Do not create. Answer in chat. |
| Purpose = plan/todo/summary/progress, reader = this user | Chat only. No file. |
| Must create, class = C | .agent_tmp/<specific-name>.md |
| Must create, class = B | .agent_reports/<task>_<YYYY-MM-DD>.md |
| Class = A (formal doc) | docs/ path, user explicitly requested |
| File restates this chat | Do not create |
| No clear reader | Do not create |
| No clear lifecycle | Do not create |
| No follow-up use | Do not create |
todo.md, plan.md, notes.md, lessons.md, summary.md, report.md,
final_report.md, implementation_plan.md, migration_plan.md,
audit_report.md, cleanup_report.md, task_list.md, progress.md,
work_summary.md, changes_summary.md, *_summary.md, *_report.md, *_plan.md
.agent_tmp/.agent_reports/docs/ (only when explicitly requested)<task>_<context>_<date>.md| Content | Allowed location |
|---|---|
| Temporary working files | .agent_tmp/ |
| User-requested reports | .agent_reports/ |
| Formal documentation | docs/ (explicit request required) |
| User-specified path | Any path the user explicitly named |
| Location | Why |
|---|---|
| Project root (generic process Markdown) | Reserved for formal repo files |
src/, lib/, app/ | Source directories |
.codex/, .claude/, .cursor/, .vscode/ | Tool state — do not touch |
README.md, README.*.md
CHANGELOG.md
LICENSE, LICENSE.*
CONTRIBUTING.md
CODE_OF_CONDUCT.md
SECURITY.md
Everything under docs/
Any Git-tracked file outside .agent_tmp/ or .agent_reports/
User hand-written notes
| Location | Default retention | Cleanup |
|---|---|---|
.agent_tmp/ | 7 days | Agent should clean its own at task end |
.agent_reports/ | 30 days | Move to docs/ for long-term keeping |
docs/ | Permanent | No auto-lifecycle |
When asked for a repo hygiene score, prefer ${CLAUDE_SKILL_DIR}/scripts/score_repo_hygiene.py when Python is available. On Windows-only environments, use ${CLAUDE_SKILL_DIR}/scripts/score-repo-hygiene.ps1.
| Score | Rating (en) | Rating (zh) |
|---|---|---|
| 90–100 | Clean | 很干净 |
| 70–89 | Mostly clean | 基本干净 |
| 50–69 | Needs tidy-up | 需要整理 |
| 0–49 | Artifact landfill | Agent 产物垃圾场 |
Dimensions: root cleanliness, artifact placement, protected docs clarity, Git hygiene, agent state isolation, cleanup readiness. Optional weight factors: --weights references/score-weights.example.json.
Optional project policy: place .tidy-skill.json (or tidy-skill.policy.json) at the repo root, or pass --policy. Schema example: references/tidy-skill.policy.example.json. Policy can extend forbidden/protected root patterns, set min_score, require .agent_tmp/ + .agent_reports/, and opt intentional planning-layout root names via planning_root_globs (see references/tidy-skill.policy.pwf.example.json for planning-with-files coexistence). .planning/** is recognized as intentional Class C working memory without a policy.
| Need | Script |
|---|---|
| One-shot install + hygiene doctor / CI gate | ${CLAUDE_SKILL_DIR}/scripts/tidy_doctor.py |
| DryRun-first safe repairs (layout dirs; optional root moves) | ${CLAUDE_SKILL_DIR}/scripts/tidy_repair.py |
| DryRun host hook config emitter | ${CLAUDE_SKILL_DIR}/scripts/tidy-install-hooks.py |
Classify a path before writing (Classes A–E); batch via --stdin --json | ${CLAUDE_SKILL_DIR}/scripts/classify_artifact.py |
Save/compare score history; gate on min_score | ${CLAUDE_SKILL_DIR}/scripts/hygiene_snapshot.py |
Safety verbs (always the same meaning):
tidy_repair.py --apply --move-root)tidy_repair.py is the diagnose→next-step companion to doctor. Default is a plan only. --apply creates .agent_tmp/ + .agent_reports/ with .gitkeep. Root process moves need both --apply and --move-root, and still refuse git-tracked / protected names.
hygiene_snapshot.py save writes under .agent_reports/hygiene-history/ by default (Class B deliverable history, not root litter). gate and doctor exit 2 on hygiene/policy failure.
When asked to scan multiple repos, prefer ${CLAUDE_SKILL_DIR}/scripts/audit_workspace_hygiene.py for a portable baseline. On Windows-only workflows, ${CLAUDE_SKILL_DIR}/scripts/audit-workspace-hygiene.ps1 is also fine. The user must explicitly specify a root directory. Never default to scanning entire drives.
For a single-repo agent artifact audit, prefer ${CLAUDE_SKILL_DIR}/scripts/audit_agent_artifacts.py when Python is available. Use ${CLAUDE_SKILL_DIR}/scripts/audit-agent-artifacts.ps1 when staying in a PowerShell workflow. Both audit and score accept optional --policy.
Optional end-of-task read-only check: ${CLAUDE_SKILL_DIR}/hooks/stop-hygiene-check.py (reports only; never deletes). Trigger phrases live in commands/TRIGGERS.md.
When asked about C-drive growth, WSL2, Docker Desktop, model caches, package caches, agent state, or local development environment sprawl, use ${CLAUDE_SKILL_DIR}/scripts/audit-dev-environment.ps1.
For portable package/model cache mapping on non-Windows environments, use ${CLAUDE_SKILL_DIR}/scripts/audit_dev_environment.py. Use the PowerShell script for Windows-specific WSL2/Docker VHDX inspection.
Rules:
-IncludeUserProfile only when the user wants default user-profile cache locations included.-IncludeDrives only when the user explicitly asks for drive-level hints..wslconfig edits, and model cache relocation as Manual / Risky Operations.For WSL2 and Docker details, read references/wsl2-docker-hygiene.md.
Allowed auto-cleanup:
.agent_tmp/ — files older than 7 days.agent_reports/ — files older than 30 daysForbidden auto-cleanup:
.git/, node_modules/, dist/, build/, target/, .venv/, venv/.agent_tmp/, .agent_reports/, root-level suspicious files, protected docsBefore reporting "done":
.agent_tmp/ files safe to delete now?summary.md / final_report.md / work_summary.md?.agent_reports/ or docs/?This Skill and its scripts:
C:\Windows, /, /usr, /etc, $HOME root unless explicitly requested).wslconfig, Docker settings, shell profiles, package manager configs, or model cache environment variables automaticallyaudit_dev_environment.py for portable package/model cache mapping, or audit-dev-environment.ps1 for Windows WSL2/Docker inspection.Overview Cards, Top 10 Optimization Plan, Findings, Safe Suggestions, and Manual / Risky Operations.${CLAUDE_SKILL_DIR}/scripts/install-local.ps1 -SelfCheckOnly to validate local package metadata.install-local.ps1 in DryRun mode before copying into .codex/skills or .claude/skills.洁癖.skill and machine slug tidy-skill.${CLAUDE_SKILL_DIR}/scripts/tidy_doctor.py --root . after install for package + hygiene gate.${CLAUDE_SKILL_DIR}/scripts/install-rule-template.ps1 in DryRun mode first.AGENTS, CLAUDE, cursor, or all.-Force.references/script-usage.md.references/artifact-classification.md.references/safety-boundaries.md.references/hygiene-scoring-model.md.references/wsl2-docker-hygiene.md.commands/TRIGGERS.md.hooks/HOOKS.md.docs/installation.md and docs/platforms/.docs/host-samples/.references/tidy-skill.policy.example.json.Frequently asked questions
Stop AI agents from littering your repo with plan.md, todo.md, summary.md, and throwaway artifacts. 别让 AI Agent 把你的项目根目录变成 Markdown 垃圾场。
The source record exposes this install command: npx skills add https://github.com/Phoenix0531-sudo/tidy-skill --skill "skills/tidy-skill". Inspect the command and pinned source before running it.
Static rules flagged write-files, read-files, exec-script in the source; the page lists the matching lines and excerpts.