Offline Telemetry Script — Development skill for Claude Code
Offline analyzer for Claude Code session transcripts (~/.claude/projects/.jsonl).
How to install Offline Telemetry Script
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open claude-code-king/offline_telemetry_script and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Offline Telemetry Script does
Offline analyzer for Claude Code session transcripts (~/.claude/projects/*.jsonl). Pure-stdlib Python, no API calls: per-session tokens, cache hit/churn, estimated USD cost, subagent tree, waste signals (batchable Bash, narration, re-reads). Built for one specific multi-agent workflow; runs anywhere, some signals won't apply.
Alternatives in Development
README
offline_telemetry_script
Offline analyzer for Claude Code transcripts. Stdlib only, no API calls.
Disclaimer
This was built for the author's own multi-agent workflow: a planning model (Fable) writes plans, an execution model (Opus) implements them, work is split across named agents, and agent reports come back in Romanian. It runs on any Claude Code transcript, and the token/cost/cache numbers are real everywhere. But the waste/governance signals (batchable Bash calls, narration-only turns, re-reads, agent-name grouping) assume that workflow and will look off, or come back empty, on a different one. Comments shaped `🔴 constraint — DECIZII/PATTERNS «section»` point to internal notes that are not included in this repo (DECIZII is the author's decision log, PATTERNS the notes on technical pitfalls).
Why it exists
"I know the numbers look made up. They're not — this is how I got them." The cost/token figures in the accompanying post come from running this script against local transcripts, nothing else.
What the output looks like
Two levels. Per session, a markdown report with cost, turns, the subagent tree, a list of inefficiencies and a short postmortem:


Across sessions, `--trends` builds a `TRENDS.md`: spend, cache savings and waste per version of the workflow, plus recurring inefficiencies. This is the part that is actually useful: you change a rule in your workflow, then you see in numbers whether the next sessions got cheaper or noisier. You optimize on real data, not on feeling or vibes.


Install / run
Requires Python 3.6+, no dependencies.
python3 session_metrics.py --pricing pricing.json ~/.claude/projects//
python3 session_metrics.py --pricing pricing.json --json --out-dir out/ ~/.claude/
Related Skills
Cjm Harness Transcripts
Parse agent-harness session transcripts (Claude Code JSONL first): the append-only record DAG, derived active
V Memory Refresh
(Re)index docs/superpowers prose into the local V-memory cache so recall is current. Incremental by file hash;
Session Knowledge
Turn your Claude Code session history into a searchable local knowledge base — 13 MCP tools, pure stdlib, noth
Sky Claude Hud
A lightweight two-line statusline for Claude Code that works over SSH and in terminals like Xshell — pure Pyth
Ctxprof
Profile Claude Code JSONL sessions into six estimated token buckets, compare runs, and identify large context
Jarvis OS
Talk to your computer. A voice HUD for Claude Code — uses your own connectors and skills, ElevenLabs voice bot
Related Agents
Cost Forecaster
Forecasts GDD spend over the next N design cycles. Reads .design/telemetry/costs.jsonl (grouping est_cost_usd
Stats Analyzer
Analyzes ~/.claude/stats-cache.json and history.jsonl to produce a concise usage report with model token break
Usage Reporter
Reads real Claude Code usage from ~/.claude/stats-cache.json. Reports daily/weekly token usage by model, cache