Back to Vibe Coder Toolkit
Intelligence
Context Optimizer
Stop burning tokens on bloat
npx promptreports-cli contextMeasures context window consumption: CLAUDE.md, skills, memory, system prompt. Finds skills that load but never get invoked.
Every Claude Code turn loads your CLAUDE.md, all skills, memory files, and system prompt — even if you never use them. context measures that startup tax. Shows biggest consumers, skills that never get invoked (dead weight), and files you read every session (candidates for context injection). Calculates estimated daily savings if you trim the bloat.
On this page
Prerequisites
- CLAUDE.md and skills optional
- Session files for usage patterns
Flags & Options
| Flag | Description | Default |
|---|---|---|
| --days N | Lookback for usage patterns | 7 |
| --json | JSON output | — |
Examples
See your context cost
npx promptreports-cli contextDefault — what are you paying to load every turn?
Export for trim plan
npx promptreports-cli context --jsonFeed into automated CLAUDE.md optimizer.
Output
Context budget bar + biggest consumers table + unused skills list + top file reads + estimated savings.
CONTEXT BUDGET: 200K tokens
USED AT START: 18,450 tokens (9.2%)
████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
BIGGEST CONSUMERS:
CLAUDE.md 8,200 tokens (44%)
Skills (7 loaded) 5,400 tokens (29%)
System prompt 4,500 tokens (24%)
Memory files (12) 1,900 tokens (10%)
SKILLS NEVER INVOKED (last 7 days):
- old-deploy-script (~450 tokens)
- experimental-ai-feature (~380 tokens)
- legacy-image-tool (~290 tokens)
Removing saves ~1,120 tokens/session
MOST-READ FILES (candidates for context injection):
- lib/prisma.ts read 23 times
- app/api/auth/route.ts read 18 times
Estimated savings: $0.14/day if you apply optimizationsWhat it reads and writes
Reads
- CLAUDE.md
- .claude/skills/*/SKILL.md
- .claude/memory/
- ~/.claude/memory/
- ~/.claude/projects/**/*.jsonl
Writes
Nothing (read-only)
Free vs Pro usage
Free tier
- Know your startup token cost
- Identify skills to delete
- Optimize CLAUDE.md to fit under 2K tokens
Pro tier
Upgrade- Auto-apply trim suggestions (PR with before/after)
- Track context size over time — alert on bloat
- A/B test CLAUDE.md variants for quality impact
- Skill auto-pruning — unused for 30d? auto-archive
Pro tips
- Target: 5K tokens startup or less
- CLAUDE.md > 2K words is usually bloat — trim
- If a skill has 0 invokes in 30 days, delete it