hillclimb
FreeRuns bundled scriptsNot checkedRuns a coding agent in a measured improvement loop against a judge program: make one change, run the guards and the judge, keep the change (commit) only if…
by Roasbeef★ 33 GitHub starsAbout this skill
Hillclimb
A hillclimb points a coding agent at a number it can compute itself and lets it loop: change the code, run the judge, keep the change only if the number improved, revert it otherwise. Git is the ratchet, so the score never goes backwards, and the loop can run overnight because nobody has to say whether a round worked.
The loop is the easy part. What decides whether a climb ships anything:
- The judge. It has to measure the outcome, not a proxy the agent can satisfy without doing the work. Most of a good hillclimb is building it.
- The wall. The agent must not be able to edit the judge, read its answers, or see the held-out cases. Instructions don't enforce this; file layout and hashes do.
- One hypothesis per round. Otherwise a gain can't be attributed and a loss can't be reverted cleanly.
- The held-out delta. The result is the held-out score at the winning round against the baseline. Gains on the cases the agent read are the process, not the result.
Source: Anthropic's eval-hillclimb guide
(anthropics/skills, skills/claude-api/shared/evals/eval-hillclimb.md, commit
e4bb5d9). That guide tunes a Claude app's prompts against a model-graded
eval. This one tunes code against a program, which changes three things:
most judges here are deterministic, so the noise floor is often zero or a
flake rate instead of a confidence interval; the cheat to block is the agent
editing tests, fixtures, or the oracle instead of a judge being flattered; and
every kept round is a commit a reviewer will read, so the diff has to stand on
its own.
scripts/hc.py holds the bookkeeping that must not depend on the agent's
judgment: the split, the judge hash, the scoring, and the keep-or-revert
verdict. references/recipes.md has a judge recipe per task type. Set
HC="python3 ~/.claude/skills/hillclimb/scripts/hc.py" in commands below.
0. Capture the task and find the judge
Parse $ARGUMENTS (text, @file, or gh issue view <n> --json title,body,comments). Read the code it names. Then find the task type in
references/recipes.md and look in the repo for a judge that already exists:
a differential test, a conformance vector suite, a benchmark on real data, an
integration harness.
A judge must:
- Run from one command, unattended, and print one JSON row per case
(
hc.py from-gotestandfrom-benchadapt Go output). - Score per case, not just in aggregate, so a round can be read case by case and the split works.
- Finish in minutes. The number of rounds is the budget divided by the time per round. A 40-minute judge gets a dozen rounds a night; trim it to the discriminating cases for the loop and run the full set at the end.
- Measure the outcome. For a migration, the migrated data read back equal, not "the migration ran". For a port, the same outputs as the original, not "it compiles".
If no judge exists, stop and say so: climbing without one is editing and
hoping. Propose building it as the first piece of work. /dst,
/property-based-testing, /fuzz-test, and /mutation-testing are the usual
tools. Building the judge is often worth more than the climb, because it
stays in the repo.
1. Prove the judge can be climbed
Do all of these before round one. Each has wrecked a climb.
- Noise floor. Run the judge twice on unchanged code (
baselineandbaseline2) and sethc.py noise <flow> baseline baseline2. For a count judge that is the flip rate; nonzero means flaky cases, and they get fixed or excluded before the loop (a flaky case moves the score on its own). For a value judge it is the median per-case log ratio; benchmarks need-count=10or more, one machine, nothing else running. Show the user the noise floor, the headroom (ceiling minus baseline), and the smallest gain they would act on. If the noise beats either, the climb can't show a win: say so now and offer more samples, more cases, or a finer metric. - The judge catches a planted bug. Break the code in a way the judge should see (revert a known fix, flip a comparison, drop a column in the migration) and confirm the score drops. A judge that stays green on a planted bug is measuring something else.
- The mechanism is real. The benchmark exercises the production path, not a mock. The SQL judge runs on Postgres as well as SQLite. The conformance vectors are the spec's, not ones written to match the code.
- Recompute the headline from the rows. Check the score
hc.py compareprints against a hand count of a few rows. A number too good to be true is a measurement bug until a hand check says otherwise. - Ground truth out of reach. Expected outputs, golden files, the oracle
implementation, and the held-out fixtures live where the agent's edits
can't change them. List every file the judge depends on as a
--judge-path;hc.py runrefuses to run when any of them changed since the user ranhc.py approve. Never run
Install hillclimb in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
ReadGrepGlobBashEditWriteAskUserQuestionSkillTaskBundled files
FAQ
What does the hillclimb skill do?
Runs a coding agent in a measured improvement loop against a judge program: make one change, run the guards and the judge, keep the change (commit) only if the score beats the best kept round by more than the noise floor without regressing the held-out cases, otherwise revert, and repeat until the score plateaus or the budget runs out. Built for long work with a mechanical yes or no: SQL translation, kv-to-SQL migrations, ports, performance work, optimizations, rewrites, and conformance against spec vectors. Covers finding or building the judge, proving it can be climbed (noise floor, a planted bug turns it red, ground truth out of the agent's reach), a hashed judge the loop cannot edit, a held-out split, one hypothesis per round, a de-hack pass on every change, stall triage, and a final report on the held-out delta. Adapted from Anthropic's eval-hillclimb guide for code instead of prompts. Use when a task has, or could have, a judge that runs unattended in minutes and prints per-case results. Invoked via /hillclimb.
How do I install the hillclimb skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the hillclimb skill run scripts?
Yes, this skill bundles executable scripts. Review the source before installing.
Related skills
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
by AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
by Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
by Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
by Anthropic