Trace context waste to the rule that found it
Context health scores the active findings for one repository over a window of local Claude Code telemetry. The score starts at 100 and loses a set number of points per finding, so read the rule, its evidence and its suggested fix to know what the number means. The CLAUDE.md scorecard beside it checks the instruction file itself.
Watch it
Read the narration
- 0:00 A hundred-point score can look precise while hiding the habit behind it.
- 0:06 Treat the score as an index: inspect each deduction and its evidence before changing behavior.
- 0:13 RepoOps names the rule, its severity, the evidence and the fix.
- 0:17 The points come from this repository's local telemetry window.
- 0:23 Change one habit, then compare the next measured window before judging progress.
Synthetic example. Read the guide
How to
Claude Code sessions captured for the repository on this machine. Several rules stay silent until they have enough sessions.
- Open Memory, then Context health under All tools.
It sits in the Knowledge health group. Choose 7 days, 30 days or 90 days from Window; 30 is the default.
- Read the score and its band.
Green begins at 85, amber at 60, red below 60. The bands describe the arithmetic, not how the next session will go.
- Read Active findings before anything else.
Each finding shows the rule id, its severity, the measured evidence and a Suggested fix. Per-rule deductions shows exactly how many points each finding took.
- Tune Severity weights only if a finding costs you more or less.
The defaults deduct 10 for Error, 5 for Warn and 1 for Info. Enter values from 0 to 100 and press Save weights. The weights apply to every repository this install serves and to the CLAUDE.md scorecard, which saves the same three.
- Check the instruction file with the CLAUDE.md scorecard.
Open Memory in the sidebar, then the Wiki tab, and read CLAUDE.md scorecard for the repository picked on the card. It gives one row per load-bearing rule with a pass or fail, its severity and the fix for each miss, failing rules first. Press Failing to see only the gaps.
Use cases
Fresh input is high across several sessions
- Situation
- At least three captured sessions average 150,000 or more fresh-input tokens (input plus cache creation).
- You do
- Read the cc.context-health.context-bloat finding's evidence and suggested fix before changing how sessions start.
- You see
- A measured reason to try a narrower opening prompt, bounded reads or shorter tool output. With default weights the finding takes 5 points. The score cannot tell you which change helped later.
Prompt-cache reuse is low
- Situation
- At least three sessions carry 100,000 or more fresh-input tokens, and cache reads are under half of fresh plus cached input.
- You do
- Read cc.context-health.cache-read-low and its cache-read and fresh totals.
- You see
- A prompt to look at compaction, restarts or topic changes. A low share can simply describe the work, so it is not a verdict on the developer.
Expected outcome
Next step: No rule had enough input to fire. Check the window and the session count before reading it as healthy.
Next step: A value is not a number from 0 to 100. Enter Error, Warn and Info values in range.
Next step: Open it from the repository. If it still fails, read the error /api/health returns for that repository id.
What else to consider
What the score cannot establish
It aggregates one repository over a window. It is not a live grade for one session, not a team-wide score, and not proof that a suggested change will help. Setting a weight to 0 removes its points but does not stop its rules or hide their findings. Per-rule thresholds live under config/rules by rule id; they decide whether a finding fires.
The CLAUDE.md scorecard
The scorecard grades your CLAUDE.md against about two dozen load-bearing clauses, from the worktree rule to secrets, each a plain rule file under lib/rules/claudemd.*.mjs that lib/rules/index.mjs registers. The score uses the same 85 and 60 bands and the same weights, and the card saves those weights too. When no CLAUDE.md exists at the expected path, the card says so instead of scoring an empty file. The same read is GET /api/scorecard.
On repoops.ai
On repoops.ai the Context health card on Memory's Wiki tab shows the 30-day score each bound desktop publishes with its brain, per repository, and the CLAUDE.md scorecard grades each published CLAUDE.md with the desktop's rules. /team/context-health and /team/claude-md-scorecard open the Memory page.
Data and cost
The score reads daily files under .claude/brain/claude-code-usage and runs local rules; nothing leaves the machine and no model is called. Saving weights writes config/health-weights.json beside the running server. The window limits the read, not what is kept.