From claude-resources
Refactors large CLAUDE.md files into a hierarchical directory-scoped structure for optimized Claude Code context delivery.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-resources:claudemd-refactorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Analyze and refactor CLAUDE.md files in the current repository to optimize how context is delivered to Claude Code.
Analyze and refactor CLAUDE.md files in the current repository to optimize how context is delivered to Claude Code.
When deciding where to place information, follow this hierarchy (most to least reliable):
| Approach | Reliability | Tradeoff |
|---|---|---|
| Inline in CLAUDE.md | Highest | Larger CLAUDE.md |
| Directory-scoped CLAUDE.md | High | Content must be relevant to that directory |
| Explicit "read before doing X" | Medium | Depends on Claude following the instruction |
| Passive "refer to file" | Low | Claude may or may not read it |
Key principle: Claude Code automatically loads CLAUDE.md files based on the working directory. Root CLAUDE.md is always loaded. Subdirectory CLAUDE.md files are loaded when working on files in that directory. Content in CLAUDE.md is always in context — no tool call needed.
Find all existing CLAUDE.md files in the repo
Glob: **/CLAUDE.md
Read the root CLAUDE.md — understand what's currently there, measure its size
Explore the repo structure — understand the directory layout, identify logical boundaries
Present the user with a concrete proposal. Include:
Proposed CLAUDE.md structure — show a tree like:
repo/
├── CLAUDE.md # Global: project overview, tech stack, universal conventions
├── src/
│ └── CLAUDE.md # Code: naming conventions, import rules, architecture patterns
├── docs/
│ └── CLAUDE.md # Docs: writing style, frontmatter, formatting rules
└── tests/
└── CLAUDE.md # Tests: testing conventions, fixture locations, coverage rules
For each proposed CLAUDE.md, list:
IMPORTANT: Do NOT proceed without explicit user approval. Present the plan and ask:
After approval:
Use these rules to decide where content belongs:
When analyzing existing CLAUDE.md, look for and fix these anti-patterns:
npx claudepluginhub takazudo/claude-resources --plugin claude-resourcesAudits and improves CLAUDE.md files in repositories by scanning for them, evaluating quality against criteria, generating reports, and applying targeted updates after approval.
Initializes or migrates repositories to nested CLAUDE.md structure for progressive disclosure and contextual Claude guidance. CLI: /init-deep with --fresh and --max-depth flags.
Audits CLAUDE.md files in repositories: discovers files via find, evaluates quality against rubrics, generates reports, and applies targeted improvements after approval.