A Claude Code plugin for optimizing CLAUDE.md files and the docs/ documentation ecosystem following battle-tested patterns from Boris Cherny's team at Anthropic.
Analyzes and optimizes your project documentation to keep Claude Code's context efficient and your docs synchronized with code.
Key features:
- Token analysis with target benchmarks (2.5k ideal, 4k max)
- 10 anti-pattern detection (context stuffing, stale docs, orphan files, code-doc drift...)
- Semantic sync analysis between code and documentation
- Project stage detection (INIT / ACTIVE / STABLE / MAINTENANCE)
- Documentation ecosystem mapping and link graph analysis
| Mode | Description |
|---|---|
analyze |
Report issues only (default) |
optimize |
Full analysis + optimized version |
apply |
Directly update the file |
compare |
Before/after with token savings |
create |
Generate new CLAUDE.md from project structure |
sync |
Semantic check of docs ↔ code synchronization |
audit |
Complete audit of documentation ecosystem |
scaffold |
Generate docs/ structure for new project |
Add the marketplace and install the plugin:
claude plugin marketplace add https://github.com/kojott/claude-docu-optimizer
claude plugin install docu-optimizer@claude-docu-optimizerclaude plugin marketplace update claude-docu-optimizer
claude plugin update docu-optimizer@claude-docu-optimizer/docu-optimizer analyze # Report issues
/docu-optimizer optimize # Full analysis + optimized version
/docu-optimizer apply # Directly update CLAUDE.md
/docu-optimizer compare # Before/after comparison
/docu-optimizer create # Generate new CLAUDE.md
/docu-optimizer sync # Check docs ↔ code sync
/docu-optimizer audit # Full documentation ecosystem audit
/docu-optimizer scaffold # Generate docs/ structure
| Metric | Value |
|---|---|
| Ideal CLAUDE.md size | ~2.5k tokens (~100-150 lines) |
| Maximum recommended | 4k tokens |
| Warning threshold | 5k+ tokens (causes context rot) |
- Context Stuffing - Verbose, redundant instructions
- Static Memory - No evolution/learnings section
- Missing Plan Mode Guidance - No workflow section
- No Verification Loop - No test commands specified
- Permissions Not Documented - Team environments only
- No Format Standards - Missing formatting hooks
- Stale Documentation - Docs don't match code
- Missing Index - No docs/README.md
- Orphan Docs - Unreferenced documentation files
- Code-Doc Drift - API signatures out of sync
MIT + Commons Clause - Free to use, modify, and share. Commercial selling requires author's approval. See LICENSE for details.