Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By erikdarlingdatav1.0.0MITIn 1 marketplace
Write and run regression tests for hooks, command wrappers and instruction files, with deterministic cases and model cases graded by regex. Saves results and lists what changed between runs. Model cases call claude -p and cost usage.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
1 marketplace, most starred first
evals, regression-testing, hook-testing, model-evals, test-runner, prompt-testing, hooks, claude-code ·
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
A ready runner for the two kinds of evals an agent setup needs, plus a skill that teaches Claude how to write good cases. It comes from Erik Darling's AI for Database Teams courses. Nothing in it is specific to databases.
/plugin install agent-evals@erikdarling
The two kinds:
claude -p a question, several times, and grade the answers with
regular expressions. They are statistics and cost usage. They tell you what the model does
with your instructions and tools.The skill is model-invoked. Ask Claude for tests for a hook, a wrapper or an instructions file, or say you fixed a bug and need a regression case. It covers what makes a case good (a real miss, a fixed answer written before the run, cheap, both directions, "by design" for limits you chose), one case per bug in the same pull request, when to rerun (a change of model, tool, instructions or server, one at a time), why a model case needs several runs and a grader you read, and what an eval cannot tell you.
scripts/run_evals.py takes a JSON case file. Python 3.8 or later, standard library only.
python scripts/run_evals.py examples/sample-cases.json
python scripts/run_evals.py cases.json --only deny-drop-table,allow-select
python scripts/run_evals.py cases.json --models --model sonnet --save results/sonnet.json
python scripts/run_evals.py cases.json --models --model sonnet --compare results/sonnet.json
| Option | What it does |
|---|---|
--only IDS | Run only these case ids (comma-separated). |
--count | Print how many claude -p calls --models would make (with --only applied), and exit 0 without calling anything. Run it before --models. |
--models | Also run the model cases. The script first prints how many claude -p calls it will make. |
--model ALIAS | The model for model cases, such as sonnet or opus. The default is whatever claude uses. |
--claude-bin PATH | The claude CLI to run. A .py file runs under the current Python (the tests use a fake this way). |
--save FILE | Write the results, with the date, the model, the models that answered, the claude CLI version, and every saved answer. |
--compare FILE | List the cases whose result changed since a --save file, new and removed cases, cases that were edited (EDITED), and any change in model or CLI version. |
Exit code 0 means every case that ran passed. 1 means at least one failed. 2 means the run
could not start (a bad case file, an unknown id, no claude CLI for --models).
Read a case file from someone else before you run it. Hook and command cases run the commands written in the file, with your permissions.
A JSON list of cases, or {"cases": [...]}. See examples/sample-cases.json, which has hook,
command and model cases and needs no database. Every case has:
| Field | |
|---|---|
id | Required. Unique, no commas. |
kind | Required. hook, command or model. |
note | Optional. Why the case exists. Shown when the case fails. |
by_design | Optional. A reason. Marks a case that records a limit you chose not to fix. |
A field the case kind does not know is refused, because a mistyped must_match would
otherwise grade nothing. A path in a case is relative to the case file's folder. {python}
in a command stands for the Python that runs the script, so a file works on a machine that
only has python3. timeout (seconds) is optional on every kind.
hook| Field | |
|---|---|
command | The hook command, run through the shell. |
payload | A string (sent as a Bash tool call with that command) or a JSON object (sent as it is). |
expect | allow or deny. |
reason_contains | A word the reason must contain, case-insensitive. Required on a deny case (the file is refused without it), optional on allow. |
tool, cwd | Optional. The tool name for a string payload (default Bash), and the folder to run in. |
The payload goes to the hook on stdin as JSON, the way Claude Code sends it, and the decision is read the way Claude Code reads a PreToolUse hook:
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub erikdarlingdata/claude-plugins --plugin agent-evalsPlugins from other owners that cover similar ground