Two commands. /claude-api build-eval builds a test set and a grader from production transcripts, bug reports, and hand-written cases, pausing for approval at each step. /claude-api hillclimb iterates against them, one change at a time, with a held-out set to catch overfitting. This page maps the full flow of both.
The primary source is the claude.dev playbook by Lance Martin (Sep 28, 2026) and Hamel Husain's field review.
The command walks you through three phases: collecting examples in priority order, proposing and validating a grader, and running a baseline with a confidence interval. Claude pauses for your approval before moving between phases.
Claude collects inputs in a fixed priority order, working from the most grounded data toward the most synthetic. The underlying rule: every synthetic example should be anchored in something real. Fabricated cases not tied to actual behavior measure a hypothetical version of your application, not the one running in production.
/claude-api build-evalClaude proposes the cheapest grader that fits your output type. The two options are not interchangeable — picking the wrong one produces a number that can't be validated.
Exact match, a label from a fixed set, JSON matching a schema, tests that pass.
Use when the right answer is unambiguous. Fast, cheap, deterministic. The grader agrees with itself by construction.
A second model reads the input, the output, and a rubric written as checkable claims — not a 1-to-5 scale. Returns a score with its reasoning.
If you have a baseline to compare against, the judge reads both outputs in random order, without knowing which is the baseline, and picks the better one. The judge model should not be the model you are testing.
Hillclimbing iterates against the evaluation one change at a time. The discipline is keeping the test set genuinely held out, never pasting failures into the prompt, and reverting anything that only improves on training data. When the score stalls, Claude stops proposing changes and diagnoses the remaining failures instead.
/claude-api hillclimbThese are the principles the tool is built around. An eval that violates any of them will produce misleading hillclimb results — the tool checks for all four before and during a run.
Tasks picked because they are easy to generate or easy to grade will produce a benchmark that doesn't track production performance. Sample from what the system will actually be used for.
Don't blindly trust user traffic either: users often try what they expect to work, skewing the sample easy. Mix production logs with hand-written hard cases.
More capable models at higher effort levels should score higher. If they don't, the tasks are ambiguous or the grader is miscalibrated.
This is a sanity check you can run before starting hillclimb. A benchmark that doesn't discriminate between model sizes isn't measuring anything real.
If the best model at the highest effort already scores ~95% or above, you can't reliably judge whether a change helped. The gap should not be explained by impossible or ambiguous tasks.
A task that fails every run regardless of the model is a broken task, not a hard one. The tool flags this and suggests rewording before hillclimb starts.
High variance usually comes from poorly designed tasks, a grader that answers differently on repeats, or inconsistent effort settings in the harness. Leftover state from a prior run (a file, a git history) can also hand the model the answer.
The tool checks grader consistency before the baseline and flags variance before hillclimb starts.
Two examples from Anthropic's own playbook. Both ran the full build-eval + hillclimb loop.
Started on Opus 4.8 at high effort. Hillclimb goal: reduce cost while holding accuracy. 44 tickets total, 30 for training, 14 held out.
The hillclimber's path: audited the prompt first (removed contradictory rules, a mandatory scratchpad, tool-call rituals), stepped down to Opus 5.5 at low effort (cleared the accuracy bar at half the cost), then stepped down again to Sonnet 5. Final prompt added routing rules and a refund-cap cross-reference.
Eval set derived from API documentation. Testing whether the skill correctly implements code using current API shapes.
The key diagnostic insight from the stall analysis: the skill content was present, but the model was writing older API shapes from its trained priors. The fix was a migration table near the top of the skill mapping from forms the model remembered to current ones — not more content, but a redirect at the point of failure.