New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Skill evaluation plugin that tests behavior, grades results against assertions, and tracks quality over time.

version
1.21.1
GitHub stars
60
View on GitHub

What it does

  • Adds /evaluate:skill, /evaluate:plugin-batch, /evaluate:report, and /evaluate:improve commands, plus legibility, matrix, and context-engineering audits
  • Covers behavioral eval cases with --baseline comparisons, --runs repetition, and trigger recall and precision scoring via --triggers-only
  • Enforces an abstention control on every evals.json, so fabricated answers to impossible tasks fail
  • Designed for skill authors who need to check whether a skill actually works before a plugin release

Skill evaluation and benchmarking - test skill effectiveness with behavioral eval cases, grade results, and track quality improvements

Add marketplace

/plugin marketplace add laurigates/claude-plugins

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install evaluate-plugin@laurigates-claude-plugins

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

/evaluate:context-engineering

Audit a plugin, a single skill, or the always-loaded surface against the six context-engineering shifts Anthropic named for Claude 5 generation models, and report a C1–C6 card.

Two channels, deliberately kept apart:

ChannelWhat it isCost
M — mechanicalcheck-context-engineering.py, deterministic proxies over the treefree
J — judgmentan isolated agent scoring the frozen 1–5 rubric with quoted evidenceone subagent, --judge only

Channel M ranks candidates; it cannot tell a load-bearing safety constraint from a restatement of a model default. Channel J makes that call. Never blend the two into one score — a mechanical proxy and a judgment answer different questions, and averaging them hides which one is driving a recommendation.

When to Use This Skill

Use this skill when...Use alternative when...
Auditing whether a skill or rule is written for the old context rulesChecking structure/frontmatter/size lint → scripts/plugin-compliance-check.sh
A new Claude model shipped and the corpus needs re-readingMeasuring whether a skill still works → /evaluate:matrix
Deciding what to cut from CLAUDE.md and .claude/rules/Actually migrating rules into skills → agent-patterns-plugin:meta-context-diet
You want ranked, evidence-backed cut candidatesChecking a skill reads clearly to a fresh agent → /evaluate:legibility

The six dimensions

DimShiftWhat the scanner measures
C1rules → judgmentConstraint markers per 1k chars, and how many sit next to a safety/irreversibility word
C2examples → interface designFenced-block share of the body; whether args enumerates its alternatives
C3upfront → progressive disclosureBody size vs supporting files; disclosure levels (body → references → scripts)
C4repetition → single source of truth8-word shingle overlap between skills, rules, and CLAUDE.md
C5(the >80% claim)Always-loaded chars: CLAUDE.md + rules with no paths: scope; plus a per-rule size ceiling that applies to every rule, scoped or not
C6simple specs → rich referencesMulti-line shell blocks with no bundled script

Context

  • Repo root: !git rev-parse --show-toplevel
  • Plugins present: !find . -maxdepth 2 -name plugin.json -path '*/.claude-plugin/*'
  • Always-loaded rules: !find . -maxdepth 3 -path '*/.claude/rules/*.md'

Parameters

Parse $ARGUMENTS:

ParameterDefaultDescription
pluginwhole repoScope to one plugin directory, e.g. git-plugin
plugin/skill—Scope to one skill, e.g. git-plugin/skills/git-commit
--always-loadedoffScore only CLAUDE.md and the unscoped rules
--judgeoffAlso run Channel J on the target (one subagent per unit, max 3 units)
--budget N100000Always-loaded char budget for the C5 ratchet

Execution

Execute this audit:

Step 1: Run Channel M

python3 "${CLAUDE_SKILL_DIR}/scripts/check-context-engineering.py" --top 10

Add --target <plugin-or-skill-path> when the user scoped the run, and --always-loaded-budget <N> when they passed --budget.

When the user asks about the cost of a session that loads several repos (a portfolio checkout, sibling repos open together), add one --also <repo> per extra root plus --portfolio-budget <N>. Only the C5 surface is summed; C1–C4 and C6 stay scoped to --project-dir, since they measure authoring quality inside one marketplace. --also and --target are mutually exclusive.

Read the KEY=VALUE block. STATUS=ERROR means one of two things: an always-loaded surface is over budget — the primary repo's, or the portfolio's (C5_PORTFOLIO_*, with a per-repo C5_PORTFOLIO_BREAKDOWN) — or a single rule is over the per-rule ceiling (TYPE=rule_over_size_ceiling, C5_RULES_OVER_CEILING, --rule-size-ceiling, default 50000). The ceiling exists because the budget sums unscoped rules only, while a path-scoped rule still loads whole into every agent that touches a matching path; a 513 KB scoped rule once pushed a haiku subagent past its window unseen (#2667). ERRORs are always listed first, so --max-issues never hides the reason. Every other finding is a WARN candidate, not a verdict.

Step 2: Report the C1–C6 card

Render one row per dimension: the measured value, the count of flagged units, and the top offender. State the totals for C5_ALWAYS_LOADED_EST_TOKENS and SKILL_BODY_EST_TOKENS separately — they have different cost models and must not be summed.

Rank findings by always-loaded cost × frequency, never by raw size. An always-loaded rule costs on every turn; a skill body costs only when the skill fires; a references/ file or script costs only when read or run. A large skill body is a smaller problem than a medium-sized unscoped rule.

Step 3: Judge the top units (--judge only)

For at most 3 flagged units, spawn one isolated subagent each:

Task subagent_type: general-purpose
prompt: Read the frozen rubric at docs/benchmarks/2026-07-context-engineering/rubric.md
        and score <unit path> on C1-C6. Every score of 1, 2, 4 or 5 needs a
        verbatim quote from the unit, copied exactly. If you cannot quote for a
        score, score 3. Do not read the scanner's metrics.json.

Withhold Channel M's numbers from the judge — showing them anchors the judgment to the proxy the rubric is supposed to check independently. Run judges synchronously: the critique is the returned tool result (agent-patterns-plugin:cold-read-gate).

Step 4: Propose cuts, and one thing to keep

For each recommendation give: the unit, the dimension, the token cost, the proposed change, and whether the evidence is proven (a judged quote) or proxy-only (Channel M alone).

Include at least one unit that earns its tokens and should not be cut. A report with no counter-finding has an agreement bias, not a clean corpus — the scanner flags constraint density, and some of the densest text is the safety-critical text that should stay.

Step 5: Hand off, do not apply

Migrating rules into skills is agent-patterns-plugin:meta-context-diet's job — it carries the per-candidate confirmation gate for lossy edits to always-loaded files. This skill measures and recommends; it does not rewrite.

Agentic Optimizations

ContextCommand
Whole-repo cardpython3 "${CLAUDE_SKILL_DIR}/scripts/check-context-engineering.py"
One plugin... --target git-plugin
Machine-readable... --json
CI ratchet (exit 1 over budget)... --strict
Portfolio budget across repos... --also ../dotfiles --also ../repos-claude-config --portfolio-budget 155000
Full issue list... --max-issues 0
Determinism check... --json | sha256sum (must be stable across runs)

Related

  • docs/benchmarks/2026-07-context-engineering/rubric.md — the frozen 1–5 anchors Channel J scores against
  • .claude/rules/context-engineering.md — the standing house position and what it supersedes
  • .claude/rules/skill-evaluation.md — the tiered cost model; ablation is the follow-up that turns a judgment into a measurement
  • agent-patterns-plugin:meta-context-diet — migrates approved always-loaded candidates into skills

Readme

evaluate-plugin

Skill evaluation and benchmarking plugin. Tests skill effectiveness through behavioral eval cases, grades results against assertions, and tracks quality improvements over time.

Flow

See docs/flow.md for a diagram of how the skills and agents fit together.

What It Does

Static compliance checks (plugin-compliance-check.sh) verify structure — this plugin tests behavior: does a skill actually produce correct results when invoked?

DimensionExisting ToolThis Plugin
Structureplugin-compliance-check.sh—
Safetylint-context-commands.sh—
Freshnessblueprint-health-check.sh—
Behavior—/evaluate:skill
Improvement—/evaluate:improve

Skills

SkillDescription
/evaluate:skillEvaluate a single skill with test cases and grading
/evaluate:plugin-batchBatch evaluate all skills in a plugin
/evaluate:reportView evaluation results and benchmark reports
/evaluate:improveSuggest improvements based on eval results
/evaluate:legibilityCold-read a SKILL.md with a zero-context agent reader to check its intent is legible (comprehension gate)
/evaluate:matrixRun a skill's evals across pinned models with real execution and grade the artifact (executability gate)
/evaluate:context-engineeringAudit skills and always-loaded rules against the six Claude 5 context-engineering shifts (C1–C6)

Agents

AgentModelDescription
eval-graderopusGrade eval runs against assertions with cited evidence
eval-analyzeropusAnalyze patterns across eval results and suggest improvements
eval-comparatoropusBlind comparison of with-skill vs baseline outputs

Usage

Evaluate a skill

/evaluate:skill git-plugin/git-commit
/evaluate:skill git-plugin/git-commit --create-evals
/evaluate:skill git-plugin/git-commit --runs 3 --baseline
/evaluate:skill git-plugin/git-commit --harness headless --baseline
/evaluate:skill git-plugin/git-commit --triggers-only

--harness headless (opt-in; subagent stays the default) rolls each cell out as a real claude -p child with the plugin loaded, instead of an in-session subagent with the SKILL.md pasted in — so plugin loading, description routing, allowed-tools and hooks are exercised, and the run yields a trace.json and a workspace snapshot for trace and workspace checks. --triggers / --triggers-only run the evals.json triggers block: prompts that should and should not invoke the skill, scored as recall / precision / false-positive rate. Both need claude, jq and python3; see Headless harness.

--create-evals always generates an abstention control: an impossible task whose passing answer is a refusal, marked "expected_outcome": "abstain", with an absent_regex that fails a fabricated answer. Every evals.json must carry one (scripts/check-evals-abstention.sh); see references/schemas.md.

Batch evaluate a plugin

/evaluate:plugin-batch git-plugin
/evaluate:plugin-batch git-plugin --create-missing-evals
/evaluate:plugin-batch git-plugin --harness headless

View results

/evaluate:report git-plugin/git-commit --latest
/evaluate:report git-plugin --history

Get improvement suggestions

/evaluate:improve git-plugin/git-commit
/evaluate:improve git-plugin/git-commit --apply
/evaluate:improve git-plugin/git-commit --apply --best-of 3

With --best-of N, the skill drafts N alternative revisions instead of one, ranks them by re-running the skill's evals against each candidate (deterministic grading via grade_deterministic.py; eval-comparator blind pairwise as tie-break or as the fallback when no evals.json exists), and applies the winner. The ranking is recorded in history.json.

Data Layout

<plugin-name>/skills/<skill-name>/
├── SKILL.md
├── evals.json              # Committed: test case definitions
└── eval-results/           # Gitignored: aggregated outputs
    ├── benchmark.json
    ├── history.json
    ├── model-matrix.json
    └── candidates/         # --best-of candidate revisions
        └── candidate-<i>.md

tmp/eval-runs/<plugin-name>/<skill-name>/   # Gitignored: per-run staging
└── runs/                   # baseline/ for --baseline runs
    └── <eval-id>-run-<N>/
        ├── manifest.json
        ├── grading.json
        ├── comparison.json
        ├── transcript.md
        ├── timing.json
        │   # headless harness only:
        ├── transcript.jsonl    # raw stream-json from the claude -p child
        ├── trace.json          # harness-neutral trace (parse_trace.py)
        ├── workspace/          # snapshot of the child's workdir
        └── rollout-meta.json   # flags as run; prompt as sha256 only
  • evals.json is version-controlled (test definitions)
  • eval-results/ is gitignored (transient aggregated data)
  • Run directories are staged by scripts/prepare_run.sh under the repo's tmp/eval-runs/ (override with EVAL_RUNS_ROOT), deliberately outside skills/: path-scoped rules on **/skills/** would otherwise load into every eval subagent that writes its transcript (#2667)

Scripts

ScriptPurpose
scripts/aggregate_benchmark.shAggregate benchmark results across a plugin's skills
scripts/eval_report.shGenerate formatted markdown report from benchmark data
scripts/inspect_eval.shList a plugin's skills and eval suites (--plugin-dir <plugin>), or inspect one skill's suite (--plugin <p> --skill <s> [--print-evals], NUM_CASES counted from .evals)
scripts/prepare_run.shStage a run dir under tmp/eval-runs/ (outside skills/, #2667) and print RUN_DIR= / MANIFEST= / STARTED_AT=
scripts/grade_deterministic.pyGrade typed checks with zero judge tokens — output (regex/substring), trace (--trace: skill_triggered, tool_called, command_ran) and workspace (--workspace, --allow-exec: file/json/run_command) checks; trace/workspace checks without their input are HARNESS_DEFERRED, never judged; defers fuzzy ones to eval-grader
scripts/rollout_headless.shRun ONE rollout as a real claude -p child (--plugin-dir repeatable; omit for baseline) in a workdir outside the repo, with a scrubbed env (--env-mode clean), a spend cap (--max-budget-usd, required), the Skill-listing budget raised to 100000 chars (--skill-listing-budget <n>|cli), optional --tools and --stop-on-skill; writes transcript, trace.json, workspace snapshot and a === HEADLESS ROLLOUT === block
scripts/parse_trace.pyParse a stream-json transcript into the harness-neutral trace.json v1 (skills invoked, tool calls, bash commands, files written, denials, hooks, cost, stop reason)
scripts/run_trigger_evals.pyRun an evals.json triggers block through headless rollouts and score recall / precision / FPR into triggers.json; --dry-run prints the plan and worst-case cost; per-prompt and total budget caps; --no-copy leaves <skill>/eval-results/triggers.json untouched
scripts/render_matrix_report.pyRender the cross-model delta report from a model-matrix.json (delta verdict, portability flag, executable_on_haiku executability flag, mixed-harness warning)
scripts/apply_fixture.shApply/tear down an eval's opt-in fixture block in an isolated temp workdir so context-needing skills can honestly execute
scripts/check_golden_set_evals.pyValidate every golden-set canary's evals.json (all 13 check types, the triggers block) and run recorded probes (scripts/tests/fixtures/golden-set-probes.json, with trace_file / workspace_setup for trace and workspace checks) through the grader, so a suite counted toward evalCoverageFloor is shown to grade
scripts/model-compare/Compare models on the same work: two synthetic task sets with hidden graders (basic/, hard/, each with a validate.sh that proves its graders), run_cell.sh for lean headless cells, run_issue.sh for real issues in per-model worktrees, and a blind-review prompt; see its README
skills/evaluate-context-engineering/scripts/check-context-engineering.pyChannel M scanner — deterministic C1–C6 proxies over the tree (scripts/check-context-engineering.py at the repo root is a shim onto it)

Hooks

Both run on SessionStart.

HookPurpose
hooks/evaluate-drift-probe.shReports skills edited after their last eval-results/ run (drift nudge pointing at /evaluate:report)
hooks/sync-evaluate-skill-workflow.shCopies the bundled evaluate-skill workflow template to ~/.claude/workflows/evaluate-skill.workflow.js when the copy is missing or differs, so evaluate-plugin-batch can resolve it by name. Silent and fail-open; a changed copy takes effect from the next session. See docs/dynamic-workflow-registration.md

Context Engineering

/evaluate:context-engineering measures the corpus against Anthropic's new context-engineering rules for Claude 5 generation models: rules→judgment, examples→interface design, upfront→progressive disclosure, repetition→single source of truth, always-loaded budget, and specs→rich references.

It runs the same two-channel design as the marketplace benchmark — a free deterministic scan (Channel M) and an anchored blind rubric (Channel J) — which are reported separately and never blended. The frozen rubric and the 2026-07 findings live in docs/benchmarks/2026-07-context-engineering/.

Cross-Model Evaluation

Measuring skill effectiveness reproducibly across opus / sonnet / haiku — to catch when a skill needs adjusting after a new model ships — is designed in docs/cross-model-evaluation.md and driven by /evaluate:matrix (the executability gate). The token-frugal grader and report format run against git-plugin/skills/git-commit/evals.json today.

Live smoke for the headless harness (real claude -p calls on haiku, asserted ≤ $1.50; never run by CI because it lacks the test- prefix): EVAL_LIVE=1 bash evaluate-plugin/scripts/tests/live/smoke-headless.sh. It asserts the plumbing. Routing is reported as STATUS=WARN (WITH_SKILL_ROUTED=false, trigger thresholds missed), not as a failure; haiku at n=1 did not route to git-commit on 2026-10-05.

To compare models rather than skills (which model to delegate a piece of work to, at what cost), use scripts/model-compare/. The 2026-10 run on Haiku, Sonnet and Opus 5.5 is written up in docs/benchmarks/2026-10-model-comparison/.

The two weak-model gates are complementary: /evaluate:legibility reads a SKILL.md cold (comprehension), while /evaluate:matrix runs it on a weak model with real tool execution and grades the artifact (executability).

Details

Marketplace
laurigates/claude-plugins
Source
evaluate-plugin
Author
Lauri Gates
Category
Quality
License
MIT
Keywords
evaluation, benchmarking, skill-quality, testing, grading
Listed since
Apr 7, 2026

More from laurigates/claude-plugins

All 52

Similar to evaluate-plugin

More Skill & Plugin Building