Skip to main content

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.

#TutorialBuildNew conceptsCost
1Your first Bench, no API key requiredhello-mock/mock Harness, YAML shape, string Checks (contains, regex, assert-set)$0
2Your first live LLM Benchcodenav/claude-code Harness, testdata + sandbox, contains-all / any-of, latency, session~$0.002
3Codegen with exec Checkscodegen-fizzbuzz/exec Check, permission modes, anti-cheat patterns~$0.05
4Semantic judging with llm-rubricbugfix-add/llm-rubric, bypassPermissions, not-any-of, rubric design~$0.04
5SWE-bench-style multi-Scenario Benchesswe-mini/per-Scenario testdata:, --trials N, TrialsReport, pass@1, --concurrency~$0.30
6Managed runtime Checksmanaged-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.md is the complete Check catalog (every registered type, its config keys, and how it scores); docs/harness.md is the Harness contract and the claude-code configuration surface; docs/sandbox-and-testdata.md explains how a Scenario's workspace is built and why seeding it is how you swap an agent's whole environment; docs/glossary.md defines every term. Start from docs/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.