/tooling:agent-evalsfrom tooling
MUST use for evaluating LLM and agent systems — design, build, and operate trustworthy, cost-controlled evals. Use when: evaluating/benchmarking an LLM, agent, RAG, or chatbot; building an eval suite, golden dataset, or LLM-as-a-judge; choosing deterministic vs model-graded evals; judging whether a score change is real vs noise or picking sample sizes; setting up evals in CI/CD or cutting eval cost; grading agent trajectories vs outcomes or tool-call accuracy; evaluating on AWS AgentCore or Bedrock. Keywords: LLM-as-a-judge, golden dataset, pass@k, pass^k, eval harness, RAG triad, hallucination/faithfulness eval, agent trajectory eval, tool-call accuracy, eval flaky/noisy, is my eval significant, AgentCore Evaluations, Bedrock Evaluations, are my evals good, how do I eval my agent.
Ships in tooling. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Evals are the highest-leverage investment in any LLM product — teams without them stay stuck in whack-a-mole, teams with them swap models in days. But most evals lie: they measure generic qualities that don't track the product, move on noise, or trust an unvalidated judge. This skill encodes what practitioners learned the hard way.
Read the matching reference fully before acting; load only the ones a row points to, and do not load the others until their decision point is actually reached (each is 130–150 lines — loading all four wastes context).
| The task in front of you | Load (entire file) |
|---|---|
| Find where the agent/system fails; pick metrics; build a dataset | references/metrics-and-datasets.md |
| Build, validate, or debug an LLM-as-a-judge / model-graded eval | references/llm-as-judge.md |
| Decide significance/sample size; design the pipeline, CI cadence, or cut cost | references/statistics-and-cost.md |
| Anything on AWS — AgentCore, Bedrock, CloudWatch, managed eval | references/agentcore-and-bedrock.md |
| An eval result looks surprising (all pass, all fail, a big jump), or you are about to trust an existing eval before comparing systems | references/eval-audit.md |
| Evaluating an MCP server or a tool set: write questions the data can settle, run them with the fixed harness, collect tool feedback | references/mcp-server-evals.md |
| Just deciding code-graded vs judge vs human, or outcome vs trajectory | none — stay in this file (Decisions 1 & 2) |
If unsure, start with metrics-and-datasets.md (error analysis comes before everything). The decision sections below are self-contained — only load a reference when its row matches.
Before building any evaluator, read traces. The most common and most expensive mistake is building infrastructure (judges, dashboards) before understanding failure modes — you automate ignorance. The correct order is non-negotiable:
1. ERROR ANALYSIS read 50–100 real traces → open-code failures freely →
axial-code into a taxonomy → count frequency
2. BUILD write evals ONLY for high-frequency, recurring failure modes
3. TIER & SCHEDULE cheap deterministic on every commit; judge on a curated set; human/canary pre-release
4. FLYWHEEL every confirmed prod failure becomes a golden-set case before the fix ships
60–80% of eval effort should be error analysis, not tooling. A one-off bug gets a targeted fix, not a new judge. Only build an expensive evaluator for a failure mode that recurs across versions.
Read references/metrics-and-datasets.md in full before doing error analysis or choosing metrics/datasets. It has the open/axial coding loop, dataset sizing, the metrics reference, and the RAG triad. Do not load the judge, statistics, or AWS references for this step.
Before writing any eval code, ask yourself: (1) Have I read ≥50 real traces, or am I guessing at failure modes? (2) Is this failure checkable in code (an answer, a schema, a tool call, a budget)? (3) Will this failure recur across versions, or is it a one-off I should just fix? Build an evaluator only when the answers are yes/structured/recurring — otherwise read more traces or fix the bug directly.
Grade with the fastest reliable method, in this order (Anthropic's explicit hierarchy):
| Method | Use when | Cost | Reliability |
|---|---|---|---|
| Code-based (deterministic) | answer/structure/tool-call/latency/cost is checkable | ~$0, <1ms | perfect, reproducible |
| LLM-as-a-judge (model-graded) | quality, tone, reasoning, faithfulness, open-ended — and code can't express it | $0.01–0.20/call | only after validation |
| Human | calibrating the judge; novel/high-stakes ground truth | very high | gold standard, unscalable |
Deterministic checks catch 30–60% of failures for free — always run them first and let the judge fire only on what survives. "Often all that lies between you and an automatable eval is clever design" (Anthropic). Reserve human grading for calibration only.
Making model-graded evals reproducible (they have two variance sources — the system under test AND the judge): pin a dated judge version (never gpt-4o-latest); temperature 0 (reduces but does NOT eliminate variance — GPU batching); binary/structured-JSON output; majority vote over 3–5 judge runs for gates; cache verdicts by hash(judge_version, prompt, input); version the judge contract as (model_id, rubric_version, prompt_hash).
Agents add three altitudes. Default to outcome; drill down only on failure or requirement.
Outcome / end-state "Did the task actually get done?" ← default & primary signal
└ Trajectory "Did it take a sensible path?" ← only if path is a requirement
└ Component "Did this tool call / route work?" ← to localize a found failure
Non-determinism means a single run is never enough. Two traps: reading a 2-point move as signal, and reporting point estimates with no interval.
pass@k = ≥1 of k succeeds (capability); pass^k = ALL k succeed (reliability). 0.75^3 ≈ 42%. Production needs pass^k.Use the bundled calculator instead of guessing:
python scripts/eval_stats.py power --baseline 0.80 --delta 0.04 # examples needed
python scripts/eval_stats.py compare --a results_a.json --b results_b.json # McNemar + bootstrap CI: real or noise?
python scripts/eval_stats.py kappa --judge judge.json --human human.json # validate a judge: κ, TPR, TNR
Each file is a JSON array of pass/fail (or scores). compare and kappa require the two arrays aligned element-for-element (same eval items, same order) — they run a paired test; independent, unaligned runs can't be compared this way.
A judge is a measurement instrument — calibrate before trusting it. An unvalidated judge gives false confidence (judges catch only 30–60% of real defects).
Read references/llm-as-judge.md in full before building, validating, or debugging any model-graded eval. It has the modes, the full bias→mitigation table, the validation loop, rubric design, and a judge prompt template. Do not load the metrics, statistics, or AWS references unless you separately hit their rows above.
The non-negotiables (full detail in the reference): binary pass/fail over Likert; one criterion per prompt; chain-of-thought before the verdict (then discard it); cross-family judge (never grade a model with itself); validate against human labels until Cohen's κ ≥ 0.6 (≥0.85 high-stakes), reporting TPR and TNR separately — accuracy alone hides a judge that passes everything.
Running a frontier judge on 500 examples per change is how teams end up abandoning evals. Tier them:
△ Tier 3 human / canary / A-B pre-release hours $$$
◢◣ Tier 2 LLM-judge on golden set per-PR/nightly minutes $$
◢——◣ Tier 1 deterministic + classifiers every commit seconds ¢
Most teams build only Tier 3 and never run it. Build Tier 1 first. Read references/statistics-and-cost.md in full when designing the eval pipeline, arguing significance, choosing sample sizes, scheduling CI, or cutting cost. Do not load the metrics, judge, or AWS references for this step.
Read references/agentcore-and-bedrock.md in full if the system runs on AWS, or the user mentions AgentCore, Bedrock, CloudWatch, or managed eval. Do not load the metrics, judge, or statistics references for this step, and do not load this file at all for non-AWS work — it's vendor-specific.
Read references/mcp-server-evals.md in full when the thing under test is an MCP server or a set of tools: it has blind question authoring, closed-data answers, NOT_FOUND cases and the scripts/mcp_eval.py harness. Do not load it for other targets.
One-paragraph orientation: AgentCore Observability emits OTEL traces (GenAI semantic conventions) to CloudWatch — that's the data, not eval. AgentCore Evaluations (GA 2026-03-31) is the managed scoring layer: 13 built-in evaluators at session/trace/tool levels, ground-truth via expected_response/expected_trajectory/assertions, online (sampled prod) vs on-demand (CI/CD) modes, custom code evaluators as Lambda. Bedrock Evaluations (managed, separate) does model + RAG eval with 11 metrics and judge models. Don't confuse Observability (data) with Evaluations (scoring), or Evaluations (measures quality) with Policy (blocks actions).
The order is the method: data → method → tier → math → flywheel.
scripts/eval_stats.py compare.(Reference routing is the table at the top of this file; the two grading/altitude calls are Decisions 1 & 2 above — both self-contained, no reference needed.)
references/agentcore-and-bedrock.md (opens in a new tab)references/eval-audit.md (opens in a new tab)references/llm-as-judge.md (opens in a new tab)references/mcp-server-evals.md (opens in a new tab)references/metrics-and-datasets.md (opens in a new tab)references/statistics-and-cost.md (opens in a new tab)scripts/eval_stats.py (opens in a new tab)scripts/mcp_eval.py (opens in a new tab)scripts/test_mcp_eval.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub tomaspalsson/flow --plugin tooling16 skills in this plugin
/agent-architectureArchitecture and token-economics for Claude agents: workflow vs agent vs multi-agent selection; subagent count; tool & MCP design; prompt caching; model routing; context-window blowup; AgentCore Runtime/Memory/Gateway/Identity/Code Interpreter/Observability. Use when: agent is too expensive/slow/forgets/loops; cutting token spend (caching, compaction, tool-result clearing, dynamic tool loading); context rot; tool count/federation; managing agent memory. Delivers Anthropic decision trees, exact token-cost mechanics, and AgentCore primitive mappings. Do NOT use for AgentCore deployment mechanics (containers, port 8080, ARM64, IAM, OAuth decorators, session backends) — use strands-agentcore instead./clean-codeThis skill embodies the principles of "Clean Code" by Robert C. Martin (Uncle Bob). Use it to transform "code that works" into "code that is clean."/cocoindex