1 Commits

Author SHA1 Message Date
oleks fb6056d996 Initial commit: token-budget plugin
cc-tokens: offline stdlib analyzer over ~/.claude/projects/**/*.jsonl.
Attributes spend by session/project/model/token-category and diagnoses
marathon sessions, bloated contexts, subagent fan-out and mid-session
model switching.

Handles the two transcript traps: one message spans many JSONL lines all
repeating the same message-level usage, and output_tokens are streaming
snapshots that must be maxed per (message.id, requestId). Validated
against ccusage on a full day to within 0.1%.

Skills split diagnosis (token-audit) from the two remediation levers:
session lifecycle (session-hygiene) and per-turn payload (context-diet).
2026-07-22 22:49:17 +03:00