/evals:validate [eval-dir]from evals
Statically validates a Claude plugin eval suite (prompt.md, case.yaml, graders/*.md) offline before spending money. Reports load FAILs, authoring WARNs, and checks deterministic graders against sample answers.
Ships in evals. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
A case that fails to load costs the same as one that works. scripts/validate-cases.py reads the
suite off disk and reports what would break, with no model call and no network access.
python3 "${CLAUDE_PLUGIN_ROOT}/skills/validate/scripts/validate-cases.py" <eval-dir>
<eval-dir> is the directory holding the cases, evals/ under the plugin root by default. Add
--json for the findings as an array of {level, case, file, message} objects; --help prints
the full contract from the script's header.
| Exit | Meaning |
|---|---|
| 0 | no FAIL finding. WARN findings are printed and do not gate |
| 1 | at least one FAIL finding |
| 2 | usage error, or the eval dir is missing or unreadable |
Findings print one per line as <FAIL|WARN> <case>/<file>: <message>, sorted by case then file; a
finding about the suite as a whole carries the eval dir in place of <case>/<file>.
FAIL is what the binary itself rejects: an unknown prompt.md frontmatter key, a grader with no
usable type, an unknown option for the declared grader type, a case with no grader, two graders
sharing a name, a non-positive weight, runs / max_turns / timeout_seconds out of bounds, an
env key that does not match EVAL_[A-Z0-9_]*, a case that has a case.yaml but no
schema_version or name in it or in prompt.md frontmatter (without a case.yaml the binary
supplies both), a case with no prompt (prompt.md body or execution.prompt), a grader missing an
option its type requires, a grader or prompt.md whose frontmatter holds --- on a line other
than its two delimiter lines (the binary cannot load the file; spell it -{3} in a regex), a
plugins entry that resolves outside the plugin under evaluation, inside the eval directory to
anything but a subdirectory of the case, or to a directory other than the plugin itself that
contains the case (see the containment record below), a regex match other than contains,
not_contains or count:N, and a
schema_version that is not a quoted version string or whose major is newer than the binary
supports. The complete sets the script checks, so a question about a key or a type is answered
here without opening the script:
prompt.md frontmatter keys: schema_version, name, description, tags, plugins,
runs, expected_outcome, model, max_turns, timeout_seconds, allowed_tools,
append_system_prompt, env. A time limit is timeout_seconds; timeout is an unknown key, so
the case fails to load.type: regex, tool_order, tool_used, file_exists, llm, baseline. Any other
value, such as contains or string_match, is no usable type, so the case fails to load. A
substring or pattern check is type: regex with the text in pattern.type, weight, arm and name every grader takes: regex
pattern, flags, match, target; tool_used tool, input_match, min, max;
tool_order before, after; file_exists path, exists; llm criteria, focus;
baseline baseline_file, criteria.regex pattern; tool_used tool; tool_order before,
after; file_exists path; llm criteria; baseline baseline_file, criteria. A
graders/*.md body stands in for pattern (regex) or criteria (llm, baseline).target and llm focus values: last_message, trace, files, mock_calls, or
{ source: file, path: <path> }. Any other value, such as focus: reply, fails to load.runs 1 to 50, max_turns 1 to 200, timeout_seconds 1 to 3600.The script's constants are the one place to correct when the schema moves, under the drift record its header carries; this list follows them.
The history-file check is this skill's own FAIL, not a load rejection: a multi-record
context.history_file whose records do not form one uuid/parentUuid chain is a FAIL, and so
is a record that is not JSON. Chain the records: a uuid on each, parentUuid: null on the first
and the previous record's uuid on each later one. A record that is not a user, assistant or
system message and carries no uuid (a summary or file-history-snapshot line) is off the
chain and skipped. Why the chain matters is in the script's history-file drift record.
Four more FAILs are this skill's own stale-reference checks, so a rename cannot leave a case testing a skill or agent that no longer exists:
/<plugin>:<skill> resolves to no plugins/<plugin>/skills/<skill>/SKILL.md;context.scaffold_script, context.history_file or context.add_dirs entry that names nothing
in the case directory;tool_used grader on tool: Skill whose input_match names, as a literal token, a
<plugin>:<skill> with no SKILL.md, or on tool: Agent a <plugin>:<agent> with no
plugins/<plugin>/agents/<agent>.md (a /<plugin>:<skill> token there is checked as a skill).
Character classes, lookarounds and tokens joined to another regex part are skipped; a token the
pattern leaves open on the right (at the end, or before | or )) matches as a substring, so a
prefix of a real name passes;<plugin>:<skill> form that names no skill.The name checks resolve plugins/ as the nearest directory named plugins above the suite, and
are off for a suite with none. The path check always runs.
WARN is an authoring mistake the suite loads with and then scores badly on: target: files
(which reads the list of paths created, not their contents), an inline (?i) the grader's regex
engine does not honor, a case whose graders are all judges (the two paid types, with no
deterministic grader beside them), a tool in allowed_tools that the operator must grant with
--allow-tools, a case naming a skill (leading /<plugin>:<skill> or a tag) whose SKILL.md has a
pre-computed context line while allowed_tools lacks Bash, file_exists in a case that requests no write tool (so nothing it could match is
ever created), and a prompt.md key the binary loads but the reference page does not list, which
can change without notice (the script's UNDOCUMENTED_PROMPT_KEYS, under its own drift record).
The judge-only rule is this skill's own pairing heuristic, not a rejection the binary makes; the
sample-answer findings below are likewise this skill's checks.
A WARN never sets exit 1, so a suite can ship with warnings on purpose. Read them once and decide.
A grader that rejects a correct paraphrase scores the plugin down for nothing, and no run says the grader was at fault. So each case can carry known answers, and the script runs the free graders over them before any money is spent.
Put them in samples/<grader-name>.json inside the case directory, beside graders/ and never in
it:
{
"pass": [{"answer": "...", "why": "the ranking rule with 'and' for the comma"}],
"fail": [{"answer": ""}, {"answer": "...", "why": "near miss: base-model phrasing"}]
}
answer is what the grader reads: text for a regex (the final reply on the default target), a
list of {"tool", "input"} calls for tool_used and tool_order, and a list of created paths for
file_exists. why is optional and is echoed in any finding. Give each grader several paraphrases
it must pass, near misses it must reject, an empty answer, and an answer to a different question.
| Finding | Level |
|---|---|
| A must-pass answer the grader rejects, or a must-fail answer it accepts | FAIL |
| A sample file that is not JSON in this shape, or an answer of the wrong kind for its grader | FAIL |
A regex, tool_used, tool_order or file_exists grader with no sample file | WARN |
| A sample file with no must-pass or no must-fail answers, or named after no grader | WARN |
A setting the script cannot reproduce offline, such as the y or v regex flag | WARN |
A pattern with Python-only syntax: \A, \Z, \z, a possessive quantifier, an atomic group, a (?P< group or (?P= reference, a (?# comment, a (?( conditional. The finding names the grader and the token | FAIL |
With node or bun on PATH: a pattern or input_match that does not compile under JavaScript, or a sample JavaScript's RegExp sorts the other way | FAIL |
With both on PATH: a sample whose verdict under node (V8) differs from its verdict under bun (JavaScriptCore) | FAIL |
An llm or baseline grader with samples: they need a paid judge calibration run | WARN |
The script FAILs the Python-only tokens listed above; that check needs nothing installed. When
node is on PATH it also grades each regex grader and each tool_used input_match, with their
samples, through RegExp. node runs V8, but claude plugin eval runs graders in JavaScriptCore,
because the CLI ships as a Bun executable, and the two engines can disagree: in one measured pass a
whole-reply negative lookahead matched under V8 and found no match under JavaScriptCore. When bun
is on PATH the script grades the same samples under it too, names the engine in each finding, and
FAILs any sample the two engines sort differently. With neither on PATH it skips that part
silently. A grader built from the shared matchers is checked by scripts/check-matchers.py, which
requires node and grades under node alone; the plugin README's shared grader matchers section
covers it.
The script never calls a judge. Samples on an llm grader are the labeled answers a calibration
run feeds the judge, and that run is the operator's to start.
prompt.md, case.yaml and graders/.
The sample check grades as the binary does, per its grader code read against the
grader types table; Python's re
stands in for the JavaScript regex engine, and the script's header lists where the two differ.
The CLI's engine rests on Bun joins Anthropic ("Claude
Code ships as a Bun executable") and the Bun runtime page ("Bun
uses the JavaScriptCore engine").The script reads a bounded YAML subset: scalars, quoted scalars, literal (|) and folded (>)
block scalars, flow lists and mappings, block lists including lists of mappings, and block mappings
three levels deep. An anchor, an alias, a tag, a malformed block scalar header, a merge key, tab
indentation, a nested sequence in either spelling, a backslash escape outside \\, \", \/,
\n, \t, \r, an unquoted value holding a colon followed by whitespace, or nesting past three
levels is reported as frontmatter not parsed (<construct>)
at FAIL, never waved through at exit 0, because a validator that green-lights input it could not
read is worse than no validator. Simplify the file, or run the CLI, which carries the full parser.
The load-time FAIL findings match what the binary rejects when it loads a case, so a suite at exit 0 loads.
claude plugin eval --case.The plugins check takes the plugin under evaluation as the nearest directory at or above the
suite with a plugin manifest, else the suite's parent. It passes a second plugin under that root
and outside the eval directory unless it contains the case's directory. It fails one inside the
eval directory that is not in a subdirectory of the case's own directory, such as a stub shared
between cases, and any entry other than the root that contains the case, such as the suite itself.
plugins field in
https://code.claude.com/docs/en/plugin-evals#prompt-md-fields; the CLI's load refusal
for a plugins entry outside its containment root, in the "Run the plugin eval" step log of
https://github.com/melodic-software/claude-code-plugins/actions/runs/41894661524; its refusal
of a stub shared between cases, in the Fix section of
https://github.com/melodic-software/claude-code-plugins/pull/13376; the loader evidence for
entries outside the eval directory, in the check_plugins docstring of
scripts/validate-cases.py.This skill asserts nothing about whether claude plugin eval is available in your install; it
reads files and never invokes anything. /evals:plugin-eval preflight owns that question.
This validator reads only the prompt.md / case.yaml / graders/*.md layout, the format
/evals:design writes for a skill. Pointed at a skill-creator JSON eval file, it reports only that
the directory holds no cases. Convert that file's cases to this layout (/evals:design skill <name>
writes them), then validate the case directories.
/evals:plugin-eval <target>. A suite at exit 0 is one worth paying to run.
prompt.md or case.yaml. A directory holding neither is skipped
silently, so a misnamed prompt file reads as absent rather than as an error. An eval dir with no
case at all is a FAIL.results/ and mocks/ are never treated as cases, whatever they contain.prompt.md frontmatter overrides the matching case.yaml field, and the
bounds check reports the file the effective value came from, which may not be the file you edited.case.yaml are not reported. The unknown-key rejection is recorded for
prompt.md, and this validator invents no rejection the binary does not make.scripts/check-matchers.py (opens in a new tab)scripts/check-matchers.test.sh (opens in a new tab)scripts/node_gate.py (opens in a new tab)scripts/test_check_matchers.py (opens in a new tab)scripts/test_validate_cases.py (opens in a new tab)scripts/validate-cases.py (opens in a new tab)scripts/validate-cases.test.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub melodic-software/claude-code-plugins --plugin evals5 skills in this plugin
/auditAudit an eval suiteRead-only advisory health report for a plugin eval suite (edits nothing; routes fix): skill with no case, triggering/no-fire/legacy case, uncalibrated judge/sample, gate pair, duplicate, grader fit, drift. Use when 'audit my evals', 'is my eval suite healthy', 'find duplicate eval cases'. Not for load: /evals:validate; runs: /evals:plugin-eval./designDesign an evaluation suiteDesign/write/scaffold an eval suite or test set for an LLM app, feature, prompt, or skill: interview for measurable criteria, write criteria doc and test cases into repo. Use when 'design evals', 'create an eval suite', 'scaffold evals'. Not for theory: /evals:methodology; checks: /evals:validate or skill-creator JSON; runs: /evals:plugin-eval./methodologyLLM evaluation methodologyWhen claude-api resolves in this session, prefer hillclimb for model/effort sweeps over an existing suite; this before suite/criteria exist. LLM-eval guidance: grading method/rubric, model-graded judge, golden answer, prompt quality, repo route. Load before answering on writing eval criterion/metric/target, 'how do I eval this', 'LLM eval', 'grading rubric'. Not for suites: /evals:design; runs: /evals:plugin-eval./plugin-evalRun a plugin eval suiteRun/read claude plugin eval: preflight, cost, validity verdict, noise-report, arm delta, aggregate-result.json, CI gate, headless claude -p, socat/bubblewrap, --allow-tools, worktree refusal, CLAUDE.md/rules. Load before answering: 'run my plugin evals', 'eval my skill', 'is this gain real'. Not for design: /evals:design; or skill-creator JSON.Other plugins' skills for the same job