etr

Claude Boot Stats — Development skill for Claude Code

Development community

Per-component token cost analyzer for Claude Code first-turn context: HTTP intercept proxy + Qwen3 BPE + ground-truth calibration.

How to install Claude Boot Stats

This entry records only its repository, not the path inside it, so there is no exact command to give. Open etr/claude_boot_stats and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Claude Boot Stats does

Per-component token cost analyzer for Claude Code first-turn context: HTTP intercept proxy + Qwen3 BPE + ground-truth calibration.

Alternatives in Development

  • Memstack Headroom — Check Headroom proxy status and token savings 294 ★
  • Benjamin Plus Skill — Benjamin-Plus: a measured token-efficiency skill for coding agents (−17.9% cost median, quality unchanged) 272 ★
  • Claude Code SDK TS — Configure models, enable tools, stream events, then fetch text, JSON, run details or token stats in one call v 206 ★

README

claude_boot_stats

Transparent HTTP proxy that captures a Claude Code first-turn request, tokenizes each component (system prompt blocks, tools, message blocks, claudeMd sub-sections) with the Qwen3 BPE, calibrates against the server's actual token usage, and writes a breakdown as CSV (default) and/or markdown. Two extra drill-down tables attribute the `Agent` tool description and the skills-catalog message block to their originating plugins.

Install

git clone 
cd claude_boot_stats
pip install -e .

The Qwen3 tokenizer (~20 MB of config + vocab) is downloaded from Hugging Face on first run; subsequent runs are offline.

Use

# default: proxy on 127.0.0.1:8788, CSV output trio (main + agents + skills + mcp + ...)
python -m claude_boot_stats --csv ./cbs.csv

# markdown only
python -m claude_boot_stats --md ./cbs.md

# both
python -m claude_boot_stats --csv ./cbs.csv --md ./cbs.md

Then launch Claude Code pointing at the proxy:

ANTHROPIC_BASE_URL=http://127.0.0.1:8788 claude

Reports are overwritten on each captured request (use `--once` to stop after the first).

Outputs

  • --csv writes three files: (main breakdown), .agents.csv, .skills.csv. Each agent / skill row carries its originating plugin (prefix before the first : in the identifier; core when there is no prefix).
  • --md writes one markdown file containing all three tables + subtotals.
  • If neither is given, the default is ./claude_boot_stats.csv.

Flags

flag default meaning
--port 8788 local proxy port
--upstream https://api.anthropic.com where to forward requests
--csv (default on if --md absent → ./claude_boot_stats.csv) CSV output stem
--md unset markdown output path
--min-body-bytes 10000 ignore small bodies (quota pings etc.)
--once false write one report then keep proxying