ToolClaude CodeIntermediate25 min to do

I wrote a 111-line wrapper so Claude Code starts on the cheap model and switches up on its own, learning which kinds of task need the bigger one

A 111-line script for Claude Code. It tries the cheap model, checks the result with your own tests, switches to a bigger model when the check fails, and remembers which kinds of task keep failing so it starts higher next time. Full code, a free way to test it, where it fits, and the task where it saved almost nothing.

easy tasks cost $1.09 against $2.56 on Sonnet alone; on a hard task it stopped paying for the cheap model's misses after 3 runs
CC
Claude Code Lab
·November 22, 2026·20 min read
I wrote a 111-line wrapper so Claude Code starts on the cheap model and switches up on its own, learning which kinds of task need the bigger one

Level: Intermediate. About 25 minutes. Needs Node 20 or newer, Claude Code logged in, and a project with a test command. Free to copy and change (MIT licence).

Picking a Claude model for each job is a tax on your attention. Pick the big one every time and you pay for power you rarely need. Pick the small one and, now and then, it hands you something that looks finished and isn't.

In my own test, the cheapest model passed eight of nine coding tasks, and the one it missed arrived with a cheerful "Perfect! All test cases pass." What caught it was a test I had written beforehand. So I turned that into a tool that picks the model for you: it runs the task on the cheap model, runs your tests on the result, and switches up to a bigger model only when the tests fail. It also remembers. If the cheap model keeps failing on one kind of job, the tool stops starting there.

It is 111 lines, has no dependencies, and never deletes anything.

What it does

What is in the folder, and what it does

Every attempt happens in a fresh copy of your project in your system's temp folder. A failed cheap attempt can't leave a mess for the next model, and your own folder stays untouched until you ask for the result with --apply.

Where and when to use it

Use it wherever a computer can tell you the work is wrong without you looking.

  • A pile of small chores with tests. Renaming things, adding a field, fixing a small bug, writing a helper. Put each chore in a text file and loop over them. Most pass on the cheap model, so you pay the small price, and the stubborn ones move up by themselves.
for f in tasks/*.txt; do
  node cheap-first.mjs --prompt-file "$f" --check "npm test" --apply
done
  • A job you run again and again. Give it a label with --task-type, for example --task-type migrations. After three attempts it knows whether the cheap model is good enough for that kind of job and starts at the right size.
  • An overnight or unattended batch. Add --max-cost 3.00 so a bad night can't become an expensive one. It stops moving up once the attempts have cost that much.
  • Trying out a new cheap model. The tool re-checks the cheap model on every fifth run, so if a newer one gets good enough, it notices.

Skip it when:

  • Nobody can check the answer automatically. Writing, design and open-ended questions need your judgment, and a passing exit code isn't one.
  • You already know the job is hard. If a task is a coin flip for the cheap model, run it with --models sonnet and avoid paying twice.
  • Your checks are slow, flaky or missing. The tool trusts your check. A test that passes on bad code makes bad code look fine.
  • The project holds secrets or is a company repository you don't control. Claude runs commands in the copy, which isn't a sandbox.

Does this already exist?

Partly, and it's worth being straight about what.

  • The idea is not new. Cascades, where you try a cheap model and escalate only when needed, go back years in research. NVIDIA's Switchyard has an escalation router. Stanford published a review of routing and cascades. A DEV Community post describes the same pattern. LangChain wrote up how to build a router inside an agent.
  • The existing versions are different in kind. Switchyard is an API gateway that escalates when a model judges the answer weak. The others are write-ups or live inside a framework. I couldn't find one you can drop on top of the claude command that uses your own test command as the judge, and that learns per kind of task, in a few dozen lines.
  • Claude Code has a flag that sounds similar and isn't. --fallback-model switches models when the main one is overloaded or unavailable. It does nothing when the answer is wrong.

So what's new here isn't the idea. It's the smallest thing that works on the real command line, judged by tests you already own, with numbers from nine tasks, including the ones where it didn't help.

Before you run it

Read this part first, because the tool gives Claude real permissions. To run your tests, each attempt lets Claude read and edit files and run shell commands inside the temp copy. The copy protects your project from edits. It is not a sandbox, so a command can still reach anything your user account can. The tool skips .env files, node_modules and .git when it copies, but secrets can live elsewhere. Keep them out of the project, and don't point this at code you don't trust.

Build it step by step

  1. Check what you have. In a terminal, run node --version (it should say 20 or higher) and claude --version. If claude asks you to log in, do that once. You also need a command that exits with an error when your code is wrong. A test runner, a build or a lint step all work.

  2. Create the tool. Make a folder, save this as cheap-first.mjs inside it, and nothing else is needed:

#!/usr/bin/env node
// cheap-first: run a Claude Code task on the cheapest model first, check the result with YOUR test command,
// switch up to a bigger model if the check fails, and learn which kinds of task need the bigger model.
// MIT licence. Node 20+, no dependencies. It never deletes anything: each attempt works in a fresh copy in your
// system temp folder. The copy skips node_modules, .git and .env files. Claude may run shell commands in that
// copy, so keep secrets out of the project.
//
//   node cheap-first.mjs --prompt "Implement slugify in src/slugify.js" --check "node test.js" --task-type slugify
//   options: --dir .  --models haiku,sonnet,opus  --max-cost 1.50  --apply  --json  --prompt-file task.txt
//            --task-type <label>   remember how this kind of task goes and start higher when the cheap model keeps failing
//            --history <file>      where to remember it (default ./.cheap-first-history.json)
//            --claude-args="--max-turns 12"   extra flags for claude (use "=", split on spaces)
import { spawnSync } from 'node:child_process';
import { cpSync, mkdtempSync, readFileSync, writeFileSync } from 'node:fs';
import { tmpdir } from 'node:os';
import { join, resolve } from 'node:path';

const argv = process.argv.slice(2);
const args = {};
// Accepts "--key value" and "--key=value". Use the "=" form when the value itself starts with "--".
argv.forEach((x, i) => {
  if (!x.startsWith('--')) return;
  const eq = x.indexOf('=');
  if (eq > 0) { args[x.slice(2, eq)] = x.slice(eq + 1); return; }
  args[x.slice(2)] = argv[i + 1] === undefined || argv[i + 1].startsWith('--') ? true : argv[i + 1];
});
const prompt = args['prompt-file'] ? readFileSync(args['prompt-file'], 'utf8') : args.prompt;
if (!prompt || !args.check) {
  console.error('usage: cheap-first.mjs --prompt "..." --check "test command" [--task-type label] [--dir .] [--models haiku,sonnet,opus] [--max-cost 1.5] [--apply] [--json]');
  process.exit(2);
}

const dir = resolve(args.dir ?? '.');
const models = String(args.models ?? 'haiku,sonnet,opus').split(',');
const maxCost = args['max-cost'] ? Number(args['max-cost']) : Infinity;

// --- learn from past runs of the same kind of task -------------------------------------------------------
const MIN_SAMPLES = 3, PASS_MIN = 0.6, PROBE_EVERY = 5;
const type = args['task-type'];
const histFile = resolve(args.history ?? '.cheap-first-history.json');
let hist = {};
if (type) { try { hist = JSON.parse(readFileSync(histFile, 'utf8')); } catch {} }
const past = (type && hist[type]) || { runs: 0, attempts: [] };
const notes = [];
let start = 0;
if (type && past.runs > 0 && past.runs % PROBE_EVERY === 0) {
  notes.push(`re-checking ${models[0]} on "${type}" (every ${PROBE_EVERY}th run), in case it has got better`);
} else if (type) {
  while (start < models.length - 1) {
    const tried = past.attempts.filter(a => a.model === models[start]);
    const won = tried.filter(a => a.passed).length;
    if (tried.length >= MIN_SAMPLES && won / tried.length < PASS_MIN) {
      notes.push(`skipping ${models[start]} for "${type}": it passed ${won} of ${tried.length} earlier attempts`);
      start++;
    } else break;
  }
}

// --- run ---------------------------------------------------------------------------------------------------
const attempts = [];
let winner = null, spent = 0;

for (const model of models.slice(start)) {
  if (spent >= maxCost) { attempts.push({ model, skipped: `budget reached ($${spent.toFixed(2)} of $${maxCost})` }); break; }
  // Every attempt works in a fresh COPY, so a failed cheap attempt never pollutes the next one or your project.
  const work = mkdtempSync(join(tmpdir(), `cheap-first-${model}-`));
  cpSync(dir, work, { recursive: true, filter: s => !/node_modules|\.git(\/|$)|\/\.env|\.cheap-first-history/.test(s) });

  const t0 = Date.now();
  const run = spawnSync('claude', ['-p', prompt, '--model', model, '--permission-mode', 'acceptEdits', '--allowedTools', 'Read Edit Write Bash', '--output-format', 'json', ...String(args['claude-args'] ?? '').split(' ').filter(Boolean)],
    { cwd: work, encoding: 'utf8', maxBuffer: 64 * 1024 * 1024 });
  let out = {};
  try { out = JSON.parse(run.stdout); } catch {}
  const cost = out.total_cost_usd ?? 0;
  spent += cost;

  const check = spawnSync(String(args.check), { cwd: work, shell: true, encoding: 'utf8' });
  const passed = check.status === 0;
  attempts.push({
    model, passed, seconds: Math.round((Date.now() - t0) / 1000), cost, turns: out.num_turns ?? null,
    error: out.is_error || run.status !== 0 ? String(out.result || run.stderr || 'claude failed').slice(0, 160) : undefined,
    workdir: work,
    checkTail: passed ? '' : (check.stdout + check.stderr).trim().split('\n').slice(-3).join(' | '),
  });
  if (passed) { winner = attempts[attempts.length - 1]; break; }
}

if (type) { // remember, so the next run of this kind of task starts in the right place
  past.runs += 1;
  // Only real answers are remembered. If claude itself failed (usage limit, network), that says nothing about the model.
  past.attempts = [...past.attempts, ...attempts.filter(a => !a.skipped && !a.error).map(a => ({ model: a.model, passed: a.passed }))].slice(-30);
  hist[type] = past;
  writeFileSync(histFile, JSON.stringify(hist, null, 2));
}
if (winner && args.apply) cpSync(winner.workdir, dir, { recursive: true, filter: s => !/node_modules/.test(s) });

if (args.json) {
  console.log(JSON.stringify({ solvedBy: winner ? winner.model : null, startedAt: models[start], totalCost: spent, notes, attempts }, null, 2));
} else {
  for (const n of notes) console.log('note: ' + n);
  console.log('\nmodel     check   time   cost');
  for (const a of attempts) {
    console.log(a.skipped
      ? `${a.model.padEnd(9)} skipped: ${a.skipped}`
      : `${a.model.padEnd(9)} ${a.passed ? 'PASS ' : 'fail '}  ${String(a.seconds).padStart(3)}s  $${a.cost.toFixed(2)}${a.passed ? '' : '   ' + (a.error ?? a.checkTail)}`);
  }
  console.log(winner
    ? `\nsolved by ${winner.model} for $${spent.toFixed(2)} in total${args.apply ? ' (copied into ' + dir + ')' : ' (result kept in ' + winner.workdir + ', add --apply to copy it into your project)'}`
    : `\nno model passed your check ($${spent.toFixed(2)} spent)`);
}
process.exit(winner ? 0 : 1);
  1. Test the logic for free, before spending anything. The tool's job is mostly bookkeeping (what to try, when to stop, what to remember), and you can check that without calling a real model. Make a test folder next to it. Save this as test/fake-claude.mjs. It pretends to be claude: it writes a wrong answer when asked for Haiku and a right one for anything bigger.
#!/usr/bin/env node
// A stand-in for `claude` so the escalation logic can be tested without spending anything.
// haiku writes a wrong answer; sonnet and opus write the right one.
import { writeFileSync, existsSync } from 'node:fs';
const model = process.argv[process.argv.indexOf('--model') + 1];
writeFileSync('answer.txt', model === 'haiku' ? 'wrong' : 'right');
writeFileSync('argv.txt', process.argv.slice(2).join(' '));
writeFileSync('sawenv.txt', existsSync('.env') ? 'yes' : 'no');
const cost = { haiku: 0.05, sonnet: 0.15, opus: 0.2 }[model];
if (process.env.FAKE_ERROR === model) { console.log(JSON.stringify({ is_error: true, total_cost_usd: 0, result: 'usage limit reached' })); process.exit(1); }
console.log(JSON.stringify({ is_error: false, total_cost_usd: cost, num_turns: 3, result: 'done' }));

Now save this as test/test.mjs. It puts the fake on your PATH and checks twelve behaviours: escalate and leave your folder alone, apply the result, stop at the first model that passes, exit 1 on failure, stop at a budget, pass your extra flags through, keep .env files out of the copy, skip the cheap model after repeated failures, re-check it every fifth run, track kinds of task separately, remember nothing without a label, and not count a claude error as the model failing.

import { spawnSync } from 'node:child_process';
import { mkdtempSync, writeFileSync, readFileSync, chmodSync } from 'node:fs';
import { tmpdir } from 'node:os';
import { join, resolve, dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import assert from 'node:assert/strict';

const here = dirname(fileURLToPath(import.meta.url));
// Put a fake `claude` first on PATH so no real model is called.
const bin = mkdtempSync(join(tmpdir(), 'bin-'));
writeFileSync(join(bin, 'claude'), `#!/bin/sh\nexec node ${resolve(here, 'fake-claude.mjs')} "$@"\n`);
chmodSync(join(bin, 'claude'), 0o755);
const env = { ...process.env, PATH: `${bin}:${process.env.PATH}` };

const run = (extra, dir) => spawnSync('node', [resolve(here, '../cheap-first.mjs'), '--prompt', 'write the answer', '--check', 'grep -q right answer.txt', '--dir', dir, '--json', ...extra], { env, encoding: 'utf8' });
const project = () => { const d = mkdtempSync(join(tmpdir(), 'proj-')); writeFileSync(join(d, 'answer.txt'), 'untouched'); return d; };

{
  const d = project(); const r = run([], d); const o = JSON.parse(r.stdout);
  assert.equal(r.status, 0);
  assert.equal(o.solvedBy, 'sonnet');
  assert.deepEqual(o.attempts.map(a => a.model), ['haiku', 'sonnet']);
  assert.equal(o.attempts[0].passed, false);
  assert.ok(Math.abs(o.totalCost - 0.2) < 1e-9);
  assert.equal(readFileSync(join(d, 'answer.txt'), 'utf8'), 'untouched');
  console.log('ok  escalates haiku -> sonnet, and your folder is untouched');
}
{
  const d = project(); const r = run(['--apply'], d);
  assert.equal(JSON.parse(r.stdout).solvedBy, 'sonnet');
  assert.equal(readFileSync(join(d, 'answer.txt'), 'utf8'), 'right');
  console.log('ok  --apply copies the winning result back');
}
{
  const d = project(); const r = run(['--models', 'haiku'], d);
  assert.equal(r.status, 1);
  assert.equal(JSON.parse(r.stdout).solvedBy, null);
  console.log('ok  exits 1 when no model passes');
}
{
  const d = project(); const o = JSON.parse(run(['--max-cost', '0.04'], d).stdout);
  assert.equal(o.attempts.length, 2);
  assert.ok(o.attempts[1].skipped, 'the second model is listed as skipped, not run');
  assert.equal(o.solvedBy, null);
  console.log('ok  stops spending at --max-cost');
}
{
  const d = project(); const o = JSON.parse(run(['--models', 'sonnet,haiku'], d).stdout);
  assert.equal(o.solvedBy, 'sonnet');
  assert.equal(o.attempts.length, 1);
  console.log('ok  stops at the first model that passes');
}
{
  const d = project(); const o = JSON.parse(run(['--claude-args=--max-turns 7 --strict-mcp-config'], d).stdout);
  const seen = readFileSync(join(o.attempts[0].workdir, 'argv.txt'), 'utf8');
  assert.ok(seen.includes('--max-turns 7 --strict-mcp-config'), seen);
  console.log('ok  --claude-args reaches claude');
}
{
  const d = project(); writeFileSync(join(d, '.env'), 'SECRET=1');
  const o = JSON.parse(run([], d).stdout);
  assert.equal(readFileSync(join(o.attempts[0].workdir, 'sawenv.txt'), 'utf8'), 'no');
  console.log('ok  .env files are not copied into the attempt folder');
}
// --- learning from past runs (fake haiku always fails, so after 3 failures the tool should start at sonnet) ---
const learn = (hist, type, extra = []) => JSON.parse(run(['--task-type', type, '--history', hist, ...extra], project()).stdout);
{
  const hist = join(mkdtempSync(join(tmpdir(), 'hist-')), 'h.json');
  for (let i = 0; i < 3; i++) assert.equal(learn(hist, 'parser').attempts[0].model, 'haiku'); // still learning: haiku first
  const o = learn(hist, 'parser');                                                              // 4th run
  assert.equal(o.startedAt, 'sonnet');
  assert.deepEqual(o.attempts.map(a => a.model), ['sonnet']);
  assert.ok(o.notes[0].includes('skipping haiku'), o.notes[0]);
  console.log('ok  after 3 failures it starts at sonnet for that kind of task');
  assert.equal(learn(hist, 'parser').attempts[0].model, 'sonnet');                               // 5th run: still skipping
  assert.equal(learn(hist, 'parser').attempts[0].model, 'haiku');                                // 6th run: re-checks haiku
  console.log('ok  every 5th run it re-checks the cheap model');
  assert.equal(learn(hist, 'slugify').attempts[0].model, 'haiku');
  console.log('ok  other kinds of task are tracked separately');
}
{
  const hist = join(mkdtempSync(join(tmpdir(), 'hist-')), 'none.json');
  run(['--history', hist], project()); // no --task-type
  assert.throws(() => readFileSync(hist), /ENOENT/);
  console.log('ok  without --task-type nothing is remembered');
}
{
  const hist = join(mkdtempSync(join(tmpdir(), 'hist-')), 'err.json');
  const r = spawnSync('node', [resolve(here, '../cheap-first.mjs'), '--prompt', 'x', '--check', 'grep -q right answer.txt', '--dir', project(), '--models', 'sonnet', '--task-type', 'job', '--history', hist, '--json'], { env: { ...env, FAKE_ERROR: 'sonnet' }, encoding: 'utf8' });
  assert.ok(JSON.parse(r.stdout).attempts[0].error);
  assert.deepEqual(JSON.parse(readFileSync(hist, 'utf8')).job.attempts, []);
  console.log('ok  a claude error (such as a usage limit) is not remembered as the model failing');
}
console.log('all tests passed');

Run node test/test.mjs. You should see twelve ok lines and "all tests passed":

The logic tests

Two of those tests exist because I got things wrong. My first version dropped --claude-args "--max-turns 7" silently, because my argument parser treated anything starting with -- as a new flag, so the fix was allowing --key=value. And my first ten-run experiment was spoiled when I hit my usage limit partway through: claude failed in two seconds, and the tool counted those failures as the model getting the task wrong. It now ignores claude errors instead of remembering them.

  1. Run your check by hand first. On your untouched project, run the check command yourself. It should either pass, or fail with a message about your tests. If it fails with something like "cannot find module", the check itself is broken, and the tool will happily escalate through every model and spend money for nothing. I did exactly this once, by giving the check a relative path that didn't exist inside the temp copy. Use a full path or a command that works from inside the project folder.

  2. Run it on a real task. Write your task in a text file, for example task.txt, the way you would type it to Claude. Then run it from your project's folder:

node /path/to/cheap-first.mjs --prompt-file task.txt --check "npm test" --task-type my-chore

Replace npm test with your own check. The costs in the table it prints are what Claude Code reported for each attempt, and the last line tells you where the winning copy is. Here is a run on my hard task, after the tool had learned the cheap model keeps failing there. It skipped Haiku and went straight to Sonnet:

A real run: it skips Haiku because Haiku keeps failing here
  1. Take the result, or set limits. Add --apply to copy the winning files into your project. Add --max-cost 1.00 to stop moving up once the attempts have cost that much. To pass other flags to claude, use the = form, for example --claude-args="--max-turns 12". Change the order or the models with --models haiku,sonnet.

  2. Know what it remembers. With --task-type, it writes a small file called .cheap-first-history.json in the folder you ran it from. It keeps the last 30 attempts per kind of task. It skips a model once that model has passed fewer than 60% of at least 3 earlier attempts, and it re-checks the cheap model every fifth run. Those three numbers are my guesses, and you can change them at the top of the file. To forget everything, delete that file.

What it remembers

What it saved me on easy tasks

I ran it on the same nine small coding tasks from my model comparison, and ran Sonnet alone and Opus alone on the same tasks through the same tool, so the costs are comparable:

Nine tasks: cheap-first vs Sonnet only vs Opus only

All three approaches solved all nine tasks. This time Haiku passed every task on its first try, so nothing needed to switch, and cheap-first cost $1.09 against $2.56 for Sonnet alone and $3.35 for Opus alone. That is 57% less than Sonnet and about a third of Opus. It was also slower: 464 seconds in total against 293 for Sonnet and 290 for Opus, because Haiku takes more turns.

I also ran a second easy task, slugify, four times with a label. Haiku passed all four, the tool never skipped it, and each run cost between 6 and 16 cents.

The hard task: where it saves little

The expression parser is the one hard task. Before I added the memory, I ran the plain version five times: Haiku was perfect 3 times out of 5, and the average cost was $0.40 per run against $0.38 for Sonnet straight away. So without memory it roughly broke even.

Then I ran the learning version ten times in a row, starting with an empty memory:

The hard task, ten runs in a row

Here is what it did. In the first three runs it tried Haiku, which passed once and failed twice. After those three attempts, Haiku's record (1 pass in 3) was below 60%, so from run 4 on it started at Sonnet. In run 6 it re-checked Haiku, and Haiku failed again. In the six runs where it skipped Haiku, each run cost about $0.32. In the four runs where it tried Haiku first, the average was $0.53.

Be careful with the total. The ten runs cost $4.03. Sonnet's attempts on this task averaged $0.35, so always using Sonnet would have cost roughly $3.50, and the learning version came out about 15% more expensive over this stretch. That's the price of the three runs it needed to learn and the one re-check. The point of learning is what happens after: every later run costs the Sonnet price instead of the Sonnet price plus a coin-flip chance of a wasted Haiku attempt. If you run a kind of job often, that's where it pays. If you run it once or twice, it doesn't.

Also note that Haiku passed 3 of 5 here earlier and only 1 of its first 4 attempts in this experiment. The same model on the same task swings a lot from one set of runs to the next, which is why I'd trust the shape of these results more than any one number.

What it costs you

The tool is free and uses no paid service of its own. You pay only for the Claude Code runs, on whatever plan you have. For the easy tasks above, a Haiku attempt cost between 7 and 14 cents and the hardest about 28 cents, as Claude Code reported. We ran all of our testing on our own Pro account, so none of that is yours to repeat. Treat the figures as a guide: when I re-ran the same nine tasks later through a different script, the same model cost 1.6 to 1.8 times more. I suspect prompt caching, but I didn't verify it.

What I'd do with this

  1. Use it for jobs with a real, fast check. Failing tests, a build, a type check. Anywhere a computer can say "wrong" without you.
  2. Always label recurring jobs. --task-type is what turns it from a simple fallback into something that learns.
  3. Run your check by hand first. A broken check is the most expensive mistake this tool can make.
  4. Don't trust the model's own summary. It said "Perfect" on a failure. Your test is the judge.
  5. Add a budget for anything unattended. --max-cost keeps a bad day from becoming an expensive one.

What this doesn't tell you

  • Nine small coding tasks, each with a test I wrote, in one language (JavaScript), run over two days. Real projects have bigger files and tests that are slow, flaky or missing.
  • The learning rule (3 attempts, 60%, re-check every fifth run) is my guess. I tested it on one hard task over ten runs and one easy task over four, so I can't say it is the best setting.
  • I measured cost as Claude Code reported it and elapsed time on my machine. I didn't check either against a bill.
  • I never tried it with a check that is itself wrong in a sneaky way, for example a test that passes on bad code. In that case the tool will report success.
  • Passing the check doesn't make the code good. I didn't compare how readable or maintainable the cheap model's answers were.
  • It copies your project to a temp folder for each attempt, so a very large project will copy slowly. I didn't test one.
  • It runs Claude with permission to edit files and run commands in that copy. I tested it on small projects without secrets, and I didn't test it on a real company repository.

Sources

  • https://code.claude.com/docs/en/headless

Editorial note: We ran the steps in this guide ourselves and the screenshots come from those runs. Your results may differ with your plan, model or settings, so check anything important. Cover illustrations are AI-generated. Discovia is independent and not affiliated with Anthropic.

Share this guide X LinkedIn

New guides and tools

Hands-on Claude guides, straight to your inbox

Step-by-step walkthroughs of what's new in Claude and Anthropic's tools, with real screenshots and honest results, including what didn't work. No hype, no jargon, no noise.

By subscribing, you agree to receive newsletter and marketing emails, and accept our Terms of Use and Privacy Policy. You can unsubscribe anytime.

Claude Code Lab

Tests of Claude Code features: hooks, skills, rules files and workflows, with the numbers.

More Claude Code guides →

More from this author

Claude Code

I asked Claude to review a pull request with six planted bugs. Without the spec it found three. With it, all six.

Nine reviews, six planted bugs, three setups. Claude never invented a problem, but it could only catch what the code itself shows. The thing that moved the score from three to six was one short file saying what the change was meant to do.

C
Claude Code Lab
5 min read
Read next

Comments

Related Guides