caveman-stats

Reports actual session token usage and savings from Claude Code JSONL session logs.

1|Updated Apr 23, 2026
One-click install
npx skills add https://github.com/tkogut/agents-os-core --skill caveman-stats-tkogut
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: caveman-stats
Source: https://github.com/tkogut/agents-os-core/tree/main/vault/.agents/skills/caveman-stats
Command: npx skills add https://github.com/tkogut/agents-os-core --skill caveman-stats-tkogut

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It replaces unreliable AI-estimated token counts with real numbers read directly from the session log, so you can see whether terse-output modes actually save tokens after accounting for per-turn rule overhead. ## Core Features & Use Cases - Real Token Receipts: Reads the current Claude Code JSONL session log on disk to report actual input and output token counts instead of model-generated estimates. - Net Savings Accounting: Computes estimated savings versus a non-caveman baseline, subtracts per-turn rule overhead (default 1,250 tokens/turn, configurable via CAVEMAN_RULE_OVERHEAD_TOKENS), and honestly reports net-negative sessions. - Lifetime Savings Badge: Writes a lifetime-savings suffix file consumed by the statusline badge for a glanceable gross-savings figure. - Use Case: After a long coding session, run the command to check whether the output-token savings exceeded the input-token cost of injected rules, and decide whether to keep the mode enabled for this workload. ## Quick Start Ask the assistant to run /caveman-stats to show this session's real token usage, estimated savings, and net overhead.

Frequently Asked Questions about caveman-stats

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

FAQPage Schema
How do I check real token usage in a Claude Code session?▼

Run /caveman-stats to read the current session's JSONL log on disk and report actual input and output token counts. The numbers come from the log file itself, not from model estimation.

How are token savings calculated against a baseline?▼

Savings compare actual output tokens against an estimated non-caveman baseline for the same session. When the session has a single benchmarked mode with a known turn count, the output also shows estimated rule overhead and net savings.

Can I change the rule overhead estimate per turn?▼

Yes, set the CAVEMAN_RULE_OVERHEAD_TOKENS environment variable to your own measured value. The default is 1,250 input tokens per turn, which is subtracted from gross savings to compute the net figure.

Why does the net savings line sometimes go negative?▼

Short sessions with terse replies can cost more in per-turn rule input tokens than they save in output tokens. The tool reports this directly instead of hiding it behind a gross-savings number.

What is the statusline badge number based on?▼

The badge shows a lifetime gross-savings figure written to a suffix file on each run. It is intentionally a glanceable summary; run /caveman-stats for the full net accounting.