refactor-claude-md
Modularize large CLAUDE.md files with path-scoped rules and doc extraction
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Modularize large CLAUDE.md files with path-scoped rules and doc extraction
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Run dead-code and duplicate-code detection across the codebase, get categorized cleanup recommendations
Review the current diff for correctness bugs and spec drift, then emit an evidence-oriented findings list
Execute a plan file step-by-step with progress tracking and phase checkpoints
Initialize a session by executing the cross-agent New Sessions protocol declared in AGENTS.md.
Deep research with parallel sub-agents, query classification, and filesystem artifact passing
One-time contributor setup. Install spec-spine and verify the governed loop (compile, index check, lint, couple) so /init can report lifecycle and structural counts.
| name | refactor-claude-md |
| description | Modularize large CLAUDE.md files with path-scoped rules and doc extraction |
You are helping refactor a CLAUDE.md file to reduce its size while preserving guidance through dedicated documentation files and path-scoped rules.
Read and analyze the current CLAUDE.md file in its entirety.
Identify extraction candidates: sections that are:
For each candidate section, recommend:
docs/Suggest documentation table structure:
Create the files in this order:
docs/[NAME].md.claude/rules/[name].md with appropriate globs and @importsFor path-scoped rules, use this format:
---
globs:
- "pattern1/**/*"
- "pattern2/**/*"
imports:
- docs/DOC_NAME.md
---
Brief reminder text with 2-3 key points referencing the imported doc.
Ask the user which CLAUDE.md file to refactor (default to ./CLAUDE.md if not specified).
$ARGUMENTS