claude-md-optimizerlisted
Install: claude install-skill jackneil/claude-jacked
# CLAUDE.md Optimizer
Audit, restructure, and optimize CLAUDE.md files for maximum signal-to-token ratio. Combines content quality assessment with token efficiency — because a CLAUDE.md that's complete but bloated wastes thousands of tokens every turn.
## Core Principle
**CLAUDE.md gets re-injected into every conversation turn.** Every line costs tokens on every single API call. Content that's only needed for specific tasks should live in sub-docs with strong pointers, not in the main file.
```
CLAUDE.md = rules for EVERY task + strong pointers to task-specific docs
Sub-docs = detailed reference loaded on-demand when relevant
```
## Token Budget
| Project size | CLAUDE.md target | Max |
|---|---|---|
| Small (< 20 files) | < 80 lines | 120 lines |
| Medium (20-100 files) | < 150 lines | 200 lines |
| Large (100+ files) | < 200 lines | 250 lines |
Lines are a proxy — **tokens are the real per-turn cost.** Measure them directly with `/context` (run it in the target repo). Anthropic's official guidance is **< 200 lines**; lean teams run ~60 lines / **< 500 tokens** (a verified 3,847 → 312-token cut = 91.9% reduction with no quality loss). Aim under the line budget above *and* as far under ~500 tokens as the project allows.
If CLAUDE.md exceeds the max, it MUST be restructured — not trimmed. Trimming loses information. Restructuring moves it to sub-docs, path-scoped rules, or Skills.
## Workflow
### Phase 1: Discovery
Find all CLAUDE.md files and related documentation