npx claudepluginhub lifegenieai/lifegenie-claude-marketplace --plugin optimize-claude-mdaudit|optimize|create|migrate|enforceComprehensive toolkit for CLAUDE.md file optimization, auditing, creation, and enforcement setup.
LLMs Are Stateless: Claude starts every session with zero codebase knowledge. CLAUDE.md is the ONLY file included by default in every conversation.
Critical Constraints:
| Constraint | Limit |
|---|---|
| Instruction Limit | ~150-200 instructions (LLM reliable following) |
| Claude Code System | ~50 instructions consumed by harness |
| Your Budget | ~100-150 instructions for CLAUDE.md |
4-Tier Hierarchy (specific to general):
./CLAUDE.local.md (gitignored)./CLAUDE.md (<300 lines)~/.claude/CLAUDE.md (<60 lines)Format Efficiency:
| Format | Efficiency |
|---|---|
| Code examples | 10x prose |
| XML tags | 10x + parsing |
| Tables | 5x prose |
| Bullets | 3x prose |
| Prose | 1x (avoid) |
Based on user intent or $ARGUMENTS, route to the appropriate workflow:
| Intent | Workflow | File |
|---|---|---|
| "audit", "score", "assess", "review" | Audit | ${CLAUDE_PLUGIN_ROOT}/workflows/audit-claudemd.md |
| "optimize", "improve", "refactor" | Optimize | ${CLAUDE_PLUGIN_ROOT}/workflows/optimize-claudemd.md |
| "create", "new", "build from scratch" | Create | ${CLAUDE_PLUGIN_ROOT}/workflows/create-claudemd.md |
| "opus", "4.5", "migrate", "upgrade" | Migrate | ${CLAUDE_PLUGIN_ROOT}/workflows/migrate-opus.md |
| "enforcement", "hooks", "settings" | Setup | ${CLAUDE_PLUGIN_ROOT}/workflows/setup-enforcement.md |
If intent is unclear from $ARGUMENTS, ask:
What would you like to do?
- Audit - Score against rubric, identify improvements
- Optimize - Apply best practices to existing file
- Create - Build new CLAUDE.md from scratch
- Migrate - Adjust for Opus 4.5+ behavior
- Setup Enforcement - Configure hooks and settings
Read the appropriate workflow file and execute its instructions.
| File | Purpose |
|---|---|
${CLAUDE_PLUGIN_ROOT}/references/best-practices.md | Canonical best practices |
${CLAUDE_PLUGIN_ROOT}/references/rubric.md | 100-point scoring framework |
${CLAUDE_PLUGIN_ROOT}/references/transformation-guide.md | Language softening patterns |
${CLAUDE_PLUGIN_ROOT}/templates/boundaries-section.md | Always/Ask/Never template |
${CLAUDE_PLUGIN_ROOT}/templates/audit-report.md | Audit output format |
${CLAUDE_PLUGIN_ROOT}/templates/project-claudemd-starter.md | Project template |
${CLAUDE_PLUGIN_ROOT}/templates/user-claudemd-starter.md | User template |
${CLAUDE_PLUGIN_ROOT}/scripts/analyze.ts | Deterministic analysis script |
| Pattern | Problem |
|---|---|
| Auto-generating CLAUDE.md | Loses high-leverage manual crafting |
| Mixing hierarchy levels | User vs project vs task-specific |
| Task-specific in project file | Use progressive disclosure |
| Style guides in CLAUDE.md | Use linters + hooks instead |
| Embedded code snippets | Use file:line pointers |
| Exceeding instruction budget | Ruthlessly cut non-essential |
A well-optimized CLAUDE.md: