/config-drift-checker:write-casefrom config-drift-checker
Author or fix an eval case (prompt.md, graders/*.md, case.yaml) for a Claude Code plugin, skill, or hook. Use when the user says 'write an eval for', 'add a test case', 'my grader is wrong', or 'how do I assert the hook fired'.
Ships in config-drift-checker. 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.
None: SKILL.md is the whole skill.
Layout: <plugin>/evals/<case-dir>/prompt.md, graders/<name>.md, optional case.yaml.
prompt.md frontmatter: name, description (one sentence a reviewer would read in the report:
what this case proves and which part of the setup it exercises), tags: [..], a covers.yaml sidecar next to prompt.md (the
rule ids this case exercises; node ${CLAUDE_PLUGIN_ROOT}/tools/config-coverage.mjs <plugin> --list
prints them; a negative-trigger case covers nothing, that is correct). Target ids the --list
output marks · (uncovered) before adding a second case for a ✓ one. Every new case should move
the coverage %, which the Action reports and can enforce with coverage-min. runs (3), max_turns,
timeout_seconds, allowed_tools: [Bash] (only what the case needs), model. Body = the user
prompt, written the way a real user would write it (do not mention the skill or hook by name).
graders/*.md frontmatter type:
regex: pattern, flags, match: contains|not_contains|count:N, targettool_used: tool, input_match, min, maxfile_exists: path (glob), existsllm: focus (never target: the official runner rejects it on llm graders); the file body is
the criteria (one paragraph; "score 1 only if all hold")weight, and arm: with-only or arm: both (the only two values the official
runner accepts)What target (regex) and focus (llm) can point at, exactly as claude plugin eval defines it:
last_message (default), trace, files (the list of paths Claude created, not their
contents), or { source: file, path: <path> } (the contents of one workspace file after the run).
To grade code, either ask the agent to print it ("Print the complete Java source in your reply")
and grade last_message, or grade the file it must write with { source: file, path: ... }.
Body = one sentence a reviewer would understand.
case.yaml (schema_version: "1.1", and name equal to the case's directory name so --case
globs match the folder under both runners): context.scaffold_script names a script file in the
case directory (scaffold.sh), never an inline script: it gives the agent a state to act on (a
git repo, a file, a branch). The official runner runs it with no EVAL_* variables, so a script
that needs the plugin's files locates itself:
ROOT="${EVAL_PLUGIN_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}".
context.add_dirs lists read-only fixture directories.
not_contains graders must match code position (^\s*@Autowired, flag m), never a
word that can appear in prose, because the model will say "I avoided X".tool_used: Skill, max: 0, arm: both) for every skill.git reset --hard HEAD, git clean -fd), not one it refuses on its own (git push --force origin main).
Assert three things: attempted (tool_used Bash), reported blocked (regex), not succeeded
(regex not_contains on success phrases like "HEAD is now at|ran successfully").tool_used: Skill graders are indicators under ablation, not score. That is correct; add
arm: both only when the assertion must hold without the plugin too.scaffold_script, not in the prompt.name\([^)]*\) to find a method; parameter annotations
contain parentheses. Anchor on something unique and flat (the mapping annotation string, the
record name) and use a bounded lazy window [\s\S]{0,900}?.node -e before
spending an agent run; a grader that fails a correct answer costs more trust than it saves.scaffold_script in .eval-bin/
(printf '#!/usr/bin/env bash\necho stub $*\n' > .eval-bin/docker-compose; chmod +x …).
The runner's safety net blocks compose down -v / prune / force-push / rm -rf outside the
workspace unless the binary is stubbed. Check for name:/container_name: in compose files
and for real remotes before writing the prompt.max_turns: 30 (read → edit 2–4 files → test); single-file
or prose cases 12; hook cases 6. Runs that hit the cap are scored as-is and flagged TRUNCATED;
a signal to raise the budget, not a failure of the setup.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
eval-cases, plugin-testing, claude-plugin-eval, graders, test-automation
npx claudepluginhub jameskomo/config-drift-checker --plugin config-drift-checker4 skills in this plugin
/repairAfter a red eval run, propose the smallest change to the agent setup (CLAUDE.md, a skill, a hook) that restores the drifted behaviour, verify it by re-running only the failing cases, and write a PR-ready summary. Use when the user says "fix the regression", "repair the setup", "make the eval green again", or when the config-drift-checker Action runs with repair: true. Do not use to run the suite or diagnose a red result (that is run), and never to edit eval cases or graders./runRun the agent-config eval suite locally and compare with the stored baseline; explain why a case went red. Use when the user says "run the evals", "run config-drift-checker", "did the Claude Code update break my setup", "why is the eval red", or "compare against baseline". Do not use to change the setup itself (that is repair) or to write new cases (that is write-case)./setupSet up regression testing (CI) for this repository's Claude Code configuration (plugin, skills, hooks, CLAUDE.md). Use when the user says "set up config-drift-checker", "add evals for my plugin/skills/hooks", "test my Claude Code setup", "make sure my hooks keep working after updates", or "wire the eval GitHub Action". Do NOT use for evaluating an LLM application or prompts; this is for agent configuration only.Other plugins' skills for the same job