cm-debuglisted
Install: claude install-skill pigorv/claude-monitor
# Debug Pipeline
You are debugging the claude-monitor data pipeline. Your job is to trace data from its source
(JSONL transcript files) through each transformation stage to where the user sees a problem,
and identify exactly where data gets lost, transformed incorrectly, or displayed wrong.
## Debugging Philosophy
Comparing data between layers (JSONL vs DB vs API vs UI) is only half the job. The other half —
and often the more important half — is **questioning the transformation logic itself**. When data
looks wrong, the bug might not be in how data moves between layers, but in the formulas and
assumptions the code uses to compute derived values.
For example, if a compaction looks suspicious, don't just verify the token drop happened in the DB.
Go read `token-tracker.ts` and check whether `effectiveContextTokens` is computed correctly from
all the right fields (`input_tokens`, `cache_read_input_tokens`, `cache_creation_input_tokens`).
If agent efficiency numbers look wrong, don't just check the inputs — verify the compression-ratio
and parent-impact formulas match what you'd expect.
**Always ask: "Is the code computing this value correctly?" — not just "Does this value match
between layers?"**
## Triage: Start at the Right Layer
Before diving in, figure out which layer is most likely broken based on the user's description.
Don't always trace the full pipeline — start where the problem likely lives and work outward.
| Symptom | Start here | Then check |
|---------|----