/active-skills:agent-eval-designfrom active-skills
Design an evaluation strategy for a GCP AI agent before writing any eval code — choose metrics across outcome, trajectory, operational, and safety dimensions; pick scorer types (code-based rules, LLM-as-judge, human review); and plan a golden dataset with adversarial coverage. Use when the user asks how to evaluate an ADK, Vertex AI, Agent Engine, or Gemini Enterprise agent, what metrics to use, how to build a golden or test dataset for an agent, or wants an eval plan or eval strategy for an AI agent. Not for evaluating Claude Code skills (use skill-creator-enhanced), writing agent eval code (use agent-eval-implement), or executing agent evals (use agent-eval-run).
Ships in active-skills. 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.
Produce a written eval plan for an AI agent before any eval code exists. This is Evaluation-Driven Development (EDD): define what "good" looks like first, so the evals become the specification the agent is built and improved against. Agents can reach a correct answer through a broken process, so the plan must cover the path (trajectory) as well as the destination (final response) — plus what it cost to get there and whether it was safe.
The output of this skill is an eval plan document (template below) that
agent-eval-implement turns into runnable assets and agent-eval-run executes.
Ask (or extract from the conversation) before choosing anything:
| Level | What it tells you | When to include |
|---|---|---|
| End-to-end (final response) | Did the user get the right outcome? | Always |
| Trajectory / step-level | Did the agent take a sane, efficient path — right tools, right arguments, right order? | Whenever the agent calls tools (i.e., almost always) |
| Offline (curated dataset) | Regression safety before deploy | Always |
| Online (live traffic) | Real-user quality, unknown unknowns | Once the agent is deployed; plan it now, build it later |
End-to-end alone hides root causes; trajectory alone can pass a broken answer. Plan both.
Pick a small set from each applicable category — a single score always lies about
an agent. Full catalog with the concrete public metric names that implement each:
references/metric-taxonomy.md.
| Category | Core examples | Include when |
|---|---|---|
| Outcome | task success, factual correctness, semantic match to reference | Always |
| Trajectory & tool use | tool selection/argument accuracy, trajectory match (exact / in-order / any-order), efficiency | Agent calls tools |
| RAG | faithfulness/groundedness, context precision & recall | RAG-backed agents only |
| Operational | latency, cost/tokens, tool-call failure rate | Always (cheap — often captured automatically) |
| Quality & safety | hallucination, policy adherence, safe refusal under attack | Always; weight by risk profile |
| Scorer | Use for | Cost / fidelity |
|---|---|---|
| Code-based rules (exact match, trajectory match, ROUGE, JSON/format checks) | Objective, deterministic checks; CI gates | Cheap, fast, predictable |
| LLM-as-judge against a rubric | Semantic correctness, response quality, reasoning coherence | Moderate cost; needs rubric + calibration |
| Human review | Ambiguous cases, business-critical sign-off, calibrating the judges | Gold standard; use sparingly and deliberately |
Two rules that prevent silent bias: never judge an agent with the same model family that powers it (self-preference bias), and calibrate any LLM judge against a small human-labeled sample before trusting it in a gate.
The eval is only as good as its dataset. Blend three sourcing methods — detail and
sampling strategies in references/golden-dataset-methods.md:
Coverage checklist: happy paths, edge cases, out-of-scope/unanswerable queries,
and adversarial inputs (prompt injection, jailbreak, tool misuse — see
references/adversarial-testing.md). Version the dataset like code; a result that
can't name its dataset version is not reproducible.
Decide pass/fail now, not after seeing results — post-hoc thresholds always
drift toward whatever the agent already scores. State each as a checkable rule:
an absolute floor ("task success ≥ 0.9") or a regression bound ("hallucination
rate must not rise more than 2 points vs baseline"). Agents are non-deterministic,
so thresholds gate aggregates over multiple runs, never a single run —
agent-eval-run covers the statistics.
Produce this document and hand it to agent-eval-implement:
# Eval Plan: <agent name>
## Agent context — task, tools, RAG/multi-turn, runtime, risk profile
## Analysis levels — end-to-end / trajectory; offline now, online at deploy
## Metrics & scorers — table: metric | category | scorer | rationale
## Golden dataset — sources, target size, coverage checklist, versioning home
## Adversarial plan — attack types in scope, expected safe behavior
## Thresholds — metric | floor or regression bound | gate (PR / deploy)
## Open questions
Exact API signatures and metric names change: verify against live docs (google-developer-knowledge MCP first, context7 second) when implementing.
| Excuse | Reality |
|---|---|
| "The final answers look right, so the agent works." | Agents reach right answers via broken, costly, or unsafe paths. Trajectory metrics exist because outcome metrics can't see the path. |
| "One accuracy score is enough to start." | A single metric gets optimized at the expense of everything unmeasured. Pick at least outcome + trajectory + one safety signal. |
| "We'll define thresholds once we see the numbers." | Post-hoc thresholds ratify the status quo. EDD means the bar exists before the code. |
| "The judge model can be the same Gemini the agent uses." | Self-preference bias inflates scores. Use a different family, and calibrate against human labels. |
| "Synthetic data can cover everything; it's cheaper." | Ungrounded generation produces shallow paraphrases. Seed with real traces and SME-authored cases. |
| "Adversarial cases can wait until the security review." | Prompt injection is the #1 LLM application risk; untested refusal behavior is unknown behavior. Put attacks in the first dataset. |
| "The user asked about evaluating a 'skill', close enough." | Claude Code skills are measured by skill-creator-enhanced. This skill is for GCP AI agents. |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mlarkin00/plugins --plugin active-skills17 skills in this plugin
/agent-eval-implementBuild the runnable eval assets for an AI agent on GCP — ADK evalset files, pytest eval wiring, Gen AI evaluation service code for trajectory and final-response metrics, custom LLM-as-judge rubrics and scorers, and ground-truth eval datasets in Cloud Storage or BigQuery. Use when the user wants to write, build, create, or add agent evals, an evalset or eval test file, a custom judge or scorer for agent output, or an eval/ground-truth dataset — for an ADK, Vertex AI, Agent Engine, Gemini Enterprise, LangGraph, or LangChain agent. Works from an eval plan produced by agent-eval-design, or standalone when the user names just one asset. Not for choosing which metrics to measure (use agent-eval-design), executing eval runs or CI/CD gating (use agent-eval-run), or creating Claude Code skills (use skill-creator-enhanced)./agent-eval-runExecute agent evals and act on the results on GCP — run adk eval or pytest eval suites, interpret per-case and aggregate scores, compare a candidate agent against a baseline with statistical quality gates, debug failed trajectories down to the first bad step, wire evals into CI/CD, and extend to production with online evals and observability. Use when the user wants to run or re-run agent evals, see why an agent eval failed, check whether an agent version regressed, add agent evals to a CI/CD or Cloud Build pipeline, gate a deployment on eval results, fix flaky or noisy eval gates, or monitor a deployed agent's quality. Covers the non-determinism discipline these runs need: one run proves nothing, and a score that moved needs a statistical test before it means anything. Not for choosing metrics (use agent-eval-design), authoring evalsets or eval code (use agent-eval-implement), or measuring Claude Code skills (use skill-creator-enhanced).Other plugins' skills for the same job