一键导入
declutter
Identify misplaced files and organize project structure following open-source best practices, while delegating refactoring to specialized skills
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Identify misplaced files and organize project structure following open-source best practices, while delegating refactoring to specialized skills
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run the pragmatic-skeptic 'ponytail' reviewer over the current diff to surface over-engineering — code, abstractions, dependencies, files, or process steps the problem does not need. Read-only and advisory; never trims safety, security, accessibility, data-loss handling, or their tests. Use before pushing a PR, when a change feels heavier than the task warranted, or when boilerplate/a new dependency crept in. Triggers: 'ponytail review', 'is this over-engineered', 'what can I delete here', 'did I over-build this'.
Use this skill to run a structured user-discovery interview for Caro and save the transcript into docs/discovery/transcripts/ under the project's anonymization rules. Use when a new product line or major feature spec needs to clear Gate 1 of .claude/rules/validation-discipline.md (the 20-transcripts rule). Also use to synthesize transcripts into the hypothesis ledger after each batch of 5 interviews. Triggers - "run a discovery interview for <feature>", "log this user conversation as a Caro discovery transcript", "synthesize this week's transcripts into the hypothesis ledger".
Safely reclaim disk space in the caro project. Cleans Rust build cache, stale git worktrees (both .claude/worktrees/ and .worktrees/), empty stubs, and node_modules using a tiered audit that preserves any worktree with uncommitted changes, missing remotes, or a lock file. Use when du shows the project > 30 GB or disk free is low.
DEPRECATED 2026-05-16 — use caro-shell instead. This skill recommends the --backend claude flag and a ~/.config/caro/config.toml path that do not work on the current caro 1.4.0 binary, and its 522-line educational body is 4× the size of caro-shell for no benefit to an agent. Will be removed after 2026-08-01.
Use this skill when the user needs a POSIX shell command synthesized from natural language — "how do I find/grep/awk/find files modified in the last hour", "kill the process on port 3000", "tar this up excluding .git", or any other terminal-task-as-prose. Shells out to the `caro` CLI for safety-validated command inference and presents the suggestion for explicit approval. Refuses to execute the command itself.
Build, render, ship, AND MAINTAIN the caro landing-page demo video using Remotion. Use when creating, updating, re-rendering, extending the project demo MP4 at website/public/caro-demo.mp4 — or when responding to a drift alert from the caro-demo-drift CI workflow or a beads task with label `caro-demo-video`.
| name | declutter |
| description | Identify misplaced files and organize project structure following open-source best practices, while delegating refactoring to specialized skills |
| version | 1.0.0 |
| allowed-tools | Bash, Read, Grep, Glob, Task, Skill |
| license | AGPL-3.0 |
Purpose: Create a clean, welcoming project structure where every file has its proper place, following open-source conventions and the project's established patterns.
Philosophy: A well-organized project should produce a hand-sized, predictable tree that immediately communicates what the project does and how it's structured. The root should be clean and inviting, not overwhelming.
The project root is the first impression. It should contain only:
Files that belong together stay together:
Declutter identifies and recommends but does not refactor alone:
refactor skilltechnical-writer agentdevops skillWhen placement is ambiguous:
Trigger Phrases:
Automatic Contexts:
Phase 1: Assessment (Survey)
↓
Phase 2: Classification (Categorize)
↓
Phase 3: Research (Consult Skills)
↓
Phase 4: Proposal (Plan Moves)
↓
Phase 5: Execution (Delegate Actions)
Goal: Understand current state without judgment.
Capture the current tree:
tree -L 2 -a --dirsfirst -I '.git|node_modules|target|__pycache__|.venv'
Identify technology stack:
package.json, Cargo.toml, pyproject.toml, go.mod, etc.Count root-level items:
ls -la | wc -l
Healthy root: 10-20 items (dirs + essential files) Needs attention: 20-30 items Critical: 30+ items
Identify outliers:
Goal: Assign each item to a category for action.
| Category | Examples | Action |
|---|---|---|
| Essential Root | README, LICENSE, main config | Keep in root |
| Documentation | *.md guides, ADRs, specs | Move to /docs |
| Configuration | dotfiles, *.config.js | Consider /config or keep root |
| Scripts | Shell scripts, automation | Move to /scripts |
| DevOps | CI/CD, Docker, k8s | Move to .github/, /deploy |
| Source Code | Application code | Move to /src, /lib, /app |
| Tests | Test files | Move to /tests or colocate |
| Build Artifacts | Generated files | Add to .gitignore |
| Experiments | POCs, spikes | Move to /sandbox or delete |
| Orphaned | No clear purpose | Ask user or delete |
For Markdown Files:
README.md, CONTRIBUTING.md, CHANGELOG.md → Root (OSS standard)
CODE_OF_CONDUCT.md, SECURITY.md → Root (GitHub special files)
*.md (other) → /docs
For Configuration:
Single dotfile → Root acceptable
Multiple similar configs → /config directory
Build tool config → Usually root (webpack.config.js, etc.)
Editor config → Root (.editorconfig, .prettierrc)
For Scripts:
1-2 scripts → /scripts or root acceptable
3+ scripts → Must move to /scripts
Shell scripts → /scripts
Build scripts → /scripts/build or npm scripts
Goal: Get expert guidance before making moves.
| Question Type | Consult |
|---|---|
| "Where should docs go?" | technical-writer agent |
| "How to structure Rust project?" | rust-cli-architect agent |
| "Best practices for this framework?" | Explore agent with framework focus |
| "Is this safe to delete?" | safety-pattern-auditor skill |
| "How to reorganize build pipeline?" | devops skill (if exists) |
| "Cultural/locale files placement?" | multicultural-holidays skill |
Check if skill exists:
Glob: .claude/skills/*/SKILL.md
Check if agent can help:
If skill/agent available:
Task: [appropriate-agent]
Prompt: "I'm decluttering this project and need guidance on
[specific question]. What's the best practice for [specific situation]?"
If skill/agent not available:
Report to user:
"I'd like to consult a [skill-type] skill for [reason], but it's
not installed. Would you like to:
a) Configure/install the skill
b) Proceed with my best judgment
c) Skip this category for now"
When framework-specific guidance isn't available, research:
Use the Explore agent:
Task: Explore
Prompt: "Find the standard directory structure for [technology] projects.
Focus on: root organization, docs placement, scripts location, config handling."
Goal: Present a clear, actionable reorganization plan.
## Declutter Proposal - [Project Name]
### Current State
- Root items: 42 (Critical - needs attention)
- Tech stack: Rust CLI with Astro website
- Primary issues: Documentation scattered, scripts mixed
### Proposed Structure
project-root/ ├── .claude/ # Claude configuration (keep) ├── .github/ # GitHub workflows (keep) ├── docs/ # Documentation (create) │ ├── architecture/ # ADRs and design docs │ ├── guides/ # User guides │ └── api/ # API documentation ├── scripts/ # Automation (organize) │ ├── build/ # Build scripts │ ├── dev/ # Development helpers │ └── release/ # Release automation ├── src/ # Source code (keep) ├── tests/ # Test files (keep) ├── website/ # Astro site (keep) ├── Cargo.toml # Main config (keep) ├── README.md # Entry point (keep) ├── LICENSE # Legal (keep) └── CHANGELOG.md # History (keep)
### Proposed Moves
| File | From | To | Reason |
|------|------|-----|--------|
| ARCHITECTURE.md | / | /docs/architecture/ | Standard docs location |
| setup.sh | / | /scripts/ | OSS convention |
| dev-notes.md | / | /docs/guides/ | Internal documentation |
### Files to Delete
| File | Reason |
|------|--------|
| backup.old | Obsolete backup |
| test_experiment.rs | Superseded by /tests |
### Files Requiring Decision
| File | Options |
|------|---------|
| random_script.py | A) Delete B) Move to /scripts C) Keep |
### Skills to Engage
1. `technical-writer` - Restructure /docs hierarchy
2. `refactor` - Update import paths after moves (NOT AVAILABLE - recommend install)
Goal: Execute the plan with proper delegation.
refactor skill# Always use git mv for tracked files
git mv old/path new/path
# Create directories first
mkdir -p new/directory
# Batch related moves
git mv docs/*.md docs/guides/
Check for broken links:
grep -rn "old/path" --include="*.md" --include="*.rs"
Verify imports still work:
cargo check # For Rust
npm run build # For JS
Update any absolute references
# Single logical commit for declutter
git add -A
git commit -m "$(cat <<'EOF'
refactor: Declutter project structure
Moves:
- ARCHITECTURE.md → docs/architecture/
- setup.sh → scripts/
- dev-notes.md → docs/guides/
Deletes:
- backup.old (obsolete)
- test_experiment.rs (superseded)
Created:
- docs/architecture/ directory
- scripts/build/ directory
Consulted: technical-writer agent, OSS conventions
EOF
)"
For mono-repos, declutter level by level:
/config.github/ or /cimonorepo/
├── .github/ # Shared CI/CD
├── docs/ # Shared documentation
├── packages/ # Sub-projects
│ ├── app-a/
│ │ ├── src/
│ │ ├── tests/
│ │ └── package.json
│ └── app-b/
├── scripts/ # Shared automation
├── config/ # Shared configuration
├── package.json # Root workspace
└── README.md
project/
├── src/
│ ├── lib.rs # Library entry
│ └── main.rs # Binary entry
├── tests/ # Integration tests
├── benches/ # Benchmarks
├── examples/ # Example usage
├── Cargo.toml
└── README.md
project/
├── src/ # Source code
├── dist/ # Build output (gitignored)
├── tests/ or __tests__/ # Tests
├── scripts/ # Build/dev scripts
├── package.json
└── README.md
project/
├── src/project_name/ # Package code
├── tests/ # Tests
├── docs/ # Documentation
├── scripts/ # Automation
├── pyproject.toml
└── README.md
See references/oss-conventions.md for comprehensive patterns.
┌─────────────────────────────────────────────────────────┐
│ DECLUTTER CHECKLIST │
├─────────────────────────────────────────────────────────┤
│ │
│ Assessment: │
│ ☐ Tree captured (depth 2) │
│ ☐ Tech stack identified │
│ ☐ Root item count: _____ (target: <20) │
│ ☐ Outliers identified │
│ │
│ Classification: │
│ ☐ Each item categorized │
│ ☐ Actions assigned (keep/move/delete/ask) │
│ │
│ Research: │
│ ☐ Relevant skills consulted │
│ ☐ Missing skills reported │
│ ☐ OSS conventions checked │
│ │
│ Proposal: │
│ ☐ Target structure documented │
│ ☐ Move plan created │
│ ☐ User decisions collected │
│ │
│ Execution: │
│ ☐ Moves delegated to skills where needed │
│ ☐ git mv used for tracked files │
│ ☐ Broken references fixed │
│ ☐ Commit created with full context │
│ │
└─────────────────────────────────────────────────────────┘
refactor skillrefactor - For updating imports after movestechnical-writer - For documentation restructuringExplore agent - For OSS convention researchdevops - For pipeline reorganizationvalidate-constitution - For checking project rulesUsing the Task tool:
Task: general-purpose
Prompt: "Run the declutter skill on this project.
Follow the workflow in .claude/skills/declutter/SKILL.md:
1. Assess the current structure
2. Classify all files/directories
3. Consult relevant skills for guidance
4. Create a proposal document
5. Present it for user approval before execution
Focus on making the root clean and welcoming.
Respect existing conventions and correlations.
Delegate refactoring to appropriate skills."
Declutter is complete when:
A decluttered project is a welcoming project. Every file in its place, every place with purpose.