By kojott
Analyze and optimize CLAUDE.md hierarchies, .claude/rules, and docs/ folders by detecting redundancies, conflicts, and anti-patterns, then applying Anthropic best practices to improve documentation structure.
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:
| 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-optimizer
claude 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) |
MIT + Commons Clause - Free to use, modify, and share. Commercial selling requires author's approval. See LICENSE for details.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub joshuarweaver/cascade-code-general-misc-1 --plugin kojott-claude-docu-optimizerPre- and post-implementation validation with parallel subagents: /replan validates plans before execution, /recheck verifies implementations match the plan
Get Telegram notifications when Claude Code finishes a task or needs attention. Know when to come back and assign new work.
Optimize your CLAUDE.md hierarchy — deduplicate, detect misplacement, compress bloat, and visualize token usage across global/project/repo levels
Audit CLAUDE.md files against Anthropic best practices
CLAUDE.md lifecycle toolkit: initialise, enhance, sync, and modularise CLAUDE.md files with a 150-line cap, automatic chaining, and Karpathy behavioural guardrails.
Tools to maintain and improve CLAUDE.md files - audit quality, capture session learnings, and keep project memory current.
Automatically update CLAUDE.md file based on recent code changes
Rewrite a CLAUDE.md file using <important if> blocks to improve instruction adherence