Grade what your agent writes, then grade the grader.

“My eval passes everything. How do I know it is actually right, and who grades the grader?”

Builds one Claude judge for each rule a script cannot check, then tests every judge against outputs you trust and copies with one planted mistake, so you know its catch rate before it gates anything.

RUN THE OPERATOR SYSTEMADVANCED✓ APPROVED 4/4
EXAMPLE PROMPTS
>Build a judge for the rules a script cannot check in these agent outputs
>How do I test this judge before I let it gate anything?
>My regex checks pass but the outputs feel wrong. What judgment am I not scoring?
ABOUT THIS SKILL

What this skill does

Your eval scored the format. Nobody scored the judgment.

A format checker can count words, find the JSON, and catch a banned phrase. It cannot tell you whether the reason an agent gave is a real reason, whether a "tip for the rep" is quietly a ready-to-send email, or whether two sources that disagree got smoothed into one confident answer. Those are the failures that reach a customer.

This skill builds a Claude judge for each of those rules. One rule per judge, pass or fail, with the judge's reason attached. Then it does the part most people skip: it tests the judges. It runs each one against outputs you already trust and against copies with exactly one mistake planted, so you get a catch rate, a false alarm rate, and a consistency score for every judge before any of its verdicts count toward a gate.

A judge is a prompt. It can be wrong in the same ways the thing it grades can be wrong, so it gets an eval of its own.

Inputs

  • Works today with: a written list of the rules your output has to follow, and 10 or more outputs you have already reviewed and trust. Twenty is better.
  • An Anthropic API key: the judges are Claude models called through the Anthropic SDK.
  • Python: the starter scripts install Ragas, pinned to versions that work together.
  • Better with a contract: if you have never written your agent's rules down, run agent-contract first. A judge is only as sharp as the rule it is given.
  • Better with a format checker: anything a regex can check should be checked by a regex. Judges cost money and can drift. Scripts do neither.

How it works

  1. 1
    Step 1: Split the rules

    Go through the contract line by line and sort every rule into one of two piles.

    • Script: anything checkable by shape. Word counts, required fields, valid JSON, a value in a closed set, a banned string. These go in a format checker, and the checker runs first. A failure there stops the case before a judge is ever paid for.
    • Judge: anything that needs meaning. Is the cause real. Is this a sentence to the customer or advice to the rep. Do these two sources disagree.

    If a rule lands in neither pile, it is not a rule yet. Send it back to the contract.

  2. 2
    Step 2: Write one judge per rule

    One rule, one judge, pass or fail. Never one judge asking "is this good, 1 to 10". A narrow question gets the same answer twice, and when a case fails you know which line broke.

    Each rubric has four parts:

    1. The rule, in the contract's own words, with the line number.
    2. What passes.
    3. What fails.
    4. The near misses that must pass. This is where false alarms come from. A proof point the rep will repeat is not outreach copy. A person holding two compatible titles is not a conflict. Write the near misses down or the judge will flag them.

    When the rule has steps, ask for the steps: read the verification word, look for any other title, fail if both. A judge walking named steps is easier to check than one giving a verdict from a single read.

  3. 3
    Step 3: Show the judge only what it should judge

    Cut the input before you write a cleverer prompt. A judge that sees the whole output will borrow evidence from lines the rule is not about. Give it a view() that passes only the part the rule covers.

    The exception runs the other way: a judge cannot see what is not there. If a rule depends on a source page or the original request, pass that in too, or say plainly that the judge does not cover the rule.

  4. 4
    Step 4: Build the test set

    Three parts, built by build_set.py:

    1. Clean outputs that already passed a review. A judge should pass them.
    2. Planted mistakes: copies of clean outputs with exactly one rule broken by a scripted edit. The right answer is known the moment you write the edit, so you can measure a catch rate without anyone labelling failures by hand. Plant in a few different styles, and include some a regex would miss.
    3. Held out mistakes: new kinds of breakage you add after the first run and never use to tune a rubric. A judge that catches these learned the rule. One that catches only the originals learned the test.
  5. 5
    Step 5: Run it and read every disagreement

    run_judges.py runs every judge on every case, REPEATS times, and writes a report: false alarms on clean outputs, catches on planted and held out mistakes, what your format checker caught of the same mistakes, and consistency.

    Then a person reads every disagreement, with the judge's reason next to it. There are three kinds:

    • The judge is wrong. Tighten the rubric, add the near miss, or narrow the view, then rerun.
    • The earlier review was wrong. The "clean" output really breaks the rule. Count it as a catch and fix the agent.
    • The contract is vague. Both readings are defensible. The REVIEWER rules, the rule is written into the contract and the agent's prompt, and the rubric follows the contract.
  6. 6
    Step 6: Choose each judge's model

    Start every judge on Claude Haiku 4.5. Move one judge to a larger model only when a rerun shows the small one failing that rule, and record why next to the judge. Most rules do not need the larger model. Some do, and you only find out by measuring.

  7. 7
    Step 7: Gate on it, and keep it honest

    A judge counts toward a gate once it clears CATCH_BAR, ALARM_BAR, and CONSISTENCY_BAR. After that:

    • Every real production failure becomes a new planted case. The test set grows; it never restarts.
    • A rubric change means a rerun. A verdict from an older rubric is stale.
    • Keep the report next to the verdict. A score means nothing without the judges that produced it and the test that earned them trust.

Output format

The trust report from the fictional sample that ships with this skill, as it came back on the run before publishing.

JUDGE TRUST REPORT          the fictional sample, 2 repeats, 40 judge calls, a few cents

judge                            false alarms   planted   held out   format checker   consistency
                                 on clean       caught    caught     caught the same
because_names_cause_and_problem  0 of 4         4 of 4    0 of 2     2 of 6           1.00
no_outreach_copy                 0 of 4         4 of 4    2 of 2     0 of 6           1.00

MODELS
  because_names_cause_and_problem on Claude Haiku 4.5
  no_outreach_copy on Claude Sonnet 5.5

DISAGREEMENTS, for a person to read
  because_names_cause_and_problem, held out, cedar-roofing: missed on both repeats.
    the line: "Low fit: Cedar Roofing Co sits outside our size range."
    judge: pass. it read the size remark as "no problem maps".
    the rubric says restating the size is a fail.
  because_names_cause_and_problem, held out, dune-pest: missed, same reason.

OPEN
  does "outside our size range" count as "no problem maps"? the judge and the
  rubric disagree, so a person decides.

NEXT
  if yes, write it into the contract as an allowed form. if no, name it in the
  rubric as a fail with this exact example. then rerun the held out cases.

Tips

  • Every judge maps to exactly one rule, named by its contract line.
  • Nothing a script can check is sent to a judge.
  • Every rubric lists the near misses that must pass.
  • Every judge was run against clean, planted, and held out cases before its verdicts counted.
  • Held out cases were added after the first run and never used to tune a rubric.
  • The report lists every disagreement with the judge's reason, and a person read them.
  • A judge's model was chosen by a measured rerun, not by assumption.
  • No judge was tuned to silence a flag that was really a contract question.
  • The skill says which rules the judges cannot see, rather than implying full coverage.
  • No em dashes anywhere.
RELATED SKILLS
ALL RUN THE OPERATOR SYSTEM SKILLS →