token-benchmark

A command for running a measured token benchmark, which records how many model tokens and how much money a tool uses. It compares an MCP tool with a GitCortex alternative across selected programming languages.

In plain words
What is it for?
Benchmarking before releases or after MCP changes, producing a scorecard and report, comparing runs, and identifying regressions or tools that need redesign.
Why use it?
It turns real usage measurements into a decision about whether a tool is ready to ship or needs changes.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/bharath03-a/gitcortex/token-benchmark
Clone the repo
git clone --depth 1 https://github.com/bharath03-a/GitCortex

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 377 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00377
Opus 5 $0.00000 $0.00188
Sonnet 5 $0.00000 $0.00075
Haiku 4.5 $0.00000 $0.00038

Measured 2d ago against content hash e1fbbd9c9141, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

token-benchmark scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/dev/token-benchmark.md · 27 lines

What it actually says

Run the REAL token benchmark (measured Claude usage) and turn it into a ship/fix decision. Use before a release or after changing any MCP tool.

Delegate to the token-benchmark agent. Pass along any arguments in $ARGUMENTS:

  • a model id (default claude-haiku-4-5-20251001),
  • a scope hint (full = 5 languages, or a single repo/tool name),
  • diff to compare against the previous run.

The agent will:

  1. Build target/release/gcx if stale.
  2. State the cost estimate (full haiku sweep ≈ $5–8, 20–40 min; each session capped by BUDGET, default $0.75) before launching anything.
  3. Run docs/benchmarks/real-sweep.sh (or a single real-harness.sh for a quick check), which runs Claude twice per question — grep arm vs GitCortex MCP arm — and records real usage tokens, cost, and turns.
  4. Render the tool × language scorecard: python3 docs/benchmarks/real-report.pydocs/benchmarks/real-report.html.
  5. Diff against the previous run; flag any tool that went green→red as a regression.
  6. Report a per-tool verdict (keep / marginal / REDESIGN), a concrete minimal fix for each REDESIGN tool, and a one-line ship-or-block call.

Do not let it edit MCP code — it proposes fixes; apply them via the add-mcp-tool skill, then re-run this to confirm the fix worked.

See docs/benchmarks/RELEASE-GATE.md for the full method.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 27 lines · 0 tokens per session scan A e1fbbd9c9141

Subscribe to this mod's changes

token-benchmark is a command published in the GitHub repository bharath03-a/GitCortex (7 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 377 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.