google-agents-cli-eval
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
Install google-agents-cli-eval
npx skills add google/agents-cli --skill google-agents-cli-eval -a claude-codeInstalls into .claude/skills/ in your project. Add -g to install it for all your projects, in ~/.claude/skills/.
SKILL.md
Shown as published, under the repository's Apache-2.0 license.
---
name: google-agents-cli-eval
description: >
This skill should be used when the user wants to "run an evaluation",
"evaluate my agent", "evaluate my ADK agent", "write an eval dataset",
"analyze eval failures", "compare eval results", "optimize agent", or needs
guidance on the Gemini platform eval methodology and the Quality Flywheel.
Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes.
Applies to any agents-cli project, whatever framework the agent is written in.
Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment
(use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
metadata:
author: Google
license: Apache-2.0
version: 1.16.0
requires:
bins:
- agents-cli
install: "uv tool install google-agents-cli"
---# Agent Evaluation Guide
> **Requires:** `agents-cli` (`uv tool install google-agents-cli`) — [install uv](https://docs.astral.sh/uv/getting-started/installation/index.md) first if needed.
> **Scaffolded project?** If you used `/google-agents-cli-scaffold`, dataset and a custom metric are already scaffolded in `tests/eval/` (Python projects) or `eval/` (Go projects). For simplicity, this skill and its references use the Python directory layout; adjust accordingly if you've scaffolded a Go agent.
> You already have `agents-cli eval run` (chains `generate` + `grade`), `tests/eval/datasets/`, and `tests/eval/eval_config.yaml`. Start with executing `eval run` and iterate from there.
## Reference Files
| File | Contents |
|------|----------|
| `references/dataset_schema.md` | Canonical EvaluationDataset schema — all field types, JSON examples for single-turn / multi-turn / multi-agent, common mistakes |
| `references/metrics-guide.md` | Complete metrics reference — all built-in metrics, match types, custom metrics, judge model config |
| `references/user-simulation.md` | Dynamic conversation testing — `eval dataset synthesize` flags, what scenarios are, compatible metrics |
| `references/builtin-tools-eval.md` | google_search and model-internal tools — trajectory behavior, metric compatibility |
| `references/advanced-commands.md` | Opt-in commands: `eval analyze`, `eval optimize`, `eval submit` / `eval results` |
| `references/multimodal-eval.md` | Multimodal inputs — eval dataset schema, built-in metric limitations, custom evaluator pattern |
| `references/live-eval.md` | Live and voice agents — `--mode adk_live`, what gets graded, user-only turn authoring, the Live-model and region traps |
---
## The Quality Flywheel
Improving agent quality is iterative. The 4 stages below describe the loop. Each stage has a Default path (you, the coding agent, do the work directly) and an Opt-in CLI command that delegates to the Eval Service in Gemini platform for better quality and scale.
### 1. Prepare Data
**Default:** Use or edit the scaffolded `tests/eval/datasets/basic-dataset.json` to define single-turn eval inputs. Start with 1–2 cases. Its cases test the scaffolded sample agent; replace them when you replace it.
**Opt-in (ADK projects):** `agents-cli eval dataset synthesize`: user-simulate multi-turn datasets when you lack data; its output already includes traces, so Stage 2 collapses to `agents-cli eval grade` alone. See *Eval Commands* and `references/user-simulation.md`.
### 2. Run the Eval (always run)
**Default:** `agents-cli eval run` runs the agent over the dataset and grades the traces, writing `results_<ts>.{json,html}` to `artifacts/grade_results/`. Its last line is the verdict, e.g. `RESULT: FAIL (custom_response_quality 3.20 < 4.00; custom_response_quality: 1 case errored)`, and it exits 1 when a metric misses its threshold or a case errored. Agree the thresholds with the user and record them in the eval config (see *Evaluation Configuration Schema*).
**Decoupled form:** `eval generate` then `eval grade`, for a custom traces location, re-grading without re-running the agent, or traces from `synthesize` (`eval grade` alone).
### 3. Analyze Failures
**Default:** Start from the `Failures:` list above the `RESULT:` line, which names each metric that missed its threshold, the cases below it, and the cases that errored. Then open the latest `artifacts/grade_results/results_<ts>.html` (or `.json`) for those cases' scores and judge rationales — see *What to fix when scores fail* below for the fix table.
**Opt-in:** `agents-cli eval analyze`, LLM-based failure clustering; prefer when you have 10+ failing cases and want categorized failure modes. See `references/advanced-commands.md`.
### 4. Optimize & Code Fix
**Default:** Edit the agent — adjust prompts, tool descriptions, instructions, or eval dataset based on the failure analysis. See *What to fix when scores fail* below for the failure → fix mapping.
**Opt-in (ADK projects):** `agents-cli eval optimize` runs ADK GEPA prompt optimization against a target metric (see `references/advanced-commands.md`). Suitable for prompt-only failures. The optimized prompt appears in the command output; capture it and apply it to the agent. For the full per-iteration trace, set `print_detailed_results: true` in your optimization config file.
> **Long-running and expensive.** GEPA optimization makes many LLM calls and can take a long time. Do not run it unless the user explicitly asks for prompt optimization. When you do run it, iterate as far as possible with manual fixes first, then run a **single** final `eval optimize` — never loop on this command.
### Running the loop
Iterate stages 2 → 3 → 4 → 2 (with `synthesize`, re-run Stage 1 each pass, then `eval grade`). After each fix, run `agents-cli eval compare <prev_results>.json <new_results>.json` to confirm the target metric improved without regressing others. Expect 5–10+ iterations per case before it passes, which is normal. Only after a case passes should you expand coverage with more eval cases.
When doing 5+ iterations, maintain a task list of which cases are fixed, which are still failing, and what fixes you've tried. Prevents re-attempting the same fix.
**Hold cases back.** Keep a slice of cases out of the loop and grade them only when you think you're done — otherwise you can't tell a fix that generalizes from one fitted to the cases you iterated against.
### Shortcuts That Waste Time
Recognize these rationalizations and push back — they always cost more time than they save:
| Shortcut | Why it fails |
|----------|-------------|
| "I'll lower the bar so it passes" | Lowering the bar hides real failures. If the agent can't meet the bar, fix the agent, don't move the bar. |
| "This eval case is flaky, I'll skip it" | Flaky evals reveal non-determinism in your agent. Fix with `temperature=0`, rubric-based metrics, or more specific instructions — don't delete the signal. |
| "I just need to fix the eval dataset, not the agent" | If you're always adjusting expected outputs, your agent has a behavior problem. Fix the instructions or tool logic first. |
| "I'll iterate until every case I have passes" | Nothing is left to detect overfitting to your own cases. See *Hold cases back* above. |
## Choosing the Right Metrics
Pick built-in metrics by what you want to measure. Only `multi_turn_task_success`, `multi_turn_trajectory_quality`, and `multi_turn_tool_use_quality` accept multi-turn traces; every other built-in 400s on one. When no built-in fits, write a custom metric (see *Evaluation Configuration Schema* below).
| Goal | Recommended built-in metrics |
|------|------------------------------|
| **Did the agent achieve the user's goal?** (catch-all for multi-turn agents) | `multi_turn_task_success` |
| **Was the agent's reasoning path logical and efficient?** | `multi_turn_trajectory_quality` |
| **Quality of tool / function calling across turns** | `multi_turn_tool_use_quality` |
| **Final response quality** (no ground-truth reference needed) | `final_response_quality` |
| **Factual grounding** (catch hallucinated claims, e.g., RAG agents) | `hallucination`, or `grounding` when the case carries a `context` field |
| **Safety policy compliance** | `safety` |
| **Match against a golden answer** | `final_response_match` (needs `reference` on the case) |
| **Different pass/fail criteria per case** | Put them on the case as `rubric_groups` and grade with a managed rubric metric. See `references/dataset_schema.md` (*Per-Case Rubrics*). |
| **Domain-specific check no built-in covers** | Write a custom `LLMMetric` (LLM-judge) or `CodeExecutionMetric` (deterministic Python). See *Evaluation Configuration Schema* below. |
Run `agents-cli eval metric list` to see all available built-ins. For full metric definitions and rubric details, see the [Gemini platform metric docs](https://cloud.google.com/gemini-enterprise-agent-platform/optimize/evaluation/manage-metrics) and `references/metrics-guide.md`.
---
## What to fix when scores fail
After `agents-cli eval run` completes, inspect the latest `artifacts/grade_results/results_<timestamp>.json` (or open the `.html` file) for per-case scores and judge rationales, the input to every fix decision below.
| Failure | What to change |
|---------|---------------|
| `multi_turn_task_success` low | The agent isn't completing the user's goal — fix orchestration, missing tool calls, premature termination, or wrong tool selection |
| `multi_turn_trajectory_quality` low | The agent reaches the goal inefficiently or takes wrong steps — refine planning prompts, tighten instruction order, or remove redundant tool calls |
| `multi_turn_tool_use_quality` low | Fix tool descriptions, parameter docstrings, or agent instructions for tool selection |
| `final_response_quality` low | Read the auto-generated rubric verdicts; refine agent instructions to address the worst-scoring criterion (often clarity, completeness, or instruction-following) |
| `hallucination` low | Tighten agent instructions to stay grounded in tool output; verify the tool actually returned the data the agent claimed |
| `safety` low | Add safety guardrails to instructions; review the violating content category in the rubric verdict |
| Agent calls wrong tools | Fix tool descriptions, agent instructions, or the model's tool-choice config (**ADK:** `tool_config`) |
| Agent calls extra tools | Add strict stop instructions, or switch to `multi_turn_tool_use_quality` |
After applying a fix, rerun `agents-cli eval run` and use `agents-cli eval compare <prev_results>.json <new_results>.json` to confirm the fix improved the target metric without regressing others.
---
## Eval Commands
`agents-cli eval <subcommand> --help` is the authoritative flag list; the examples below are the common invocations.
### `eval run` (default)
Runs the agent over the dataset and grades the traces in one command.
```bash
# Basic: dataset from tests/eval/datasets/, results to artifacts/grade_results/,
# metrics from tests/eval/eval_config.yaml
agents-cli eval run
# Advanced: pick the dataset, metrics, and output dir
agents-cli eval run --dataset tests/eval/datasets/custom.json --metrics final_response_quality,safety --output ./out/
# Gate: exit 1 if the 1-5 judge averages below 4
agents-cli eval run --fail-under custom_response_quality=4
```
### `eval generate`
Runs an agent over an evaluation dataset and writes traces to disk.
By default, runs the agent locally and records a trace per evaluation case. You can generate traces from an already-running agent by passing its HTTP endpoint and app name to `--url` and `--app-name`.
> **ADK projects.** The built-in generator serves the agent over HTTP and drives it over ADK's `/apps/...` and `/run_sse` routes — the same shape `--url` / `--app-name` expect. What it launches depends on the project's language: Python uses the project's `fast_api_app.py` if it exists, else `adk api_server`; Go runs `go run ...`. Extensions for other frameworks replace `eval generate` with their own generator, which may not serve HTTP at all; `--url` and `--app-name` are then unsupported.
```bash
# Basic — uses tests/eval/datasets/, writes to artifacts/traces/
agents-cli eval generate
# Advanced — custom dataset and output dir
agents-cli eval generate --dataset tests/eval/datasets/custom.json -o ./custom_traces/
# Against a deployed agent (or one you started manually)
agents-cli eval generate --url https://my-agent.run.app --app-name app
# Live agent — stream each case over ADK's /run_live WebSocket
agents-cli eval generate --mode adk_live
```
#### Evaluating Live agents
Live agents run over a WebSocket, not `/run_sse`: add `--mode adk_live` to `generate` or `run`. The dataset, the traces, and grading are unchanged, and the audio reply is transcribed so the transcript is what gets graded. Two things must already be true or the socket connects and *then* fails mid-session: the agent uses a Live model (the scaffold default is not one), and on Gemini platform its region is pinned on the model rather than left to `GOOGLE_CLOUD_LOCATION`. Both, plus dataset authoring rules: `references/live-eval.md`.
### `eval grade`
Scores traces (from `eval generate`, `eval dataset synthesize`, or hand-authored) against built-in or custom metrics. Writes timestamped `results_<YYYYMMDD_HHMMSS>.json` (consumed by `eval compare`) and `.html` (open in a browser) into the output dir, and prints a summary table to the console. The output ends with a `RESULT: PASS|FAIL (...)` line, or `RESULT: NOT GATED` when no thresholds are set; the command exits 1 when a metric's mean score is below its threshold (`thresholds` in the config, or `--fail-under`) or any case errored, so CI can gate on the exit code.
```bash
# Basic — defaults: traces from artifacts/traces/, results to artifacts/grade_results/,
# metrics from tests/eval/eval_config.yaml's metrics_to_run
agents-cli eval grade
# Advanced 1 — grade traces from a non-default location (the canonical
# pairing for `eval generate --output custom_traces/`)
agents-cli eval grade --traces custom_traces/
# Advanced 2: load metrics to run from a config file (YAML or JSON) on a specified trace file.
agents-cli eval grade --traces ./artifacts/traces/trace_1.json --config tests/eval/eval_config.yaml
# Advanced 3: dispatch rate, 15 metric computations per second by default. Lower it when the
# judge model or the eval service rate-limits you, raise it when they have headroom.
agents-cli eval grade --qps 5
```
See *Evaluation Configuration Schema* below for the config file format.
### `eval compare`
Diffs two `results_*.json` files from an eval run. Run it after a fix to confirm the target metric improved without regressing others.
```bash
agents-cli eval compare baseline.json candidate.json
```
### `eval dataset synthesize`
> **ADK projects.** It loads and runs the agent through ADK, so it is unavailable on other frameworks.
Generates user scenarios from your agent's tools and instructions, plays each against an LLM-backed user simulator, and writes graded-ready traces to `artifacts/traces/` (feed straight to `eval grade`, skip `eval generate`). Invocations, flags, and compatible metrics: `references/user-simulation.md`.
### Advanced commands
`eval analyze` (cluster failure modes), `eval optimize` (GEPA prompt tuning), and `eval submit` / `eval results` (managed cloud-side runs for CI or large datasets) are documented in `references/advanced-commands.md`.
---
## Evaluation Dataset Format
An `EvaluationDataset` is a JSON file with an `eval_cases` array. Cases come in two shapes depending on how they're used:
- **Inference input** (what you give to `eval generate`) — a single user prompt, or a multi-turn set of **user turns** (for live) / a continuation ending in a user turn (for SSE). The agent runs and produces traces. Don't pre-author agent replies for live inference.
- **Grading input** (what you give to `eval grade`) — a complete trace including the agent's responses and tool calls. Normally produced by `eval generate` or `eval dataset synthesize`; you don't write these by hand.
See `references/dataset_schema.md` for the full canonical schema, all field types, and common mistakes.
### Inference input format
Two shapes are supported.
**(a) Simple single-turn prompt** — what the scaffolded `tests/eval/datasets/basic-dataset.json` uses. The agent runs from scratch.
```json
{
"eval_cases": [
{
"eval_case_id": "greeting",
"prompt": {
"role": "user",
"parts": [{"text": "Hello, what can you help me with?"}]
}
}
]
}
```
**(b) Multi-turn via `agent_data`** — the shape depends on the transport:
- **Live (`--mode adk_live`):** author **user-only** turns; the agent generates every reply over one live session (authored agent turns are ignored, with a warning).
- **SSE:** continuation form — prior turns are seeded as history and only the trailing user turn is answered.
See `references/dataset_schema.md` (*Multi-Turn / Multi-Agent Dataset*) for the JSON shapes.
### Grading input format (traces)
A complete trace — agent responses plus `function_call` / `function_response` parts — normally produced by `eval generate` / `eval dataset synthesize` (you don't write these by hand). Authors are `"user"`, an agent ID from the `agents` map, or `"tool"`. See `references/dataset_schema.md` for the trace shape, multi-agent examples, and the full type reference.
---
## Evaluation Configuration Schema
`agents-cli eval run --config <path>` (and `eval grade --config <path>`) accepts a single configuration file in either **YAML** (`.yaml` / `.yml`) or **JSON** (`.json`). The file declares two parts:
- `metrics_to_run`: the **selection list** of metric names to execute on this run. A name resolves to a `custom_metrics` entry when one matches, otherwise to the built-in metric of that name.
- `custom_metrics` — a **definition pool** of custom metrics available to this project. Defining a metric here does **not** run it; it must also appear in `metrics_to_run` (or be passed via `--metrics name1,name2` on the CLI, which is equivalent to overriding `metrics_to_run` for that invocation).
- `thresholds` (optional) — the minimum **mean score** per metric, in that metric's own scale (built-ins score 0-1, the scaffolded `custom_response_quality` judge 1-5). A run with a metric below its threshold exits 1 and lists the cases scoring below it; `pass_rate` in the results is then the share of cases at or above it, unless the eval service already reported one. `--fail-under METRIC=SCORE` (repeatable, one metric each) overrides them per run. Errored cases fail the run with or without thresholds.
**Minimal example (YAML preferred — human-readable, no JSON escaping for prompts and Python):**
```yaml
metrics_to_run:
- multi_turn_task_success # built-in
- example_llm_metric # selected from custom_metrics pool below
- agent_turn_count # selected from custom_metrics pool below
custom_metrics:
- name: example_llm_metric
prompt_template: |
Rate the agent's response 1-5 for helpfulness and accuracy.
Prompt: {prompt}
Final response: {response}
Full trace (for tool-call and reasoning context): {agent_data}
Return JSON: {"score": <1|2|3|4|5>, "explanation": "<reason>"}
- name: agent_turn_count
custom_function: |
def evaluate(instance):
turns = (instance.get("agent_data") or {}).get("turns", [])
return {'score': len(turns)}
thresholds:
multi_turn_task_success: 0.8
example_llm_metric: 4
```
JSON is also accepted (same field names, with `prompt_template` and `custom_function` as escaped strings) — but **always prefer YAML** for human-readable configs.
Dispatch by field: `custom_function` → Python metric; `prompt_template` → `LLMMetric` (LLM-as-judge); neither, on a built-in name → parameterizes that built-in (e.g. `metric_spec_parameters.rubric_group_key`). Field reference: `references/metrics-guide.md`.
**Agent trace field model.** For datasets produced by `agents-cli eval generate` (or `eval dataset synthesize`), each eval case exposes three standard fields to a metric:
- `{prompt}` — the user message (or first user turn).
- `{response}` — the agent's final text response, extracted from the last text-bearing event. In `custom_function` callbacks this is `instance['response']` with shape `{"role": "model", "parts": [{"text": "..."}]}`.
- `{agent_data}` — the full structured `turns`/`events` trace, useful when the judge needs to reason about tool calls or intermediate reasoning.
`reference`, `context`, and `rubric_groups` are yours to author on the case: `eval generate` carries them onto the trace but never invents them, so `{reference}` / `{context}` resolve only where you wrote them. `rubric_groups` is not a placeholder at all: managed rubric metrics read it off the case, and a `custom_function` sees `instance['rubric_groups']`. See `references/dataset_schema.md` (*Per-Case Rubrics*).
Code-based metrics default to **local in-process execution** (no GCP project or region required, but the `evaluate(instance)` function runs with the CLI's privileges). Set `execution: "remote"` on the metric to run it server-side in the `CodeExecutionMetric` sandbox in Gemini platform instead — that path requires a configured GCP project + region.
---
## Common Gotchas
### Use Rubric-Based Tool Evaluation instead of Hardcoded Sequences
Evaluating agent tool usage using strict sequence matching is fragile because agents may call helper tools (like searches or geocoding) in different orders or perform extra proactive steps.
Instead, use **`multi_turn_tool_use_quality`** / **`multi_turn_trajectory_quality`**. These metrics automatically generate content-based and intent-based adaptive rubrics, assessing technical correctness and technical sequence logic semantically using an LLM judge rather than forcing a rigid match.
### App name must match directory name
> **ADK projects.**
The `App` object's `name` parameter MUST match the directory containing your agent:
```python
# CORRECT - matches the "app" directory
app = App(root_agent=root_agent, name="app")
# WRONG - causes "Session not found" errors
app = App(root_agent=root_agent, name="flight_booking_assistant")
```
### Gemini platform eval region
`eval run`, `eval grade`, and `eval submit` **default to the `global` endpoint**. They don't inherit the manifest `region` (the eval services support only a subset of regions), and `eval analyze` is `global`-only. Override these per run with `--region <REGION>` (e.g. data residency); the service rejects an unsupported one:
```
400 FAILED_PRECONDITION: Unsupported region for Vertex Evaluation Service: <region>
```
`eval generate` (without the `--url` flag) and `eval dataset synthesize` run your agent locally, so they honor the agent's own `.env` — notably `GOOGLE_CLOUD_LOCATION`, which selects the model endpoint **when the agent uses Gemini platform** (`GOOGLE_GENAI_USE_ENTERPRISE=true`); it's unused with a `GEMINI_API_KEY` (AI Studio). They take **no** `--region` and never override your `.env` with the manifest `region`; change the model region by editing `.env` — or, better for a single agent, pin it in code with `Gemini(model=…, client_kwargs={"location": …})`, which beats the env var and leaves it free for everything else. One caveat for `synthesize`: its scenario-generation step is a **server-side** eval call at `GOOGLE_CLOUD_LOCATION`, so keep that an eval-supported region (`global` by default) even though the agent itself could run elsewhere.
**No eval region fits your data-residency rules?** Fall back to **local custom metrics** — a `custom_metrics` entry with a `custom_function` (`execution: local`, the default) grades in-process with no GCP region required. You lose the managed built-in metrics, but your `custom_function` can still call an LLM judge in a compliant region itself — so LLM-as-judge grading stays available anywhere.
### The `before_agent_callback` Pattern (State Initialization)
> **ADK projects.**
Always use a callback to initialize session state variables used in your instruction template. This prevents `KeyError` crashes on the first turn:
```python
async def initialize_state(callback_context: CallbackContext) -> None:
state = callback_context.state
if "user_preferences" not in state:
state["user_preferences"] = {}
root_agent = Agent(
name="my_agent",
before_agent_callback=initialize_state,
instruction="Based on preferences: {user_preferences}...",
)
```
### Model thinking mode may bypass tools
Models with "thinking" enabled may skip tool calls. Force tool usage through the model's tool-choice config (**ADK:** `tool_config` with `mode="ANY"`), or switch to a non-thinking model for predictable tool calling.
---
## Common Eval Failure Causes
| Symptom | Cause | Fix |
|---------|-------|-----|
| Score fluctuates between runs | Non-deterministic model | Set `temperature=0` or use rubric-based eval with multiple samples |
| LLM judge ignores image/audio in eval | `get_text_from_content()` skips non-text parts | Use custom metric with vision-capable judge (see `references/multimodal-eval.md`) |
---
## Proving Your Work
Don't assert that eval passes — show the evidence. Concrete output prevents false confidence and catches issues early.
- **After running eval:** Paste the scores table output so the user can see exactly what passed and failed.
- **After fixing a failure:** Show before/after scores for the specific case you fixed, and confirm no other cases regressed.
- **Before deploy:** Rerun `agents-cli eval run` and show the scores for every case, not just the one you fixed, plus the final `RESULT:` line. The exit code gates only on the `thresholds` you set (and errored cases), so confirm they match the bar you agreed with the user.
---
## Related Skills
- `/google-agents-cli-workflow` — Development workflow and the spec-driven build-evaluate-deploy lifecycle
- `/google-agents-cli-adk-code` — ADK API quick reference for writing agent code (ADK projects only)
- `/google-agents-cli-scaffold` — Project creation and enhancement with `agents-cli scaffold create` / `scaffold enhance`
- `/google-agents-cli-deploy` — Deployment targets, CI/CD pipelines, and production workflows
- `/google-agents-cli-observability` — Cloud Trace, logging, and monitoring for debugging agent behavior0 errors · 2 warnings · 2 tips · 54 checks passed
SKILL.md body: 378 lines, about 6,391 tokens · description: 634 characters · 8 files in the folder
- SpecificationA
Fields and format the Agent Skills specification requires
14 of 15 passed - DescriptionA
Whether an agent can tell when to use the skill
6 of 6 passed - Structure and contentB
How the body and the bundled files are laid out
13 of 16 passed - SecurityA
Secrets, hidden instructions, shell commands and side effects
21 of 21 passed
All checks
Body is about 6,391 tokens, over about 5,000warning
After compaction Claude Code keeps only the first 5,000 tokens.
Fix: Split detail into files that load on demand. The token count shown in the report is an estimate: characters divided by four.
Rule: Body stays under about 5,000 tokens →metadata.requiresis a map, not a stringwarningClients expect flat string pairs.
Fix: Flatten the values. Join lists into one string and move nested keys up a level.
SKILL.md line 12
Rule: metadata maps keys to plain values →No numbered steps in the bodytip
Agents follow an ordered list more reliably than prose.
Fix: Turn the procedure into a numbered list. One action per step, with a check before the step that depends on it.
Rule: Body gives numbered steps →references/builtin-tools-eval.mdis 148 lines with no contents listtipAgents often preview only the top of a file.
Fix: Add headings and a short contents list. List the sections in the first lines of the file.
Rule: Long reference files start with a contents list →Starts with a frontmatter blockspecification
SKILL.md has to open with a
Rule: Starts with a frontmatter block →---block that holds at leastnameanddescription.Frontmatter is valid YAMLspecification
The text between the
Rule: Frontmatter is valid YAML →---lines has to parse as a YAML map.No byte order mark before the frontmatterspecification
Finds the invisible UTF-8 byte order mark (U+FEFF) that some Windows editors put at the start of a file.
Rule: No byte order mark before the frontmatter →Has a namespecification
The spec requires a
Rule: Has a name →namefield.Name uses lowercase letters, digits and hyphensspecification
1 to 64 characters of
Rule: Name uses lowercase letters, digits and hyphens →a-z,0-9and-, not starting or ending with a hyphen, with no double hyphens.Name avoids the words anthropic and claudespecification
The name must not contain
Rule: Name avoids the words anthropic and claude →anthropicorclaude.Name matches its folderspecification
The
Rule: Name matches its folder →namemust equal the name of the folder that holds SKILL.md.Has a descriptionspecification
The spec requires a non-empty
Rule: Has a description →description.Description fits in 1,024 charactersspecification
The spec caps
Rule: Description fits in 1,024 characters →descriptionat 1,024 characters.No angle brackets in name or descriptionspecification
Rule: No angle brackets in name or description →nameanddescriptionmust not contain<or>, so no XML-style tags such as<example>either.Compatibility note fits in 500 charactersspecification
When
Rule: Compatibility note fits in 500 characters →compatibilityis set it must be 1 to 500 characters.Frontmatter sticks to the spec's fieldsspecification
Fields other than
Rule: Frontmatter sticks to the spec's fields →name,description,license,compatibility,metadataandallowed-tools.Frontmatter keys are plain textspecification
Finds unquoted keys such as
Rule: Frontmatter keys are plain text →true:,no:,123:or2026-01-01:in the frontmatter, including keys undermetadata.Uses paths, not the legacy globs fieldspecification
The frontmatter sets
Rule: Uses paths, not the legacy globs field →globs, which Cursor keeps only for older skills.Description says when to use the skilldescription
The description should contain a trigger such as
Rule: Description says when to use the skill →Use when ....Description is written in the third persondescription
Avoid openers like
Rule: Description is written in the third person →You are,I help,I canorYou can.Description names the tool and the resultdescription
Flags short descriptions with no trigger that lean on vague verbs (
Rule: Description names the tool and the result →helps with,handles,manages), and descriptions that repeat the name.Description is long enough to matchdescription
Descriptions under 60 characters rarely carry both the job and the trigger.
Rule: Description is long enough to match →Description and when_to_use fit in 1,536 charactersdescription
Claude Code cuts the combined
Rule: Description and when_to_use fit in 1,536 characters →descriptionandwhen_to_usetext at 1,536 characters.Description says when to use it earlydescription
The first trigger phrase, such as
Rule: Description says when to use it early →Use when, starts after character 400.Body has instructionsstructure and content
The Markdown after the frontmatter should hold the instructions the agent follows, not be empty or a stray word.
Rule: Body has instructions →SKILL.md stays under 500 linesstructure and content
The spec and Anthropic both recommend keeping SKILL.md under 500 lines.
Rule: SKILL.md stays under 500 lines →Long skills keep detail in reference filesstructure and content
A body over 250 lines that never points to a bundled file, by link or by path.
Rule: Long skills keep detail in reference files →Body shows an examplestructure and content
No code block and no heading named Example.
Rule: Body shows an example →Paths use forward slashesstructure and content
Finds backslash paths such as
Rule: Paths use forward slashes →scripts\helper.py.No wording that goes out of datestructure and content
Finds dated phrases like
Rule: No wording that goes out of date →as of 2025,before March 2026orcoming soon.Every linked file existsstructure and content
A relative link in SKILL.md points to a file that is not in the skill's folder.
Rule: Every linked file exists →Reference files are linked from SKILL.mdstructure and content
A file linked from SKILL.md links on to further bundled files that SKILL.md does not link.
Rule: Reference files are linked from SKILL.md →Explains rules instead of shouting themstructure and content
Five or more all-caps
Rule: Explains rules instead of shouting them →MUST,NEVERorALWAYSin the body.Bundled files have descriptive namesstructure and content
Files named like
Rule: Bundled files have descriptive names →doc2.md,file1.mdornotes3.txt.No READMEs or changelogs inside the skillstructure and content
A
Rule: No READMEs or changelogs inside the skill →README.md,CHANGELOG.md,INSTALLATION_GUIDE.mdorQUICK_REFERENCE.mdat the root of the skill folder.Scripts never wait for typed inputstructure and content
A bundled script calls
Rule: Scripts never wait for typed input →input(),getpass(),read -p,Read-Hostor a prompt library such as inquirer. Files named as templates are skipped, since a person runs the copy.Placeholders work in every agentstructure and content
Finds
Rule: Placeholders work in every agent →$ARGUMENTS,${CLAUDE_SKILL_DIR}and${CLAUDE_PROJECT_DIR}in SKILL.md.No real secretssecurity
Finds API keys, tokens, private keys and literal passwords in SKILL.md and its bundled files. Files under
Rule: No real secrets →evals/,fixtures/,__fixtures__/or test data folders are checked by the test data rule instead.Test data uses obvious placeholderssecurity
Finds secret-looking values in
Rule: Test data uses obvious placeholders →evals/,fixtures/,__fixtures__/and test data folders. These are usually fakes, so they cost a warning; the same value anywhere else fails the secrets rule.No piping downloads into a shellsecurity
Finds
Rule: No piping downloads into a shell →curl ... | sh,wget ... | bash,curl ... | python,bash <(curl ...),curl ... | source,source <(curl ...)andiwr ... | iex.Commands that run before loading are reviewedsecurity
Finds
Rule: Commands that run before loading are reviewed →!command blocks that Claude Code runs before the skill reaches the model.allowed-tools stays narrowsecurity
Rule: allowed-tools stays narrow →allowed-toolspre-approves unrestrictedBash(orShell) or every tool.Skills with side effects wait to be askedsecurity
The name or description is about deploying, publishing, sending or deleting, and automatic invocation is not turned off.
Rule: Skills with side effects wait to be asked →No hidden characterssecurity
Finds Unicode tag characters and bidirectional controls in SKILL.md and the bundled files, and runs of two or more zero-width characters on one line of a Markdown, text or YAML file.
Rule: No hidden characters →Frontmatter has no code-running YAML tagssecurity
Finds language tags such as
Rule: Frontmatter has no code-running YAML tags →!!python/object,!!python/apply,!!js/functionor!!ruby/objectin the frontmatter.No instructions to hide actions or override safeguardssecurity
Finds wording such as "ignore previous instructions", "override all system prompts", "don't tell the user." or "without telling the user." Quoted examples, lines that tell the agent to resist such text, tests and test data are skipped.
Rule: No instructions to hide actions or override safeguards →Doesn't turn off permission promptssecurity
Finds
Rule: Doesn't turn off permission prompts →--dangerously-skip-permissions,--dangerously-bypass-approvals-and-sandbox,danger-full-access,--yoloandbypassPermissionson a line that runs an agent CLI or sets a permission mode, unless the same file says it runs in a container or VM.Doesn't read credentials and call the networksecurity
One file names a file that holds secrets, such as an SSH private key,
Rule: Doesn't read credentials and call the network →~/.aws/credentials,.netrcor browserLogin Data, and also makes network calls withcurl,fetch,requestsor similar.No encoded or obfuscated codesecurity
Finds decode-then-run code (
Rule: No encoded or obfuscated code →base64 -d | sh,eval(atob(...)),exec(base64...)), long chains of hex escapes orString.fromCharCode, base64 strings over 200 characters outsideassets/and data files, and password-protected archives (unzip -P,7z x -p).Downloads use HTTPSsecurity
Finds
Rule: Downloads use HTTPS →curl,wgetand PowerShell downloads fromhttp://URLs. Local and private addresses such aslocalhost,127.0.0.1,10.x,192.168.xand169.254.169.254are skipped.Hooks in the frontmatter are reviewedsecurity
The frontmatter has a
Rule: Hooks in the frontmatter are reviewed →hooksfield, which Claude Code turns into commands that run on later tool calls.Credential files are reviewedsecurity
Names files that hold credentials:
Rule: Credential files are reviewed →~/.sshand SSH private keys,~/.aws/credentials,.netrc,.pypirc,~/.kube/config,~/.docker/config.json,~/.config/gh,/etc/shadow, browserLogin Dataand cookies, wallet files and macOS keychain lookups.Changes outside the project are reviewedsecurity
Finds recursive deletes of
Rule: Changes outside the project are reviewed →/,~or$HOME,chmod 777and setuid, writes to shell startup files and agent settings, scheduled jobs and services (crontab,launchctl load,systemctl enable,schtasks),mkfsanddd if=.Downloads are pinned to a versionsecurity
Finds downloads from
Rule: Downloads are pinned to a version →releases/latestand from a branch such asmainormasteron raw.githubusercontent.com, of scripts and binaries that the skill then runs.Instructions ship with the skillsecurity
Finds a skill that tells the agent to fetch an instruction file from a URL (
Rule: Instructions ship with the skill →SKILL.md,AGENTS.md,CLAUDE.md,instructions.md,prompt.md,.cursorrules) or to follow the steps or commands on a web page.Links show where they gosecurity
Finds links through URL shorteners such as bit.ly or tinyurl.com, links to public IP addresses instead of domain names, and downloads from paste sites or anonymous file hosts such as pastebin.com or transfer.sh.
Rule: Links show where they go →Network callssecurity
Lists the first network call:
Rule: Network calls →curl,wget,fetch(,requests,urllib,axios,Invoke-WebRequestand similar. A note, not a fault: it costs no points.Binary filessecurity
Lists compiled or packaged files in the skill folder, such as
Rule: Binary files →.exe,.dll,.so,.jar,.pycor.wasm. A note, not a fault: it costs no points.
To fix these in your copy of the skill, let your agent do it: the skillland-fix skill for Claude Code, Codex and Cursor edits the SKILL.md and runs these checks again until it scores A. Get the skills
The validator checks how the SKILL.md is written. It doesn't run the skill, so a high score doesn't mean the skill is useful, correct or safe. What the score covers
Compared with the index
Score
80 scores higher than 17% of 4,462 skills.
Body size
About 6,391 tokens, loaded each time the skill runs. The median is 1,651.
Files (8)
A tick marks the 8 of 8 files the validator read. It reads text files under 200 KB.
- SKILL.md (opens in new window)
- references/advanced-commands.md (opens in new window)
- references/builtin-tools-eval.md (opens in new window)
- references/dataset_schema.md (opens in new window)
- references/live-eval.md (opens in new window)
- references/metrics-guide.md (opens in new window)
- references/multimodal-eval.md (opens in new window)
- references/user-simulation.md (opens in new window)
More agents & skills skills
google/skills · official
Measures and improves the quality of AI models and agents on Google Cloud using the Eval Quality Flywheel methodology. Use when generating synthetic user scenarios, evaluating an agent or model, building an eval dataset, picking or writing evaluation metrics, analyzing failures, comparing results before and after a fix, or when guidance is needed on Agent Platform eval methodology — including dataset schema, LLM-as-judge scoring, and common failure causes. For fine-tuning, use agent-platform-tuning. For general production deployment, use agent-platform-deploy.
npx skills add google/skills --skill agent-platform-eval-flywheel24.7k
agents-cli-aqua
C·76google/adk-recipes · official
Work with the Ambient Quality Agent (AQuA) added to this agents-cli project: augment the agents-cli agent with AQuA or attach the agent to an AQuA deployed elsewhere, read the quality insights it finds in production conversations, get AQuA's root-cause diagnosis, read what the developer asked it to remember, and fix the defects in the agent's code. Propose proactively when the user mentions AQuA or AQA, wants to monitor the quality of a deployed agent, mentions traces or observability, asks what is going wrong with their agent in production, wants to fix AQuA insights, or wants to publish code metrics to AQuA. Also propose it when traces from an evaluation run are in the telemetry table AQuA reads. Don't use it for scoring a local agent against a golden dataset (use google-agents-cli-eval) or for deploys without AQuA (google-agents-cli-deploy).
npx skills add google/adk-recipes --skill agents-cli-aqua10.7k
google/adk-recipes · official
Creates product search agents with semantic search and RAG on Google Cloud (Vector Search on Gemini Enterprise Agent Platform, BigQuery, embeddings). Use when the user wants to "build a product search agent", "create an e-commerce search", "make a shopping assistant", "set up semantic catalog discovery", "ingest products into Vector Search", or "deploy a retail RAG agent". Handles the full pipeline: catalog data ingestion to BigQuery, Gemini Enterprise Agent Platform Vector Search collection setup, ADK agent scaffolding, evaluation, and Cloud Run deployment.
npx skills add google/adk-recipes --skill product-search10.7k