Skip to content
Back to skills

Eval

ASecurity

Build and run evaluations for an AI agent or LLM application, including harnesses, tests from requirements, risks or failed runs, benchmarks, shared evaluators and judges. Also design scenarios, analyze coverage, repair tests, mock dependencies, or build agent-neutral tests of non-coding work such as assistants using mail or calendars. Measures the agent without changing it. Not for tasks that score a coding agent's code changes in a repository.

  • 160 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 13, 2026
ai-agentsgoapidatabase

Works with

  • api
  • mcp

Security analysis

A100/100

Pro scans all 11 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add relai-ai/agent-eval-loop --skill eval --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Eval?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Eval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/relai-ai-eval/badge)](https://www.skillsdirectory.com/skills/relai-ai-eval)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: eval
description: Build and run evaluations for an AI agent or LLM application, including harnesses, tests from requirements, risks or failed runs, benchmarks, shared evaluators and judges. Also design scenarios, analyze coverage, repair tests, mock dependencies, or build agent-neutral tests of non-coding work such as assistants using mail or calendars. Measures the agent without changing it. Not for tasks that score a coding agent's code changes in a repository.
---

# Build and run evals

Inspect existing tests, runners and results first. Read the relevant terms and guarantees in
`relai/README.md`, or the bundled [contract](../start/template/README.md#terms) when absent.
Use the [start skill](../start/SKILL.md)
when RELAI's managed artifacts are needed, not to replace working evaluation infrastructure.
Choose the work needed for the request under the [shared scope guidance](../start/template/README.md).
The methods below are starting points, not a required full journey.
For unsuitable or failing supplied code, use the shared
[adaptation guidance](../start/template/README.md#adapting-supplied-implementations).

When building or running evals, the goal is that each important behavior has a test that fails
when the agent lacks it and passes when it has it, runs the real agent under relevant operating
conditions, and was reviewed and frozen before its first run;
and the user has honest numbers on how the agent does on those tests.

Across Build and Run, maintain knowledge for future usefulness under the
[shared policy](../start/template/README.md#maintain-useful-knowledge), respecting read-only work.
Useful discoveries can update existing records without reproducing a wiki or board checklist.

## Choose the work

Apply the shared [purpose guidance](../start/template/README.md#establish-the-purpose) before
selecting scenarios or designing measurements, for both agent-specific and agent-neutral work.
Comparison setup alone does not establish the user's intended decision or outcome priorities.

Apply the methods relevant to the requested outcome, including analysis and scenario design.
Build and Run describe implementation and execution work; their setup, approvals and completion
criteria apply when that work is requested. Designing or recommending tests does not itself
authorize building or running them.

- **Build** - implement new or harder tests, with scenario approval and grader preview below.
  Add a harness on first use when the selected tests need one.
- **Run** - run selected frozen tests, score them and report where the agent stands
  ([measure](references/measure.md); its *Done when* applies). On a benchmark, follow
  [benchmarks](references/benchmarks.md). To compare runs before and after a change, use the `improve` skill.
- **Agent-neutral** - shared tasks for selected agents or stated compatibility requirements.
  Establish the interaction and evidence boundary before scenarios; adapt suitable existing
  infrastructure, or recommend Harbor with task services over MCP
  ([agent-neutral](references/agent-neutral.md); its *Done when* replaces the harness requirement
  below). Ask which mode fits when the request could mean either.

## Done when (build)

The outcomes below apply to the selected tests. The listed paths and commands are the
RELAI-managed implementation; a working project suite can meet the same guarantees through its
own task definitions, grading checks, reviewed test version, run records and reporting. Record
the guarantees they provide: faithful execution, graders checked against meaningful pass/fail
examples, a recoverable reviewed test version before real trials, and traceable results. RELAI
filenames are not required.

- **Harness ready** (first time only, [harness](references/harness.md); not needed when the only tests are
  a wrapped benchmark, whose own runner runs the agent, or agent-neutral tests whose selected
  integration already meets the execution guarantees).
- **Scenarios reviewed and approved:** a fresh scenario review
  ([review-scenarios](references/review-scenarios.md)) checked the proposals before anything was
  built, and you resolved its findings as *Approve the scenarios* below describes. Then the user,
  or an independent reviewer when the approval is delegated (by an agreement or a recorded choice
  in `decisions.md`), approved the scenario table below.
- Each test is a task under `relai/tests/<id>/` (or a benchmark row) meeting
  `relai/docs/files.md`, with a `README.md` stating behavior, scenario, risk probed and each
  evaluator; `check_task.py` passes, plus `--verifier` for Harbor or synthetic
  passing/failing/empty grading checks for a native runner; with API judges, every judge is shown
  able to fail (`relai/bin/judge.py --self-test`, or a synthetic violating trajectory for a
  prohibition judge).
- **Graders previewed:** the user, or the delegated independent reviewer, approved the preview below.
- A fresh test review ([review-test](references/review-test.md)) approved each test; `freeze.py` ran before its
  first real trial; one real trial per test scored every evaluator without an error.
- You showed the results (representative development failures with relevant trajectory evidence;
  protected evidence only through permitted assessment summaries), added and asked judge checks
  for each new judge evaluator using the protected-evidence boundary in
  [measure](references/measure.md#judge-checks-does-the-judge-score-the-way-the-user-would) and, when
  `[scoring].pass_mark` is unset, the pass mark ([measure](references/measure.md)), recorded each probe on
  its risk page when useful, and updated relevant knowledge or state for future work.

## Rules

- Keep tests focused; a combined scenario must exercise each behavior with distinguishable
  passing/failing criteria. Extend an existing test rather than near-duplicating it; a frozen test
  changes only under the *Frozen tests* rule.
- Match realism and difficulty to the agreed purpose. Representative cases can be easy;
  difficult probes preserve realistic ambiguity, competing cues and the claimed mechanism.
  When using a simulated user, its instructions hold only that user's goal and knowledge.
  Never put the answer, a diagnosis or a hint in the agent's input.
- Exact criteria are code, meaning is a judge, each criterion its own evaluator; expected values
  live in `tests/params.json`, not in evaluator code ([test-design](references/test-design.md)).
- **Both directions.** For any behavior an improvement could overcorrect (escalating, refusing,
  asking, searching, calling a tool), also test a case where doing it is right, so an agent
  that never does it cannot pass.
- **Split.** Development is the default; held-out tests are optional (`relai/README.md`, Terms).
  Recommend one only when comparable cases and task distribution make it meaningful, not from the
  count alone: many unique, issue-specific tests are not a useful random split.
- A failure caused by the trial itself (a refused action, a broken harness, a killed container)
  is inconclusive, not evidence about the agent; fix the probe.
- **Where tests come from.** Choose sources for the user's decision: traces and feedback,
  incidents, requirements and domain knowledge, open risks, coverage gaps and co-occurring weak
  signals, public issues and discussions, licensed requests or benchmarks, and harder or combined
  passing tests ([hardening](references/hardening.md), always as new tests). Prefer relevant
  observed evidence; fill gaps with labeled synthetic scenarios. Record provenance, authorization
  and uncertainty. An unresolved report is a lead, not proof of a current failure or difficulty.
  Preserve the source's mechanism when reconstructing a case ([test-design](references/test-design.md)).
- Specialized cases: a benchmark ([benchmarks](references/benchmarks.md)), a criterion shared across tests or
  an evaluator to repair ([shared-evaluators](references/shared-evaluators.md)), a dependency trials cannot reach or
  must not call ([mocks](references/mocks.md)).

## Ask the user

Use the start, scenario approval and grader preview as the usual build checkpoints (or combine
approvals when the user chose one sitting below). Consequential blockers follow the
[shared question timing](../start/template/README.md#working-with-the-user); continue independent
work. Skip any
question that the request, `relai/decisions.md`, the wiki or an agreement already answers. At the
start, ask together only what is still open:

- **Where to start**, only when the wiki has no open risks and the request names no behavior,
  run or benchmark: run the `discover` skill first (recommend this, more strongly when traces of
  real runs exist), build from risks read in the code now ([test-design](references/test-design.md),
  *Hard cases*), or test one behavior the user names.
- **Purpose and preferences** still open under the shared [purpose guidance](../start/template/README.md#establish-the-purpose):
  what the work should help decide or learn, relevant case selection and difficulty, and outcome
  priorities such as success, cost or latency. Recommend an approach and explain its consequences.
  Same-model versus as-deployed options answer comparison setup, not these questions. Resolve
  consequential gaps before presenting the scenario selection as agreed.
- For agent-neutral work, unresolved participants and interaction/evidence boundaries
  ([agent-neutral](references/agent-neutral.md), *Establish the boundary before scenarios*).
  Explain conflicts, affected tasks or claims, and recommended options before asking. Adapt
  unsuitable defaults within scope; pause only work depending on an unresolved guarantee.
- On first use, the harness questions still open ([harness](references/harness.md), *Ask the user*).
- **How involved to be**, when nothing says
  ([delegated approvals](../start/template/README.md#working-with-the-user)): approve the
  scenarios and grader preview yourself (recommended for the first build), or delegate both to a
  fresh independent review and see the results with the build's report. For a build of one or two
  tests, the user may also choose one sitting: build first (building runs no agent), then show the
  scenario with its grader preview together. Record the choice in `decisions.md`.

Make the timing explicit: choosing personal review "before trials" does not by itself choose
combined review after construction. Reuse covered authorization; otherwise retain scenario
approval before building, or offer a combined preview where appropriate as above. Surface
unresolved questions that affect omitted coverage or the intended use of the suite, with their
tradeoffs, rather than treating a nonblocking assumption as a settled user preference.

Name any missing credential variable and the project's credential mechanism (or `relai/.env`)
as an instruction, not a question. Reuse existing setup and continue work that does not need it.

## Approve the scenarios

Unless the approval is delegated or the user chose one sitting, wait for a yes before building. Write each proposed
test's full design to `relai/records/eval/<date>-scenarios.md` ([test-design](references/test-design.md),
*Proposing a test*, including each test's mechanism and shortcut).

Before the user sees the table, have a fresh reviewer check the scenarios file against
[review-scenarios](references/review-scenarios.md). Apply its *author fixes* findings to the
scenarios file. Carry its *user decides* findings into the approval question, each with the
reviewer's recommended default. When the scenario approval is delegated, this review is the
independent approval. In a one-sitting build, run it before building all the same: it needs only
the scenarios file and the sources.

In chat, show one compact table, in the order you recommend building: the
behavior, its source, the scenario in one line naming the real data and the trigger that makes
it hard, what failing looks like, and its opposite-direction partner, if any. Below it, give the
cost and time of one trial per test plus judging, in total; a yes approves that as this build's
budget, and you ask again only before exceeding it. Ask which tests to build: all, only
the first few, or change the list.

## Preview the graders before freezing

Freezing stops anyone tuning a test to the agent's results, so preview without running the agent:
score each test's evaluators on synthetic evidence (trajectories, artifacts, state or journals):
a passing case, a failure of the required behavior, an empty reply, and a **shortcut**, plus real
recorded traces that fit. The shortcut skips required behavior or a claimed risk trigger, as the
proposal names it: acting on the first match, reading a leaked answer, or ignoring an instruction.
It must fail the primary or affected risk check; otherwise repair the unsupported coverage claim
or scenario before freezing. A cheap correct solution remains valid. For a behavior with an
opposite-direction partner, also score the over-cautious strategy (always asks, never acts, refuses) on the test where acting is right. Write every test's full table (evaluator × case → score and the first line of
feedback) to `relai/records/eval/<date>-grader-preview.md`. Size chat previews by the shared
[decision-effort rule](../start/template/README.md#working-with-the-user), reviewing manageable
subsets when needed while keeping the complete artifact and pending decisions visible. For the
subset being approved, show every judge evaluator's rows and every score that differs from what
its case should get (a failing case not scored low,
a passing one below full marks, a missing required deliverable above the minimum; see
[test-design](references/test-design.md#rules), *Missing deliverables and prohibitions*). For a
pure prohibition, preview an actual violation to show that check can fail.
Validate code-output completeness as the [test review brief](references/review-test.md) describes.
Check relevant overlapping criteria and valid alternatives using
[test-design](references/test-design.md#checking-compatible-criteria).
For relevant changing dependencies, include the contrasts and evidence described in
[validity across runs](references/test-design.md#validity-across-runs).
Summarize the rest per test in
one line, such as "4 code checks scored as expected". Ask whether the current subset needs scoring
changes or is missing anything the user cares about; separate independent choices as the shared
guidance describes. Iterate until the answer is no, then review and freeze. When this decision
is delegated, the fresh test review stands in for the user. Build/freeze only the subset whose required decisions
are resolved; do not treat partial review as approval of the remaining tests.
Use the shared [reviewable handoff](../start/template/README.md#working-with-the-user): offer a
guided first batch or a capable app view with sources, scenarios and scoring examples. A large
preview file or aggregate score table alone does not establish an informed review.

## Approach

- Start from the request and relevant sources above, prioritizing risks by impact when choosing
  among them. For each test, write down the trigger,
  passing, failing and what would make the probe invalid before building.
- Prefer the agent's real configuration, real data and real user simulator. Grade outcomes from
  exported state (database changes, files, mock journals) with code; keep judges for meaning.

Files in this skill

  • SKILL.md11 KB
  • references/benchmarks.md8.5 KB
  • references/harbor-notes.md7.6 KB
  • references/hardening.md3.4 KB
  • references/harness.md12.9 KB
  • references/measure.md7.9 KB
  • references/mocks.md4.4 KB
  • references/review-harness.md4.5 KB
  • references/review-test.md3.4 KB
  • references/shared-evaluators.md3.4 KB
  • references/test-design.md7.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.