Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

add-evals

БесплатноБез исполняемых скриптовНе проверен

Write evals for a @statelyai/agent or XState agent machine at the right level — rule checks with no model, decision evals at one decision state, outcome evals…

statelyaiот statelyai★ 86 звёзд на GitHub

Об этом скилле

Add evals to an agent machine

Targets @statelyai/agent 2.0 alpha, as on the next branch. APIs change between alphas: when a call here does not match the installed package, check node_modules/@statelyai/agent/CHANGELOG.md.

The machine tells you what to eval and at which level. Every eval names the states it covers, so a failing eval points at a part of the machine.

read the machine → map the request to states → pick the level per state → write the evals → baseline → hand back

This is step 3 of 4. Before: loop-to-machine, add-traces. Next: improve-machine.

Hard rules

  • The cheapest level that can catch the failure. A rule is checked without a model. Only judgment needs a model in the eval.
  • Ground truth, never a model's opinion of itself. Outcome evals read terminal states and effects in the world. A model grades text only where no ground truth exists, and that eval says so in its name.
  • Labels belong to people. Draft expected outcomes and expected events; ask the user to confirm them before they gate anything. Keep drafts in their own list, marked unconfirmed, and out of every gate.
  • Never edit the machine to make an eval pass. A failing eval is a finding. Report it.
  • Held-out scenarios stay held out. Evals may run on them; nobody tunes against them.

1. Read the machine

import { describeMachine } from "@statelyai/agent";
console.log(describeMachine(machine)); // goal, states, transitions, events

List:

  • the decision states: an agent.decide invoke, a decision tag, or a state a host answers with decideNext. A machine whose model choice is the output of a text request (a tool call it then checks) has no decision states: eval that choice at the request level with runSeam;
  • the person's steps: idle states a person answers (meta.interaction, the runner's onIdle). What the person decides is ground truth, not something to eval; the routing after their answer is a rule;
  • the guards. describeMachine shows where a transition function can go and marks it (conditional); describeMachine(machine, { source: true }) also prints each function, so its guard logic is in the same read;
  • the sentinel states and the final states.

No model decisions. When the machine has no decision states and its model only picks tools inside one text request (a scheduler, a tool runner), eval two levels: rule evals for every guard, cap, and approval rule (an "always allow" rule on both sides of its pattern; the barrier before execute; cancel), and stats from traces (foldTraces per state, approve/reject counts per tool). Skip decision evals. Add request evals only if a person can label which tool calls were right. The objective is rule violations (0) plus the per-state failure and cost numbers improve-machine reads.

2. Map the request to states

Turn the user's words into states. "Evals for the approval logic" means every state and guard that touches approval: the guard that routes a refund over the threshold, the approval step and each answer to it, the sentinel check before the payment, and the final states they lead to. Write the mapping down:

Asked about States and guards
approval deciding (REFUND: over threshold → awaitingApproval), awaitingApproval (APPROVE, REJECT), paying (sentinel check), issued, closed

If the request names nothing ("write evals"), cover every decision state, every sentinel, and the run as a whole.

3. Pick the level

Level Catches Runs a model Tools
Rule A guard, an ordering, an invariant that must hold No Exported guard functions, canReach, explorePaths, simulateAgent
Decision A wrong choice at one decision state The decider under test The decider called on recorded or written decision requests
Request A bad text output from one request That request runSeam, scored on seamOutput and the path after it. Not applicable when the machine has no text requests; say so
Outcome A wrong end result for a whole scenario The whole agent Scenarios, the runner, an objective over terminal states and effects
Stats Which state the failures cluster in No (reads traces) foldTraces

A guard or ordering is a

Полный SKILL.md на GitHub

Установить add-evals в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл add-evals?

Write evals for a @statelyai/agent or XState agent machine at the right level — rule checks with no model, decision evals at one decision state, outcome evals over whole runs, and per-state stats from traces — each tied to the states it covers. Use when asked to "write evals", "add evals for the approval logic", "test the agent", "measure the agent", "build an eval suite", or "what should I eval" for an agent built as a state machine.

Как установить скилл add-evals?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл add-evals запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить add-evals с