Tutorials
Six progressive walkthroughs that teach how to write Benches in madbench. Each tutorial introduces one or two new concepts beyond the previous and walks you through building a complete Bench project from scratch — directory, testdata, YAML, run.
| # | Tutorial | Build | New concepts | Cost |
|---|---|---|---|---|
| 1 | Your first Bench, no API key required | hello-mock/ | mock Harness, YAML shape, string Checks (contains, regex, assert-set) | $0 |
| 2 | Your first live LLM Bench | codenav/ | claude-code Harness, testdata + sandbox, contains-all / any-of, latency, session | ~$0.002 |
| 3 | Codegen with exec Checks | codegen-fizzbuzz/ | exec Check, permission modes, anti-cheat patterns | ~$0.05 |
| 4 | Semantic judging with llm-rubric | bugfix-add/ | llm-rubric, bypassPermissions, not-any-of, rubric design | ~$0.04 |
| 5 | SWE-bench-style multi-Scenario Benches | swe-mini/ | per-Scenario testdata:, --trials N, TrialsReport, pass@1, --concurrency | ~$0.30 |
| 6 | Managed runtime Checks | managed-runtimes/ | ts / js via Bun, python via uv, lockfile policy | $0 |
Reference: Settings and .env covers how madbench
resolves API keys and knobs — precedence, --env-file / --no-env, the file
grammar, and what does (and does not) reach the agent.
Scoring contract explains pass,
normalized high-is-good score, reason, evidence, and named scores.
Mastra scorer parity lists the Mastra-compatible Check
IDs and the cross-framework testdata harness. Scorer registry
records versions, implementation details, and reference links for built-in Checks.
Beyond the tutorials
The repository carries two further kinds of documentation, alongside these tutorials under
docs/:
- Reference —
docs/checks.mdis the complete Check catalog (every registered type, its config keys, and how it scores);docs/harness.mdis the Harness contract and the claude-code configuration surface;docs/sandbox-and-testdata.mdexplains how a Scenario's workspace is built and why seeding it is how you swap an agent's whole environment;docs/glossary.mddefines every term. Start fromdocs/README.md. - Playbooks —
docs/playbooks/holds end-to-end recipes for the comparisons people actually run: measuring a change to your Claude Code setup, testing whether your skills are invoked, and benchmarking memory setups against real repositories.
Reading order
Read them in order. Each tutorial assumes the previous one. If you only have time for one, read T2 — it covers the most ground (live harness, testdata, sessions, ceilings) in the smallest space.
What you build along the way
Each tutorial creates a self-contained project directory with its own madbench.yaml and (where needed) testdata/ tree. By the end you will have six sibling project folders, each runnable independently with madbench from inside its directory. There is nothing to install beyond the binary itself for the core tutorials; managed runtime Checks can prepare Bun and uv-backed Python on demand.