speckit-companion: Command for Claude Code

.claude/commands/bench-experiment.md

bench-experiment is a command for Claude Code from alfredoperez/speckit-companion. It costs 15 tokens per session (1,131 once invoked), scanned B, original, MIT.

A command procedure for running a complete benchmark round on the Conduit application and comparing its results with earlier runs. A benchmark is a repeatable test used to measure how a system performs.

In plain words
What is it for?
It is for naming an experiment, preparing the benchmark environment, compiling the application, running the sweep, and reporting what changed.
Why use it?
It removes the need to remember the experiment setup, machine checks, build steps, and comparison process. It also helps avoid running a test while the machine is under unusually heavy load.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

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 →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is Bash(node ../speckit-bench/sync-templates.mjs:*), Bash(node ../speckit-bench/run-all.mjs:*), Bash(npm run compile:*), Bash(git -C:*), Bash(date:*), Bash(ps:*), .

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-experiment.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-experiment

README.md
[![agentmods](https://agentmods.dev/badge/commands/alfredoperez/speckit-companion/bench-experiment/github.svg)](https://agentmods.dev/commands/alfredoperez/speckit-companion/bench-experiment)
Your own site
<a href="https://agentmods.dev/commands/alfredoperez/speckit-companion/bench-experiment"><img src="https://agentmods.dev/badge/commands/alfredoperez/speckit-companion/bench-experiment/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-experiment

Your own site · 80×15
<a href="https://agentmods.dev/commands/alfredoperez/speckit-companion/bench-experiment"><img src="https://agentmods.dev/badge/commands/alfredoperez/speckit-companion/bench-experiment.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 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,131 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00015 $0.01131
Opus 5 $0.00008 $0.00566
Sonnet 5 $0.00003 $0.00226
Haiku 4.5 $0.00002 $0.00113

Measured 5d ago against content hash 6c4d541bc924, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade B, and why

bench-experiment scanned grade B with 1 finding 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 5d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

If it is missing, or if `ps aux | grep mds_stores` shows Spotlight busy, tell the user to run `sudo mdutil -i off ~/dev/projects` and wait for them. Do not start a round on a machine that is already struggling.
.claude/commands/bench-experiment.md · 80 lines

How it starts

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

Your task

Run one complete round of the benchmark and report what changed. The user says "run an experiment and bench it" and expects the whole thing without being asked for details.

The harness lives in the sibling speckit-bench repo and the app it measures in conduit. Its README.md is the reference; this command is the procedure.

1. Name the sweep

$ARGUMENTS is what the experiment is testing. Turn it into a short label — "hook anchors", "living specs off", "fresh baseline". If there is nothing to name, use today's date and call it a baseline repeat, which is also useful: it is how the noise floor gets measured.

2. Check the machine first

Twelve clones of a React app are about 8GB of files Spotlight has never seen, and indexing them has taken this machine to a load average of 260. Before baking:

ls ~/dev/projects/.metadata_never_index || echo "MISSING"

If it is missing, or if ps aux | grep mds_stores shows Spotlight busy, tell the user to run sudo mdutil -i off ~/dev/projects and wait for them. Do not start a round on a machine that is already struggling.

3. Bake

npm run compile                          # the driver dispatches the GUI preamble from dist/
node ../speckit-bench/sync-templates.mjs --sizes easy,medium,hard,oversized --ext code --sweep "<label>"

--ext code measures the extension in COMPANION_DIR, which is what an experiment on unreleased work needs. Use --ext latest only when the question is explicitly about the published build.

The bake prints the three versions it recorded and fails loudly if any cell can read what it is. Report the versions; do not report the arm mapping unless asked, and never pass it to a driver or a judge.

4. Prep and drive

node ../speckit-bench/run-all.mjs prep --sizes easy,medium,hard,oversized

Then one driver per cell, all twelve at once, following step 3 of /bench-run-all — the same GUI preamble, the same settle-wait, capture for the Companion arms only, and the cell's letter, never its arm. Twelve drivers in parallel is fine; the round costs the slowest cell rather than the sum.

Read the full file on GitHub · 80 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. 5d ago First seen · 80 lines · 15 tokens per session scan B 6c4d541bc924

Subscribe to this mod's changes

bench-experiment is a command published in the GitHub repository alfredoperez/speckit-companion (90 stars, last pushed today), licensed MIT. It adds 15 tokens to every session and 1,131 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-07.

Related

Other commands, from other repositories