token-analyser

Analyze Claude Code session token costs from JSONL and SQLite logs.

2|1|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/timgranlundmarsden/claude-agent-flow --skill token-analyser
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: token-analyser
Source: https://github.com/timgranlundmarsden/claude-agent-flow/tree/main/skills/token-analyser
Command: npx skills add https://github.com/timgranlundmarsden/claude-agent-flow --skill token-analyser

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the manual work of digging through Claude Code session logs to understand token usage, spending, and model behavior. It turns raw telemetry into a readable cost and efficiency summary so you can quickly spot waste, spikes, and unexpected model usage.

Core Features & Use Cases

  • Session cost analysis: Review the current session, a specific session, today, the last 24 hours, or the last 7 days.
  • Per-model and per-call breakdowns: See input, output, cache reads, cache writes, context growth, and model-by-model usage.
  • Adversarial efficiency insights: Detect high token ratios, missing cache reuse, context explosions, and subagent-heavy runs.
  • Practical use case: Use it after a long Claude Code run to find which agent, model, or call pattern drove the cost and whether a cheaper model would have been sufficient.

Quick Start

Ask the skill to analyze the current Claude Code session and return the full token-cost dashboard with breakdowns, model usage, and issue detection.

Frequently Asked Questions about token-analyser

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze Claude Code session token costs and usage data?

You can analyze Claude Code session token costs by parsing local JSONL and SQLite telemetry logs. This process provides per-call and per-model breakdowns, estimates model pricing, and detects usage issues like context explosions across specific sessions or timeframes.

What is the best way to track token costs for subagent and multi-model activity?

Tracking subagent and multi-model token costs involves deterministic parsing of local telemetry logs. It extracts per-call usage data and applies model-pricing lookups to generate a readable cost and efficiency summary for your agents.

Can I review Claude Code telemetry logs for specific time periods like the last 24 hours?

Yes, you can review telemetry logs for the current session, today, the last 24 hours, the past week, or a specific session ID. The analysis covers input, output, cache reads, and context growth across the selected timeframe.

How do I detect high token ratios and missing cache reuse in Claude Code?

Detecting high token ratios and missing cache reuse requires adversarial efficiency analysis of your session logs. It identifies context explosions, subagent-heavy runs, and calls where a cheaper model would have been sufficient.

Does token analysis work with both Claude and Codex local session logs?

Yes, token analysis supports both Claude and Codex local logs. It deterministically parses JSONL and SQLite telemetry to provide model-by-model usage breakdowns and cost estimates across both environments.

Why are my Claude Code session costs unexpectedly high after a long run?

High session costs often stem from context explosions, missing cache reuse, or subagent-heavy runs. Analyzing your telemetry logs isolates which specific agent, model, or call pattern drove the spending spike.