google/skills/agent-platform-eval-flywheel

Claude Code and agent skill by google/skills

Trust tier 4
  • vendor
Source check pending

Checking that the SKILL.md file is still in the repository.

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.

Install

npx vskill@latest install google/skills/agent-platform-eval-flywheel

SKILL.md

Agent Platform Eval Flywheel Skill

Help users evaluate and iteratively improve GenAI models and agents using the Agent Platform GenAI Evaluation SDK (google.genai / agentplatform).

Attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read Usage Attribution. For commands executed directly in the terminal (never in generated scripts, Terraform, or user code), prefix gcloud with CLOUDSDK_METRICS_REQUEST_ATTRIBUTION and append the attribution suffix to User-Agent headers:

text
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:agent-platform-eval-flywheel)"
User-Agent: <existing_user_agent> agent-skills/1.0 (skill:agent-platform-eval-flywheel)

When to use this skill

  • Evaluating GenAI agents or models with the Agent Platform GenAI Evaluation

SDK (client.evals.evaluate()).

  • Creating evaluation datasets from session traces, pandas DataFrames, or

synthetic generation.

  • Selecting, configuring, or writing custom evaluation metrics.
  • Analyzing rubric verdicts, loss patterns, and clustering failures.
  • Suggesting concrete code/prompt improvements based on eval results.
  • Evaluating a model served on an Agent Platform endpoint (BYOM) or a

Model-as-a-Service (MaaS) model by ID — including deploying the model first if needed. For this case, follow references/deployment.md and use the endpoint_evaluation.py / maas_evaluation.py scripts.

Safety & Confirmation Tiers (CRITICAL)

Before executing any commands or scripts on behalf of the user, you MUST adhere to the following safety tiers based on the action requested:

  1. Tier R: Read-only (inspect_results.py, compare_results.py,

validate_dataset.py, parse_adk_traces.py, render_html_report.py)

  • Rule: No confirmation needed. You may execute these helper scripts

immediately to inspect data, validate schemas, parse traces, or compare evaluation results.

  1. **Tier M: Evaluation & Generation Runs (client.evals.run_inference,

client.evals.evaluate, client.evals.generate_conversation_scenarios, client.evals.generate_loss_clusters)**

  • Rule: For predictable user approval over dataset reads, result

writes (dest), and remote compute/API usage, every call to client.evals.evaluate(), client.evals.run_inference(), client.evals.generate_conversation_scenarios(), or client.evals.generate_loss_clusters() — whether using remote metrics (LLM/rubric metrics or sandboxed types.CodeExecutionMetric) or local in-process metrics (types.Metric with a Python callable) — requires presenting a dry-run confirmation preview showing the proposed evaluation call and parameters and waiting for explicit 'Yes'/'No' user approval (do not quote remote compute charges when only local in-process types.Metric callables are used without dest or model inference).

  • Confirmation for EVERY evaluation run: Every evaluation,

re-evaluation, metric update, parameter change, or synthetic scenario generation requires its own dry-run preview and interactive confirmation. Never execute a second evaluation, comparison pass, or modified evaluation without presenting a new confirmation preview and obtaining user approval.

  • Same-turn restriction: Do not run the evaluation in the same turn as

presenting the confirmation prompt. End your turn after asking and wait for the user's reply; only execute after explicit 'Yes' / approval. Printing a preview and then calling the tool before the user can answer does not count as obtaining confirmation.

  • No Pre-Execution of Evaluation Calls: NEVER execute

client.evals.evaluate(), client.evals.run_inference(), client.evals.generate_conversation_scenarios(), or run any script invoking these SDK methods before user confirmation. In the initial turn, you may write the evaluation script to disk, but you MUST present the dry-run confirmation preview and obtain explicit user confirmation before running client.evals.evaluate().

  • Immediate Execution Upon Approval: Once the user explicitly approves

(e.g., 'Yes', 'Approved', 'Go ahead', 'Proceed'), proceed directly to executing the previewed evaluation script via run_command and report the results. Do not conclude the turn without executing the approved action.

Setup

The scripts need vertexai (from google-cloud-aiplatform[evaluation]), google-genai, pandas, and requests. Do not create a virtual environment — it starts empty and hides packages the environment already provides, forcing a redundant install. Probe, and install only what is missing:

bash
python3 -c "import vertexai, google.genai, pandas, requests" \
|| pip install 'google-cloud-aiplatform[evaluation]>=1.163.0' 'google-genai>=1.0.0'

The version specifiers must stay quoted: unquoted, bash reads >=1.154.0 as a redirect and silently writes an empty file instead of constraining the install.

Need GOOGLE_CLOUD_PROJECT and GOOGLE_CLOUD_LOCATION.

  • Preserve User Project and Location: Always prioritize the user's

explicitly provided project and location (e.g. project='<PROJECT_NUMBER>', location='us-central1'). Never change or override the user's requested location to 'global' unless the user explicitly requested 'global'.

  • Missing Parameters: If the user's request omits the project or location,

you MUST pause in your response and ask the user for the missing location/project before preparing or running the evaluation.

Correct SDK entrypoints
python
import agentplatform
client = agentplatform.Client(project=PROJECT, location=LOCATION)
client.evals.run_inference(model=..., src=...)
client.evals.evaluate(dataset=..., metrics=...)
client.evals.generate_conversation_scenarios(...)

Two imports that look plausible and are not:

  • from agentplatform.types import evals -- ModuleNotFoundError. types is

a module, not a package; use from agentplatform import types.

  • from vertexai.evaluation import PointwiseMetric, EvalTask -- the

superseded SDK. Its classes take different arguments (PointwiseMetric has no system_instruction), so code written against it fails with TypeError rather than an import error. Use agentplatform throughout.

The Quality Flywheel

Five stages, run in order on the first pass, then loop 2 → 5 until quality targets are met.

Shortcuts that waste time
ShortcutWhy it fails
"I'll tune the metric threshold downHides real failures. Fix the agent,

: so it passes." : not the bar. :

: : the agent. Fix with temperature=0 : : : or stricter instructions. :

: dataset, not the agent." : agent has a behavior problem. :

: — skip Stage 3." : Always run evaluate() and read : : : scores. :

: : early leaves regressions on other : : : metrics undetected. :

1. Prepare Data

Produce an EvaluationDataset. There are three input shapes, pick the one that matches the data the user already has:

  • `EvalCase` list (single-turn or multi-turn):

```python from agentplatform import types from google.genai import types as genai_types

# prompt/reference/response values are Content, not str. UserContent and # ModelContent wrap a plain string and set the right role. dataset = types.EvaluationDataset(eval_cases=[ types.EvalCase( prompt=genai_types.UserContent("What is 2+2?"), responses=[types.ResponseCandidate( response=genai_types.ModelContent("4"))], reference=types.ResponseCandidate( response=genai_types.ModelContent("4")), ), # For multi-turn agent traces, set agent_data instead of prompt/responses. ]) ```

Multi-turn agent traces wrap each conversation in AgentData → ConversationTurn → AgentEvent. See references/dataset_schema.md for the full type hierarchy.

  • Pandas DataFrame (tabular sources — CSV, BigQuery, Sheets):

```python import pandas as pd from agentplatform import types

df = pd.DataFrame({ "prompt": ["What is 2+2?", "Capital of France?"], "response": ["4", "Paris"], "reference": ["4", "Paris"], }) dataset = types.EvaluationDataset(eval_dataset_df=df) ```

Column names must match the fields the chosen metrics expect (see references/dataset_schema.md for the per-metric requirements table).

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 30 Sep 2026.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
20,494
Repository forks
1,694
7-day trend score
50

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill CERTIFIED badge
[![vskill CERTIFIED](https://verified-skill.com/api/v1/skills/google/skills/agent-platform-eval-flywheel/badge)](https://verified-skill.com/skills/google/skills/agent-platform-eval-flywheel)

Something wrong with this skill or its page? Tell us.