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★ 86 звёзд на GitHubОб этом скилле
Add evals to an agent machine
Targets
@statelyai/agent2.0 alpha, as on thenextbranch. APIs change between alphas: when a call here does not match the installed package, checknode_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.decideinvoke, adecisiontag, or a state a host answers withdecideNext. 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 withrunSeam; - the person's steps: idle states a person answers (
meta.interaction, the runner'sonIdle). What the person decides is ground truth, not something to eval; the routing after their answer is a rule; - the guards.
describeMachineshows 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
Установить 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), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic