caveman-stats

Reports actual session token usage and estimated savings from the Claude Code session log.

Updated Jun 16, 2022
One-click install
npx skills add https://github.com/SimonZimmer/dotfiles --skill caveman-stats-simonzimmer
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: caveman-stats
Source: https://github.com/SimonZimmer/dotfiles/tree/main/.config/opencode/skills/caveman-stats
Command: npx skills add https://github.com/SimonZimmer/dotfiles --skill caveman-stats-simonzimmer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Token usage numbers are often guessed by the model itself, making them unreliable. This Skill reads the real JSONL session log on disk so you see actual input/output token counts and estimated savings versus a non-caveman baseline, with no AI estimation involved. ## Core Features & Use Cases - Real Token Receipts: Parses the current Claude Code session log to report actual input and output token counts per session. - Savings Estimation: Compares caveman-mode output tokens against an estimated non-caveman baseline and reports tokens saved and percentage. - Statusline Integration: Writes a lifetime-savings suffix file consumed by the statusline badge (e.g., ⛏ 12.4k). - Use Case: After a long coding session in caveman mode, run /caveman-stats to see exactly how many tokens you used and saved, grounded in the on-disk session log rather than model guesses. ## Quick Start Type /caveman-stats in your Claude Code session to display the current session's real token usage and estimated savings.

Frequently Asked Questions about caveman-stats

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

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

Run /caveman-stats during your session. The caveman-mode-tracker hook reads the JSONL session log on disk and returns actual input and output token counts, plus estimated savings versus a non-caveman baseline.

How are token savings calculated in caveman mode?▼

Savings are computed by comparing actual caveman-mode output tokens from the session log against an estimated non-caveman baseline. The input and output counts are real log data; only the baseline is estimated.

Does caveman-stats rely on the AI model to count tokens?▼

No. The numbers come directly from the JSONL session log on disk, parsed by the caveman-stats hook. The model does not compute or estimate the figures; the hook injects the formatted output as a blocked-decision reason.

What does the statusline badge show in caveman mode?▼

The statusline badge displays lifetime token savings, such as `⛏ 12.4k`. Each /caveman-stats run writes a lifetime-savings suffix file that the statusline reads to render this value.

Why does /caveman-stats not respond like a normal command?▼

The command is intercepted by the caveman-mode-tracker hook, which returns decision: "block" with the formatted stats as the reason. This is by design so the user sees the numbers immediately without model involvement.