coding: Command for Claude Code

.claude/commands/experiment.md

experiment is a command for Claude Code from fwornle/coding. It costs 0 tokens per session (5,964 once invoked), scanned A, original, MIT.

A command that describes, runs, compares, and ranks cross-agent coding experiments. An experiment matrix runs the same test across selected agents or variants and repeats it when requested.

In plain words
What is it for?
Use /experiment with a plain-English description or structured flags to compare coding agents on a task and produce a ranked report.
Why use it?
It combines experiment setup, execution, and comparison so results can be evaluated in one workflow.

Command for Claude Code

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

This is fwornle/coding's own configuration. It tells Claude Code how to work on coding 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 coding configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is SPEC_FILE=$(node scripts/experiment-write-spec.mjs \.

Reuse

Borrowing it

Nothing to install: this file belongs to fwornle/coding. 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/fwornle/coding/main/.claude/commands/experiment.md
Clone the repo
git clone --depth 1 https://github.com/fwornle/coding

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 experiment

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/fwornle/coding/experiment"><img src="https://agentmods.dev/badge/commands/fwornle/coding/experiment.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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 5,964 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 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.00000 $0.05964
Opus 5.5 $0.00000 $0.02386
Sonnet 5.5 $0.00000 $0.01193
Haiku 4.5 $0.00000 $0.00596

Measured 1mo ago against content hash 120632d255df, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

experiment scanned grade A 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 1mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

if ! curl -sf -m 3 http://localhost:3032 >/dev/null 2>&1; then
.claude/commands/experiment.md · 372 lines

How it starts

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

Experiment (/experiment) — describe → run → compare in one command

Wrap the full cross-agent experiment flow as a single operator command: synthesize a spec (from a plain-English description or from headline flags), run the whole matrix, then auto-compare the variants and print the ranked table (and write the report JSON the dashboard Comparison tab reads live).

Two ways to invoke — same pipeline (Step 0 chooses):

  • Natural language (default): just describe the experiment, e.g. /experiment compare Claude Sonnet against OpenCode Haiku on writing a fizzbuzz function, run each twice. The skill synthesizes the spec, shows you a preview + drafted test, and asks you to confirm before spending tokens.
  • Structured flags (power users): /experiment run --goal "…" --variants A,B --agents claude,opencode --repeats N.

This skill is a THIN wrapper (D-09). It shells to three existing CLIs and reimplements NO runner, serialization, or comparison logic:

  • scripts/experiment-write-spec.mjs — builds, validates, and persists the spec YAML to config/experiments/gen-<id>.yaml (so it lists in the dashboard Launch listbox + is re-launchable).
  • scripts/experiment-run.mjs — runs the matrix (spec-file driven; RUN-02/03/04, Phase 78).
  • scripts/experiments-compare.mjs — aggregates + ranks the Runs and writes the report JSON.

The ONLY skill-side computation is re-deriving the task_hash (the sha256 the runner itself computes at close) so the run→compare handoff is mechanically closed — no manual lookup, no scraping of runner stdout.

DO NOT pre-solve the task. The analysis IS the experiment. The whole point is to compare how each agent independently investigates and solves the task, in its own isolated sandbox. The orchestrator's job is to turn the user's description into a GOAL_SENTENCE and run the matrix — never to read the codebase, locate the bug, design the fix, or otherwise do the work before running. Doing so contaminates the comparison (you'd be feeding one agent's answer to all cells) and defeats the purpose. Write the goal from symptoms + the observable deliverable the user described (e.g. "the REC indicator wrongly toggles between black and green — make it stable"), optionally with a one-line orienting pointer the user themselves gave, and let each cell do its own analysis. If you catch yourself grepping the target code to "craft a better goal," stop — that is the cells' job.

Parallel is the default execution mode. Run cells concurrently (Step 4) unless the user explicitly asks for serial/sequential execution, or the matrix includes an agent whose tokens must be measured and that agent is ambient-slot-bound (opencode — see Step 4). Only then fall back to serial.

Read the full file on GitHub · 372 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. 1mo ago Changed 120632d255df
  2. 1mo ago First seen · 372 lines · 0 tokens per session scan A 5c3dc10bd259

Subscribe to this mod's changes

experiment is a command published in the GitHub repository fwornle/coding (2 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 5,964 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.