llm-judge
Skill1 starsChanged 7 months agoMITView on GitHub
Design and scaffold LLM-as-judge evaluations for agentic systems and LLM applications. Walks the user through rubric design, judge prompt construction, bias mitigation, and runnable Python harness generation. Use when the user wants to evaluate an agent, build an eval suite, add regression tests for an LLM system, design a judge for quality/safety/ compliance, or audit an existing eval setup.
- Reads credentials
2 other projects use a version of this.
Adopted by
Most recently taken up by
- existential-birds/beagletheir own version, first seen Nov 29, 2026
- cdgutierrez6/claude-skillstheir own version, first seen Aug 21, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- existential-birds/beagle★ 91same name
- cdgutierrez6/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 11 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 48
Follow these phases in order.
- Very specific: line 53
Use AskUserQuestion if the user has not already given you:
- Distinctive: line 64
Only proceed when these four are answered.
- Distinctive: line 76
5-point Likert: use for quality, coherence, tone.
- Very specific: line 86
Write the finalised rubric to ./evals/rubric.md in the user's project.
- Distinctive: line 91
Every judge prompt must include:
- Distinctive: line 102
Do not reveal which model produced the output.
- Very specific: line 105
Read docs/biases.md and flag any bias risk specific to this eval (e.g.
- Very specific: line 120
Do not hard-code API keys.
- Distinctive: line 139
Document which mode is active and why in the rubric.
- Distinctive: line 164
Run the judges on those examples.
- Distinctive: line 166
If agreement is low (<0.6 kappa, <0.7 Spearman), iterate on the prompt or anchors.
- Distinctive: line 183
Do NOT run the harness yourself unless the user asks.
- Very specific: line 195
Environment state: if the agent acts on external state (DB, filesystem, API), checkpoint the state before and after and include a …
- Distinctive: line 200
Does not fine-tune judges.
- Very specific: line 202
Does not commit to a specific vendor framework.
- Distinctive: line 204
Does not replace human evaluation.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
llm-judge
What this skill does
Guides the user through building a rigorous LLM-as-judge evaluation for an agent or LLM application. Produces:
- A rubric with explicit, measurable criteria.
- Judge prompts per criterion, with bias-mitigation built in.
- A runnable Python harness that executes the judges against a dataset and emits structured JSON for regression tracking.
- A calibration plan against a small human-labeled set.
The skill is framework-agnostic. The generated harness uses only the anthropic (or
openai) SDK by default. Notes on DeepEval and Inspect AI are included in docs/ for
users who want to graduate to a heavier toolkit.
When to invoke
Invoke when the user says anything like:
- "evaluate this agent"
- "build an eval" / "set up evaluation" / "write regression tests for this LLM system"
- "LLM as a judge" / "how do I grade these outputs"
- "audit my eval" / "review this evaluation setup"
- "design a rubric for
<agent>"
Workflow
Follow these phases in order. Do not skip. Each phase should produce concrete artefacts in the user's working directory.
Phase 1 — Scope the eval (ask before building)
Use AskUserQuestion if the user has not already given you:
- What is being evaluated? A single-turn chatbot, a multi-step agent with tool use, a RAG system, a planner, or a specific workflow.
- What does "good" look like? Task success, safety, compliance, efficiency, tone, factuality, tool-use correctness. The user should name 2–5 things they care about.
- What ground truth is available? Gold answers, reference trajectories, human labels, or nothing (pure LLM judgment).
- What is the deployment context? Research prototype, production pipeline, regulated industry (healthcare, finance, legal). This determines rigour level.
Only proceed when these four are answered. If the user says "just build something", propose defaults and confirm.
Phase 2 — Design the rubric
Load templates/rubric.md and adapt it to the user's context. For each criterion:
- Name it (one noun phrase, e.g. "Tool-call correctness").
- Define it operationally. What exactly does the judge check.
- Choose a scoring type:
- Binary (pass/fail): use for safety, compliance, hard constraints.
- 3-point (fail/partial/pass): use for task success.
- 5-point Likert: use for quality, coherence, tone. Use sparingly because it's noisy.
- List the failure modes the criterion is meant to catch.
- Decide if the criterion is step-level (evaluated at each agent step) or trajectory-level (evaluated on the whole run).
For agents, always include at least:
- A task-success criterion (trajectory-level).
- A tool-use-correctness criterion (step-level, optional if no tools).
- A safety/compliance criterion (binary, trajectory-level).
Write the finalised rubric to ./evals/rubric.md in the user's project.
Phase 3 — Draft judge prompts
For each criterion, draft a judge prompt using templates/judge-prompt.md as the base.
Every judge prompt must include:
- Role line: "You are a rigorous evaluator of [criterion]."
- Definition: restate what the criterion means, in judge-facing language.
- Scoring scale: explicit scale with anchors for each point.
- Input schema: what the judge will see (input, output, and for agents, the trajectory).
- Bias controls:
- Force structured JSON output.
- Require rationale BEFORE the score (chain-of-thought ordering).
- For pairwise judging: instruct the judge to ignore position and length.
- Do not reveal which model produced the output.
- Output schema: strict JSON with
rationale(string) andscore(typed per scale).
Read docs/biases.md and flag any bias risk specific to this eval (e.g. if outputs are
going to be long, verbosity bias is a concern).
Save judge prompts as separate files in ./evals/judges/<criterion>.md.
Phase 4 — Generate the harness
Copy templates/harness.py to ./evals/run_eval.py. Customise:
- The dataset loader (point it at the user's data).
- The judges list (one entry per criterion, each referencing a prompt file).
- The system-under-test adapter (a function that takes an input and returns an output/trajectory — the user fills this in if they haven't given you the agent code).
- The output path for the JSON results.
Do not hard-code API keys. Read them from environment variables. Remind the user to set
ANTHROPIC_API_KEY or OPENAI_API_KEY.
Phase 4b — Step attribution
For agent evals, scoring steps in isolation is not enough: the user also wants to know
which steps caused the final outcome. Copy templates/attribution.md to
./evals/judges/attribution.md and set ATTRIBUTION_PROMPT_PATH in the harness.
Two modes are supported:
- blame (default): one extra judge call per trajectory per criterion. The judge
reads the trajectory and the final verdict, then assigns a weight in [-1.0, 1.0] per
step plus a
critical_stepindex. Cheap, soft — correlation not causation. - counterfactual: for each step N, re-run the agent from step N with the step
masked/modified, and measure how much the final score changes. The delta IS the
causal influence. Rigorous but expensive, and requires the user's agent to support
resume_from_step. Opt-in.
Document which mode is active and why in the rubric.
Phase 4c — Incremental / automatic re-eval
The harness caches verdicts by (example_hash, rubric_hash):
example_hashcoversid + input + reference.rubric_hashcoversjudge_model + every judge prompt + attribution prompt.
Consequences:
- Adding a new example → only that example runs.
- Editing a judge prompt → rubric_hash changes → everything re-runs against the new judge.
- Nothing stale ever ships: the cache key is content-addressed, not name-based.
templates/watch.py is a dependency-free polling watcher that re-invokes run_eval.py
whenever the dataset or judge prompts change. Copy it to ./evals/watch.py and run
either python watch.py --once (one-shot) or python watch.py --interval 10
(continuous). This is the "automatic" layer: drop a new example into the dataset file
and the next cycle evaluates it without touching anything else.
Phase 5 — Calibration plan
Explain the calibration loop:
- The user should hand-label 20–50 examples with the rubric.
- Run the judges on those examples.
- Compute per-criterion agreement (Cohen's kappa for categorical, Spearman for ordinal).
- If agreement is low (<0.6 kappa, <0.7 Spearman), iterate on the prompt or anchors.
- Re-check whenever the judge model changes or the rubric is updated.
Generate ./evals/calibrate.py that takes a CSV of human labels and the judge output JSON
and prints per-criterion agreement.
Phase 6 — Report back
Summarise in plain language:
- What was evaluated.
- What rubric you proposed.
- What bias risks you flagged.
- What files you created.
- What the user needs to do next (fill in the system adapter, add the dataset, run calibration).
Do NOT run the harness yourself unless the user asks. The harness will call paid APIs.
Agentic system extensions
For evaluating agents specifically, additionally:
- Trajectory representation: serialise the agent run as a list of steps, each with
role,content,tool_calls,tool_results. The judge sees this structured trace. - Step-level vs trajectory-level: step-level judges score individual tool calls or reasoning steps; trajectory-level judges score the whole run. Use both.
- Cost/efficiency metrics: track step count, token count, tool-call count, wall-clock time. These are not LLM-judged — compute them programmatically.
- Environment state: if the agent acts on external state (DB, filesystem, API),
checkpoint the state before and after and include a
state_diffcriterion.
What this skill does NOT do (by design)
- Does not fine-tune judges. Use Prometheus-style fine-tuned judges only when LLM-as-judge with a strong base model has been shown insufficient.
- Does not commit to a specific vendor framework. If the user wants DeepEval or Inspect
AI, read
docs/patterns.mdand point them there. - Does not replace human evaluation. The calibration step is mandatory for any production use.
References
- Zheng et al. 2023, "Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena" — established position/verbosity/self-enhancement biases.
- Liu et al. 2023, "G-Eval: NLG Evaluation using GPT-4 with Better Human Alignment" — chain-of-thought + form-filling judge pattern.
- Yao et al. 2024, "τ-bench: A Benchmark for Tool-Agent-User Interaction" — agent eval benchmark design.
- Anthropic Evals cookbook, UK AISI Inspect documentation, OpenAI Evals repo.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

