claude plugin eval is the Claude Code command that tests a plugin, or a skill packaged as one, against a suite of eval cases you write ahead of time. Each case is a prompt plus one or more graders. The command runs every case several times in fresh, isolated claude -p sessions with only your plugin loaded, and scores each run between 0 and 1. It showed up in the changelog in v2.1.269. Its companion /skill-doctor, which shows what your skills cost in context, arrived in v2.1.261.
The official docs cover the command on their āTest plugins with evalsā page, and /skill-doctor on the skills page. What follows comes from those two pages and claude plugin eval --help (v2.1.299).
Why would you test a skill?
A skill fails quietly. Claude decides whether to call it by reading its description. If it doesnāt match how people phrase the request, the skill never fires. Too broad, and it fires on requests it has no business handling. Without an eval suite, you only find out by reading transcripts by hand.
How do I structure an eval case?
Cases live in evals/ at the plugin root, one folder per case:
evals/
01-commit-message/
prompt.md
graders/
skill-fired.md
conventional-format.md
quality.md
prompt.md holds the prompt, with the case settings in its YAML frontmatter (runs, max_turns, timeout_seconds, allowed_tools and more). Every file in graders/ is one grader. Its filename becomes its name, type: is required, and the body is the rubric for an llm grader or the pattern for a regex one. claude plugin eval init builds a suite with you through an interview, and claude plugin eval init --bare <name> drops a blank template.
A complete case for a commit-msg skill that writes Conventional Commits messages, starting with prompt.md:
---
runs: 3
max_turns: 5
timeout_seconds: 120
allowed_tools: [Read, Glob, Grep, Skill]
---
I renamed getUser to fetchUser across the whole project. Write me the commit message.
graders/skill-fired.md:
---
type: tool_used
tool: Skill
input_match: '"skill"\s*:\s*"(?:[\w-]+:)?commit-msg"'
---
graders/conventional-format.md:
---
type: regex
flags: m
---
^refactor(\([\w-]+\))?: .+
graders/quality.md:
---
type: llm
---
The reply gives exactly one commit message. Its first line is under 72 characters, uses the imperative mood and mentions fetchUser.
Add at least one case where the skill should stay quiet (āExplain merge vs rebaseā), with a tool_used grader on Skill set to min: 0, max: 0 and arm: both.
What grader types are available?
| Type | What it checks |
|---|
regex | A pattern found, absent or counted (count:N) in the reply, the trace or a produced file |
tool_used | How many times a tool was called (min, max), filtered by input_match |
tool_order | That a before tool ran before an after tool |
file_exists | That a file matching a glob was created |
llm | A plain-language rubric, passed when the judge votes yes in 2 of 3 votes |
baseline | That the run does at least as well as a reference .jsonl trace |
Every grader takes a weight (default 1). The judge for llm and baseline graders defaults to Haiku; pass --judge-model sonnet for a nuanced rubric. On long outputs, a regex holds up better than a judge.
How do I run the suite?
From the plugin root:
claude plugin eval . --runs 1 --no-publish # cheap first pass
claude plugin eval . # 3 runs per case, with and without the plugin
claude plugin eval . --case "01-*" --judge-model sonnet
--threshold sets the minimum case score (1.0 by default), and the command exits 1 if any case lands below it. --json writes the full result and --max-cost-usd caps spending. A run only gets the read-only tools its allowed_tools lists (Read, Glob, Grep, Skill and so on). Bash, Write, Edit, WebFetch or WebSearch go through --allow-tools, and --disallow-tools (v2.1.299) keeps a built-in tool such as Agent out of the runs. In CI, add --trust-plugin to get past the first-run trust prompt.
How do I read the report and compare with and without the skill?
Whenever the command finds your plugin, it adds a no-plugin arm (--ablation with-without, the default): each case runs as many times without your plugin as with it. --ablation none keeps a single arm. The summary table shows WITH, W/OUT and Ī columns. A runās score is the weighted share of graders that passed, and a caseās score is the mean of its runs. Ī is the with-plugin score minus the without-plugin score: a positive number means your plugin raised the score.
tool_used graders on Skill with no explicit arm act as an indicator. They tell you whether the skill fired but stay out of the score, so both arms compare like for like. The full result lands in evals/results/<timestamp>/aggregate-result.json, next to a report.html, published privately to claude.ai when your account allows it.
If the plugin is loaded and Ī stays near zero while the tool_used grader on Skill fails, thatās usually a real finding: the skillās description doesnāt trigger on natural phrasing. Rewrite it and re-run the same suite.
What does /skill-doctor add?
/skill-doctor runs inside a session and opens the Stats tab of the plugin manager. For each skill you see the context cost of its one-line listing, which rides along on every turn, its tokens over the last 7 days, its invocation count, and when it was last used. It also flags never-invoked skills and plugins you havenāt used lately. To validate file structure, reach for claude plugin validate <path> instead.
I open it before writing a suite. When a skill eats context and never gets called, I either remove it or test its description.
When should you use it, and what are the limits?
It pays off before you publish a plugin and after any change to a skillās description, CI included. For a personal skill you use twice a month, reading a transcript is enough.
- The plugin and its suite run on your machine, as you. Shell commands you grant run in the OS-level sandbox, but the pluginās own hooks and any real MCP servers you start run outside it and can reach any host, so only evaluate plugins you trust.
- Cost adds up fast: cases Ć runs Ć 2 arms, plus 3 judge calls per
llm or baseline grader on every run. Start with --runs 1.
- If git is installed, you need git 2.31 or later (v2.1.283). The message ā
plugin eval is currently unavailableā means Anthropic switched the feature off server-side.
Going further
Writing a SKILL.md and installing a plugin are covered in module 4 of the course. Section 4.11 shows how to package your own tools as a plugin, and section 6.11 of module 6 how to write your own MCP server.