speckit-companion: Command for Claude Code

.claude/commands/bench-replay.md

bench-replay is a command for Claude Code from alfredoperez/speckit-companion. It costs 16 tokens per session (1,549 once invoked), scanned A, original, MIT.

A controlled experiment command that changes one named pipeline step, replays that step from a saved state, and grades the resulting variants.

In plain words
What is it for?
Use it to test whether a particular option, node, classifier, or behaviour improves a pipeline step. It is for focused comparisons, not judging the pipeline's overall current quality.
Why use it?
It isolates one change while keeping the rest of the pipeline identical, so differences can be attributed to that change rather than to a new run.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool; positional $N argument.

This is alfredoperez/speckit-companion's own configuration. It tells Claude Code how to work on speckit-companion itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything speckit-companion configures →

Reuse

Borrowing it

Nothing to install: this file belongs to alfredoperez/speckit-companion. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/alfredoperez/speckit-companion/main/.claude/commands/bench-replay.md
Clone the repo
git clone --depth 1 https://github.com/alfredoperez/speckit-companion

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bench-replay

README.md
[![agentmods](https://agentmods.dev/badge/commands/alfredoperez/speckit-companion/bench-replay/github.svg)](https://agentmods.dev/commands/alfredoperez/speckit-companion/bench-replay)
Your own site
<a href="https://agentmods.dev/commands/alfredoperez/speckit-companion/bench-replay"><img src="https://agentmods.dev/badge/commands/alfredoperez/speckit-companion/bench-replay/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bench-replay

Your own site · 80×15
<a href="https://agentmods.dev/commands/alfredoperez/speckit-companion/bench-replay"><img src="https://agentmods.dev/badge/commands/alfredoperez/speckit-companion/bench-replay.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,549 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00016 $0.01549
Opus 5.5 $0.00006 $0.00620
Sonnet 5.5 $0.00003 $0.00310
Haiku 4.5 $0.00002 $0.00155

Measured 19d ago against content hash ca398a3ac912, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bench-replay 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 19d 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/bench-replay.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Your task

Answer a single-step question without running a round. The user names a change ("fan-out off", "the new check node", "gentle-ai's classifier") and which step it affects; you replay that step from a staged state, as many ways as the question needs, and grade each. Everything else is held byte-identical, so a difference in the result is the change and nothing else.

This is for "does X help", never for "is the pipeline good today". A round answers the second. A replay costs about $8 and ten minutes; a round costs about $35 and forty. The harness README.md (bench/README.md in speckit-sandboxes) under Stages is the reference; this command is the procedure.

Paths

Shell state does not persist between Bash calls, so start each one with this line:

. .claude/sandboxes-env.sh && eval "$(node "$SANDBOXES_REPO"/bench/paths.mjs --sh)"

It sets $SANDBOXES_REPO (the sibling speckit-sandboxes checkout, whose bench/ folder is the harness) and $BENCH_CELLS_DIR (where the cells are baked). When you hand a path to an agent, expand it first: an agent gets the absolute path, never the variable.

1. Name the question and the variants

$ARGUMENTS is the change. Turn it into:

  • the step it affects: implement, tasks, plan, or specify
  • the stage to start from: the one before that step (post-tasks for implement, post-plan for tasks, post-specify for plan, the baseline for specify)
  • the variants, each with a one-word label: the shipped behaviour is always one of them and is always labelled asis

Two variants is the normal shape. Three or more only when the question genuinely has that many arms.

2. Pick the cell and check the build

Pick the arm the question is about. Cells are blind on disk; identify one by what is installed rather than by letter:

for d in "$BENCH_CELLS_DIR"/conduit-*/; do n=$(basename "$d"); c=$([ -d "$d/.specify/extensions/companion" ] && echo companion || echo stock); l=$([ -f "$d/living-specs.yml" ] && echo "+living" || echo ""); echo "$n $c$l"; done

Read the full file on GitHub · 92 lines

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. 19d ago Changed · +10 lines ca398a3ac912
  2. 1mo ago First seen · 82 lines · 16 tokens per session scan A 7fb4134b6fef

Subscribe to this mod's changes

bench-replay is a command published in the GitHub repository alfredoperez/speckit-companion (99 stars, last pushed 6d ago), licensed MIT. It adds 16 tokens to every session and 1,549 once invoked, about $0.0001 per session on Opus 5.5. 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-09-10.