config-drift-checker

User guide

Everything from install to reading a red report, and the tools that go further. What the tool is and how it compares with claude plugin eval is in the README; this page assumes you want it running. Claude Code is the first-class agent throughout; Codex and Gemini are in the FAQ.

How this guide is laid out

If you want to Read
get a repo protected 1. Install, 2. Set up a repo, 3. Wire CI
add the check to a pipeline you already have 4. Adding the check to an existing pipeline
tune pins, budgets and thresholds 5. .cdc.yml reference
know what runs on its own, and what a skipped release looks like 6. What happens from now on
act on a red check 7. Reading a report
find out whether your tests would catch a break 8. Test your tests
explain a change: which release, which model, what it costs, how to fix it 9. Investigate a change
run it across many repos 10. Fleet
publish your results, or read ours 11. The drift index
look up a command, a cost, a safety rule 12. Local commands, 13. Cost, 14. Safety

Live examples: our drift index · a real break, self-diagnosed · our suite, mutation-tested · the demo repo

1. Install (once per machine)

claude plugin marketplace add jameskomo/config-drift-checker
claude plugin install config-drift-checker@jameskomo

You now have four skills in Claude Code (/config-drift-checker:setup, :run, :write-case, :repair) and the runner tools inside the plugin. Nothing has touched any repo yet.

2. Set up a repo (about 10 minutes, mostly watching)

In the repo whose setup you want protected:

claude "/config-drift-checker:setup"

Claude will:

  1. Find your setup: CLAUDE.md, .claude/skills, hooks, or a plugin manifest. If .claude/ is gitignored it uses agent-config/ instead; if you have no agent config yet, it proposes one from your code and asks first.
  2. Write starter cases from your real content: a skill case (real-code where possible), a negative-trigger case, a hook case (stubbed so nothing real can be harmed). Each case lists the rules it covers in a covers.yaml, which is where the coverage number comes from.
  3. Smoke-run them and show every grader’s verdict, fixing graders that fail for the wrong reason.
  4. Write .cdc.yml (pins and budget, see the reference) and the GitHub workflow, and offer to set your secrets.

Review the diff like any PR. Commit.

Without entering Claude at all: node <plugin-root>/tools/cdc-bootstrap.mjs . runs the same setup headlessly from a plain terminal (state a spend cap with --budget, default 3). Add --no-agent for a $0 deterministic scaffold instead: a minimal manifest if you have none, a blank starter case (official claude plugin eval init --bare), .cdc.yml with the harness pinned to your installed Claude Code, and the workflow; you then write the case content yourself. Both modes are idempotent, never overwrite existing files, and end with the same hand-off checklist.

Or start from a ready-made setup: community suites are maintained setups with eval suites and a published with/without worth measurement; the first is Spring Boot conventions (claude plugin install komo-stack@jameskomo), where the guard hook measures +0.75 on its case. Adopt one and adapt the rules; the suite keeps measuring your adaptation.

Bring your skill-creator evals

If you built a skill with Anthropic’s skill-creator, its evals/evals.json can become your plugin-eval suite. Claude Code’s two eval formats don’t read each other’s cases; this converts:

node <plugin-root>/tools/evals-convert.mjs import skills/<skill>/evals/evals.json --dry-run   # see the plan
node <plugin-root>/tools/evals-convert.mjs import skills/<skill>/evals/evals.json             # write the cases
node <plugin-root>/tools/evals-convert.mjs export <plugin> --out evals.json                   # the other way

Each eval becomes a case directory. Its prompt becomes the case prompt, its expectations become judged (llm) graders, its input files are copied into the workspace by a scaffold script, and a check that your skill fired is added. skill-creator’s trigger sets become trigger and negative-trigger cases. Existing cases are never overwritten unless you pass --force, and the import prints the exact claude plugin eval command to run them. export writes an evals.json and lists every check skill-creator has no place for (regex, tool order and similar) instead of dropping them silently. The full mapping is in the format reference.

Turn real sessions into test cases

A suite written from guesses tests prompts nobody types. case-miner reads your local Claude Code sessions and suggests cases from how you actually work:

node <plugin-root>/tools/case-miner.mjs <plugin> --since 90d --dry-run     # what it would pick, counts only
node <plugin-root>/tools/case-miner.mjs <plugin> --since 90d               # stage candidates for review
node <plugin-root>/tools/case-miner.mjs accept <id> [<id>...]              # move the ones you approve into evals/

For each skill it looks for three kinds of prompt: ones that fired the skill, ones that should have fired it (you then typed the slash command, named the skill, or corrected the agent within a few turns), and ones where it fired and you said it was wrong (negative-trigger candidates). Every prompt is anonymised on your machine first: paths, your user name, emails, tokens and keys, names and long pasted code are replaced, and each candidate says what was removed. Candidates are staged in <plugin>/.eval-candidates/ with a candidates.md explaining why each was picked; nothing enters evals/ until you accept it, and accepting never overwrites a case. The heuristics are plain keyword and phrase matching in English, so read each candidate before accepting it.

Plugins with MCP servers: test against mocks

A plugin that talks to a tracker, a database or any other MCP server can be tested without the real service. Put mocks in evals/mocks/<server>/<tool>.md (or a case’s own mocks/ folder) in the official claude plugin eval format: the body is the tool’s answer, and frontmatter can add expect: (the run fails if the agent sends something else), error: true, and substitutions like {{input.id}}. Both runners answer from the mocks and keep the plugin’s real servers down by default (--allow-real-servers lets unmocked ones start). Grade what the agent sent with target: mock_calls. The bundled runner supports fixed mocks; a case that needs a type: agent mock (the judge model playing the server) is marked “needs the official runner” instead of failing. suite-doctor checks mock files before any run, which matters because the official $0 load check does not validate them.

3. Wire CI (the parts only you can do)

One auth secret, either kind:

Two repo settings (Settings → Actions → General): workflow permissions Read and write (results are stored on an eval-results branch, PRs get comments), and Allow GitHub Actions to create and approve pull requests (for bump/pin/repair PRs; without it the branch is pushed and the job warns).

Optional: a SLACK_WEBHOOK_URL secret for regression alerts.

Then: Actions → config-drift-checker → Run workflow. The first run records your baseline and, if .cdc.yml has no pin yet, opens a pin PR with the exact model id and Claude Code version the baseline was measured on.

4. Adding the check to an existing pipeline (no Claude Code needed)

Already have a suite, or a teammate ran setup? The CI half is one step:

# .github/workflows/config-drift-checker.yml: pinned track on push/PR, on demand otherwise
on:
  push: { branches: [main], paths: ['CLAUDE.md', '.claude/**', 'agent-config/**'] }
  pull_request: { paths: ['CLAUDE.md', '.claude/**', 'agent-config/**'] }
  workflow_dispatch:
    inputs:
      track: { description: 'pinned | canary', default: 'pinned' }
      force: { description: 'skip the budget and interval gates', type: boolean, default: false }
permissions: { contents: write, pull-requests: write }
jobs:
  eval:
    runs-on: ubuntu-latest
    env: { ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} }   # your key; runs bill to you
    steps:
      - uses: actions/checkout@v7
      - uses: jameskomo/config-drift-checker/action@v1             # ← the whole check
        with:
          plugin-dir: .                        # where .claude-plugin/plugin.json lives
          track: ${{ inputs.track || 'pinned' }}
          force: ${{ inputs.force || 'false' }}
          slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}   # optional

That step reads .cdc.yml, checks the budget gate, installs the pinned Claude Code, runs the suite, diffs against your baseline (score and turns/cost/time), stores results, comments on the PR, uploads the eval-report artifact, opens a pin/bump PR when due, posts to Slack on regression, and sets the check.

Add the canary (latest model and Claude Code, on a schedule, only when something shipped) with the watch job from the full template at ci/config-drift-checker.yml in the plugin; that is what setup writes. The canary never fails your PR check.

Gate merges on it: branch protection → Require status checks to pass → add eval.

Useful inputs:

Input What it does
runs: 1, model: haiku cheap PR smoke
ablation: with-without measure what each skill is worth (run once, not in every CI run)
promote-baseline: true after an intentional setup change
repair: true on red, the agent proposes a fix PR (spends credit, budget-capped). A real repair, verified
open-prs: false no bump/pin PRs
claude-code-version: 2.1.258 override the pin for this run
coverage-min: 80 fail when under 80% of your rules have a case (empty = report only)
report-base-url: https://<you>.github.io/<repo>/history case names in the PR comment deep-link into that run’s HTML report (needs Pages serving the results branch)
preflight: fail stop before any model run when the skill linter or suite doctor finds an error (default warn reports only)
pr-impact: true on pull requests, one comment (kept up to date) with what the PR changes in the agent setup: tokens added to every session, rules changed, the cases that test them, and changed rules no case tests. On by default; no model calls
pr-select: true on pull requests, run only the cases that cover the rules the PR changed. A selected run never becomes the baseline; the full suite runs when nothing is selected
disallow-tools: Agent TaskStop tools Claude may not use in any case (Claude Code 2.1.299 and later); cases can also set disallowed_tools: themselves
concurrency: 3 run up to three agent runs at once (1 to 8). They share one rate limit, so this saves wall-clock time, not money; results keep case order

Which path is for me?

You are Do
a developer with Claude Code who wants the cases written for you §2 setup, then push
a platform team adding a stage to an existing pipeline this section: the step, the secret, the two repo settings
on GitLab / Buildkite / other CI run the tools directly: node <plugin-root>/tools/eval-shim.mjs <plugin> --track pinned --scaffold then eval-diff.mjs --config <plugin>; the Action is a thin wrapper around them

5. .cdc.yml reference

One file at the plugin root says what is pinned, what floats, and how much may be spent. node <plugin-root>/tools/cdc-config.mjs <plugin> init writes it with comments; setup does it for you.

track: pinned            # default track for a run; the Action passes --track explicitly
model:
  pinned: claude-sonnet-5   # exact model id the baseline is measured on (null = alias until the pin PR)
  canary: sonnet            # the alias your developers actually get; resolved at run time
harness:
  pinned: 2.1.258           # @anthropic-ai/claude-code version for the baseline (null = latest)
  canary: latest
judge_model: haiku
canary:
  runs: 1                   # one run per case, then…
  expand_on_deviation: 2    # …two more only if a grader failed (sequential testing)
  promote_after: 2          # consecutive green canaries before a bump PR is opened
  min_interval_hours: 72    # never canary more often than this on a schedule
thresholds:                 # relative change that counts as drift
  score: 0.15
  turns: 0.5
  cost: 0.5
  duration: 0.5
fail_on: [score]            # which drifts turn the check red; the rest are warnings
budget:
  per_run_usd: 2            # the runner stops starting agent runs past this
  per_month_usd: 10         # the Action refuses to start a run past this (ledger on eval-results)
noise:
  history_runs: 10          # past runs that set each case's noise band in the diff
baseline:
  min_runs: 3               # a run with fewer scored runs per case is refused as a baseline

Two tracks. Pinned: same model id, same Claude Code version, only your setup changes; that is the PR check and the baseline. Canary: the alias model on the latest Claude Code, what your developers get today. A canary regression is an alert, never a red PR check, and never touches the baseline. Every report stamps the resolved model and version, so a red row is always attributable to your change, the model, or the harness.

Bump and pin PRs. After promote_after consecutive green canaries on the same model and version, a PR proposes moving your pins there, runs attached as evidence. A pinned run with no pin declared gets a PR pinning what the baseline actually measured. Neither is ever auto-merged; close one and it proposes again after the next streak.

Budget. per_run_usd stops the runner mid-suite (what ran is kept; skipped cases show ❔, not red). per_month_usd is checked before a run starts, against the ledger on your results branch; a run past the cap is skipped with a notice, not failed. A manual run with force: true overrides both, because the person clicking is the budget.

Noise. One model refusal can swing a 3-run case by 0.33, well past a flat 0.15 threshold, so the diff learns each case’s noise band instead of guessing:

6. What happens from now on (automatic)

Results, spend ledger, canary streak and release-watch state all live on the eval-results branch: history without a database.

When the budget skips a run: the free floor

When the monthly budget or the canary interval skips a run, the Action still runs the free checks on the new Claude Code release: the skill linter, a suite load check with zero agent runs, and the context cost. It stores them as history/floor/<stamp>-cc<version>.json and the job summary says plainly what was not tested and why, for example “Behaviour not tested on 2.1.310 (monthly budget reached). Free checks ran: suite loads 6 of 6, context cost 109 tokens.” Until a behaviour run covers that release, the dashboard, verdicts.json, the feed and the badge show it as untested, never as green. The Action’s floor and untested-version outputs say the same. With preflight: fail, a skipped run goes red if the suite no longer loads on the new release. We added this after our own canary sat behind the budget for eleven releases while the check stayed green.

7. Reading a report

Every run produces the same report (job summary plus the eval-report artifact, or report.html locally). It opens with the verdict; the stamp says which model and Claude Code version ran, whether either moved since the baseline, and how many of the suite’s cases this run evaluated (cases not run, from a filter or a budget stop, are listed under the table so nothing is silently absent). A panel under the verdict counts every grader verdict and agent run and marks which checks come from this tool’s layer versus a plain claude plugin eval run; a second panel lists every skill discovered at run start and whether any case invoked it.

The report says Do this
No drift / baseline recorded Nothing. Glance at the stamp.
N case(s) regressed Open the red case(s) and classify each failing run:
↳ refused or asked before acting (1 turn, no tool calls) the case never reached your skill/hook. Rewrite the scenario so the model will attempt it
↳ skill or hook did not fire a real regression. The stamp says whether the model or Claude Code moved. Keep the pins, fix or adapt the setup (or /config-drift-checker:repair), tell the maintainers
↳ a note says discovered but never invoked the skill file is fine; its trigger description no longer matches. Fix the wording, not the packaging
↳ a note says not discovered: packaging the skill file itself is missing, renamed or malformed. Fix the packaging, not the wording
↳ grader wrong (matched prose, a negation) fix the grader, then --regrade the saved run; don’t re-spend the suite
↳ flaky (mixed verdicts across runs) raise runs for that case. Never loosen the threshold
efficiency drift (slower, pricier, longer) every case passes but median turns/cost/time moved. A warning by default; add to fail_on to make it red
⚠ noisy dropped past the threshold but inside the historical band, with at least one run still at baseline. A warning; more runs shrink the band
likely refusals note the model declined the task (guardrail change), your setup did not break. Read the transcript; consider rewording the prompt. A full answer without tools is the opposite: real drift
⚠ baseline quality (thin / unstable) the baseline has too few runs or varies; re-baseline with more runs. Never red
⚠ agent runs errored read the first error: it says whether Claude refused the token or key, or the account is out of credit, and what to do. Otherwise it is usually a Claude Code startup failure. Nothing was stored
a run shows max_turns (amber) cut short and scored as-is; raise that case’s max_turns (real-code cases need about 20)
skipped: budget / interval not a failure. Raise the cap, wait, or re-run with force

In one sentence: a green report asks nothing of you; a red one tells you which of four things happened (the model refused, the setup regressed, the grader was wrong, or the run was flaky) and what to do.

Confidence ranges and runs needed

Every diff and report now says how sure each score is. “0.83 (0.55 to 0.95)” means the true score most likely lies in that 95% range, and more runs narrow it; “2 of 3 (0.21 to 0.94)” is the same for the share of passing runs. These numbers never change a verdict. Runs needed is how many runs a case takes to catch a drop of your threshold 8 times in 10, given its spread so far:

node <plugin-root>/tools/runs-needed.mjs <plugin>/evals/results --config <plugin>          # per case
node <plugin-root>/tools/runs-needed.mjs <plugin>/evals/results --config <plugin> --write  # raise runs: in prompt.md

Preflight: catch broken skills and format drift for free

Before any model run, the Action runs two static checks on the Claude Code version it just installed, and puts both in the job summary:

Both results are kept with every run and shown in two places. Each run’s HTML report has a Setup health panel: one tile for your skills and one for the eval suite format (how many cases the runner loaded on that Claude Code version, and whether the runner confirmed it), then every finding with its fix, marked when --fix can apply it. The observatory adds a Setup health section with a format drift per Claude Code release strip, styled like the behaviour timeline above it: green when every case loaded, amber for warnings or when the runner could not confirm, red when a release rejected part of your suite. verdicts.json carries the same per-release health for other tools.

The Action’s preflight input decides what happens on a finding: warn (default) reports it, fail stops before spending any model runs, off skips the checks.

Locally, with the plugin installed: node <plugin-root>/tools/skill-lint.mjs <plugin> and node <plugin-root>/tools/suite-doctor.mjs <plugin> [--fix]. Or on any plugin without installing anything (each tool is one dependency-free file; read it before running):

curl -fsSLO https://raw.githubusercontent.com/jameskomo/config-drift-checker/v1/config-drift-checker/tools/skill-lint.mjs && node skill-lint.mjs <plugin-dir>
curl -fsSLO https://raw.githubusercontent.com/jameskomo/config-drift-checker/v1/config-drift-checker/tools/suite-doctor.mjs && node suite-doctor.mjs <plugin-dir> --fix

What changed in Claude Code 2.1.287, which --fix handles: llm graders take focus: instead of target:; context.scaffold_script names a script file; tool_used needs min: 0 with max: 0 to mean “never”; arm: with becomes with-only; a covers: key moves to covers.yaml. The full list with reasons is in the v1.2.0 release notes.

8. Test your tests

A green suite proves something only if it would go red when the setup breaks, and only if it tests what people actually do. These three tools check that, each from a different side: break the setup on purpose, measure how reliably each skill fires, and compare the suite with real use.

Mutation testing: are my evals any good?

A green suite only means something if it would go red when the setup breaks. mutate checks that by sabotaging copies of your setup on purpose and running the cases that should notice:

node <plugin-root>/tools/mutate.mjs <plugin> --dry-run                 # the sabotages and a cost estimate, $0
node <plugin-root>/tools/mutate.mjs <plugin> --budget 3 --html mutate.html
node <plugin-root>/tools/mutate.mjs <plugin> --budget 3 --defaults      # also run once with no plugin, to spot rules the model follows anyway

It deletes or inverts a rule in CLAUDE.md or a skill, deletes a whole section, blurs a skill’s trigger description, removes a skill, or disables a hook, one change per copy. A sabotage is caught when a case drops more than your .cdc.yml score threshold below a run of the unchanged setup. You get a score and one sentence, such as “Your suite catches 7 of 19 sabotages”, followed by the rules nothing tests. Nothing tests means no case claims that rule in covers.yaml, which is a coverage gap; tested but not caught means a case claims the rule but its graders are too loose. --max-mutants N --seed s takes a repeatable sample, --budget caps the whole session, and your original files are never touched.

Two kinds of sabotage exist because rules back each other up:

Which rules does the model follow anyway? --defaults runs the reference once more with no plugin installed. It adds one run per needed case, on the reference only, so it roughly doubles the reference cost (the --dry-run estimate includes it); with --baseline the reference still runs once, for the no-plugin arm. A missed rule is listed under The model does these anyway when the graders that test it pass every no-plugin run and none of them fails. Graders are matched to the rule they share the most words with, so a judge that checks five rules at once counts for none of them, and a case built to show a skill stays out is never flagged for passing without it. The match is a heuristic: read the grader names in the note before you act on it. Today those rules cost context without changing behaviour, so you can drop them. Keep their graders either way: they become tripwires, and on every Claude Code or model release the canary turns red if the model stops doing it by default, which is your cue to put the rule back. The report also flags any case that scores as well with no plugin as with it, because no sabotage can turn that case red; make its prompt ask for something only your setup knows.

How to read a missed sabotage: either the graders are too loose to see the change, or the model behaves the same without the rule, which means the rule may not be pulling its weight. Our first run caught 6 of 15, and readers asked the right question: how many misses were weak tests, and how many were rules the model follows anyway? So we measured. With no plugin at all, the model already used constructor injection 3 times out of 3, so we deleted both injection rules and kept their graders as tripwires. Two case prompts spelled out what the rule should have supplied, so we rewrote them, and we added graders for the class-level request mapping and for try/catch. The re-run catches 7 of 19: of the 12 misses, 7 are rules the model follows with no plugin installed, and 5 point at a test or a rule to look at (the class-level mapping, the response wrapper and the error handling). It is one run per mutant, so a single miss is a lead, not a verdict.

Trigger map: how reliably does each skill fire?

One passing trigger case says a skill fired once. trigger-map measures it as a rate:

node <plugin-root>/tools/trigger-map.mjs <plugin> --dry-run                      # prompt counts and cost, $0
node <plugin-root>/tools/trigger-map.mjs <plugin> --model haiku --budget 0.5 --html triggers.html

For every skill it builds prompts the skill should fire on and nearby prompts it should not, from your own --prompts prompts.yaml, the eval cases that have a Skill grader, and paraphrases written by one cheap model call per skill (cached in .cdc-trigger-prompts.json, so reruns are free and you can edit the set). Each prompt runs as a fresh one-turn session with your plugin loaded and the Skill tool as the only tool. You get a fire rate and a false-fire rate per skill, each with a 95% range, and a matrix of which skill took which prompts, so collisions between skills show up. On Haiku, 100 prompts cost about $0.14.

Our own measurement, 25 fixed prompts run 3 times each: the Spring Boot skill fires on 88% of in-scope prompts and on 21% of out-of-scope ones. Before we rewrote its description to say what it is not for (build files, unit tests, TypeScript, Vue), it was 81% and 20% (the run before). The rewrite stopped the Vue and Pinia false fires, but “configure the Gradle build for our Spring Boot project” still fires it 3 times out of 3, even though the description names Gradle as out of scope. The ranges overlap, so a wording change this small is within the noise. That is the point of measuring: pass --prompts with a fixed file (or keep the cache) so a before and after compare like with like, and use --runs 3 or more when the difference you are looking for is small.

Real usage vs evals: is your suite testing what people do?

Your eval suite says which skills trigger. Your session history says which ones people actually use. usage-check sets the two side by side:

node <plugin-root>/tools/usage-check.mjs <plugin>                                     # last 30 days
node <plugin-root>/tools/usage-check.mjs <plugin> results/aggregate-result.json --since 90d --projects '*my-repo*'
claude -p "/skill-doctor" > sd.txt && node <plugin-root>/tools/usage-check.mjs <plugin> --skill-doctor sd.txt --html usage.html

It reads your local Claude Code transcripts (~/.claude/projects), counts how often each skill was invoked, and gives every skill one verdict:

Add the text of /skill-doctor with --skill-doctor to include its measured context cost per skill. Output is text, --json, --md or a self-contained --html page. Only skill names, counts and dates are read out of the transcripts; no prompt or reply text is ever copied. This one runs on your machine, not in CI, because that’s where the real usage lives.

9. Investigate a change

When something moved, these answer the next question: which release did it, which models and versions are safe, what the setup now costs per session, and what the smallest fix is.

Which release broke it: drift-bisect

When a case that passed weeks ago fails today and several Claude Code releases shipped in between, tools/drift-bisect.mjs <plugin> --case <glob> --good <version> --bad <version> finds the culprit: it binary-searches the published versions, installing each midpoint into a throwaway prefix (your global install is untouched) and running just that case. Twenty releases cost four or five runs. The output names the first bad and last good version, ready for a bug report or a harness.pinned decision. --budget caps the total spend; a subscription token makes it $0 API.

Model and version matrix: which model can my setup use?

drift-bisect finds one bad release. drift-matrix answers the wider question before you change anything: would my setup survive Haiku, or Opus, or the last five Claude Code releases?

node <plugin-root>/tools/drift-matrix.mjs <plugin> --models sonnet,haiku,opus --last 5 --dry-run   # the grid and a cost estimate, $0
node <plugin-root>/tools/drift-matrix.mjs <plugin> --models sonnet,haiku --last 5 --budget 5
node <plugin-root>/tools/drift-matrix.mjs --from <plugin>/evals/results/matrix-<stamp>             # redraw the page, no runs

Each Claude Code version is installed into a throwaway folder, so your own install is never touched, and each cell runs with the official runner when that release has one (the bundled runner otherwise). You get one page: rows are cases, columns are version and model, and every cell is coloured against a reference cell, by default the model and version pinned in .cdc.yml. Each model also gets a plain verdict. Ours, Sonnet and Haiku on 2.1.296 and 2.1.310 for $0.73, reads “sonnet: safe on 2.1.296 to 2.1.310” and “haiku: safe on 2.1.296; fails spring-service-owns-rules-and-errors on 2.1.310”. That was one run per cell, so the Haiku miss is a lead to confirm with --runs 3 before you act on it. --budget caps the whole grid; cells past it show as not run rather than failed. --case and --tag narrow the suite, and --json / --md write the same result as data. To run it in GitHub Actions on demand, copy ci/drift-matrix.yml from the plugin.

Context-cost drift: what your setup costs every session

Every session pays for your skill, agent and command descriptions, and for CLAUDE.md, before anyone types a word. A Claude Code release can change that bill even when your files stay the same. context-cost measures it:

node <plugin-root>/tools/context-cost.mjs <plugin> --md -                       # today's figure
node <plugin-root>/tools/context-cost.mjs <plugin> --store evals/results/context-cost
node <plugin-root>/tools/context-cost.mjs --history evals/results --md -        # the trend per release

It asks Claude Code’s own claude plugin details for the always-on and on-invoke tokens of each component, in a throwaway config with no credentials and no model calls, and adds CLAUDE.md (which that command doesn’t count) as a labelled estimate. On releases without plugin details it falls back to an estimate and says so. With --history it reports the trend per release: when the number moves, it says by how much, names the components that moved most, and says whether your files changed or Claude Code did. Ours is 109 always-on tokens per session, measured by Claude Code itself (it was 123 until we tightened the skill’s description on 2026-10-28). The Action measures it on every run, and the observatory shows a “Context cost per release” strip once measurements exist.

When and how repair runs

Repair never runs on its own. It runs in exactly two situations: you invoke /config-drift-checker:repair after a red run, or the Action ran with repair: true and the run came out red. What it then does, in order: reads the failing runs’ transcripts and classifies the failure; finds the instruction in your CLAUDE.md, skill or hook that should have produced the behaviour; makes the smallest edit that makes it land again (reword, add an example, move the rule, or add a hook when prose is structurally unreliable); re-runs only the failing cases to prove the fix; and writes a PR-ready summary. Hard limits: it may touch CLAUDE.md, skills and hooks only, never anything under evals/; it never loosens a rule to make a case pass; it stops at the budget; and its PR is never auto-merged, you review it like any other. Full procedure: the repair skill. What one looks like in practice: a real repair, verified.

10. Fleet: many repos, one view

Running the check on several repos? tools/fleet.mjs pulls every repo’s published results (their eval-results branches) into one dashboard with a pin policy:

node <plugin-root>/tools/fleet.mjs --config fleet.yml --out fleet.html

fleet.yml lists the repos and the pins they should all be on (policy: model / harness); the table shows each repo’s status, pins, policy skew, month spend, coverage and last run, and any repo whose pins differ from the policy is flagged. Repos with errored or missing data exit the command red, so the fleet view is itself a check. The ready workflow template is ci/fleet.yml in the plugin: drop it in a small fleet repo with your fleet.yml, and it publishes docs/fleet.html on a schedule (Pages source: main, folder /docs); private repos need a PAT with org read as FLEET_TOKEN.

Rolling it out across an org (no hosted app)

Put ci/org-reusable.yml (from the plugin) into your org’s .github repository as .github/workflows/config-drift-checker.yml, set the org-level Actions secret (CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY) once, and each member repo installs the whole check with the three-line caller in ci/org-caller.yml: uses: your-org/.github/... plus secrets: inherit. Combine with the fleet dashboard above and you have org rollout plus org overview with zero hosted infrastructure. A GitHub App could remove even the caller file, but it would put a server of ours between your code and your key, which is exactly what this tool promises not to have; if that trade ever changes, it will be loudly opt-in.

11. The drift index

Every CI run also writes a dashboard to the eval-results branch under docs/: the verdict, pinned baseline vs latest canary, budget spent, coverage, a ribbon of every case over every run, score per case over Claude Code versions, and a linked run list. Publish it: Settings → Pages → Source: branch eval-results, folder /docs. Turn it off with pages: 'false' on the Action.

The public Claude Code release report

Your own observatory watches your suite. The release report watches everyone’s: on every Claude Code release, a daily job loads every public claude plugin eval suite we can find, under the new version and the one before it. Each case is listed as loads, broke on this release, fixed on this release, or never loaded, with the runner’s own error and the suite-doctor fix. It is free and safe by construction: the runner’s $0 cost ceiling stops before any agent starts, the runner gets no credentials, and nothing from the cloned repos is installed or run. Suite authors can fix their cases with node tools/suite-doctor.mjs <plugin> --fix, or open an issue to opt out. Run it yourself with node <plugin-root>/tools/release-report.mjs --discover.

Each release’s report also says what changed inside Claude Code: harness-diff downloads both releases’ sdk-tools.d.ts with npm pack (nothing is installed or run) and compares every built-in tool’s input schema and the descriptions the model reads. Each change is labelled instruction wording (a description changed, shown word by word), capability (a tool, parameter or value added or removed), or type-only (not shown to the model). For example, 2.1.310 changed the instructions of two built-in tools (Agent and Read) and added one capability compared with 2.1.295. Every release has its own page under release-report/diff/, and you can run it for any two versions:

node <plugin-root>/tools/harness-diff.mjs --from 2.1.295 --to 2.1.310 --md -

Badges for suite authors. Every suite card on the release report offers a README badge, “loads on 2.1.310”, “N of M cases load” or “never loaded”, with the markdown to paste.

12. Local commands

<plugin-root> is where Claude Code installed the plugin (claude plugin list shows it). Every run writes aggregate-result.json and report.html into <your-plugin>/evals/results/<timestamp>/.

# run and compare
/config-drift-checker:run                      # inside Claude Code: run, diff, explain red
/config-drift-checker:repair                   # after red: smallest setup fix, verified, PR-ready summary
node <plugin-root>/tools/eval-shim.mjs <plugin> --scaffold                  # everything, with/without ablation
node <plugin-root>/tools/eval-shim.mjs <plugin> --track canary --scaffold   # what developers get today
node <plugin-root>/tools/eval-shim.mjs <plugin> --case 'guard*' --runs 1 --ablation none --scaffold --budget 0.5
node <plugin-root>/tools/eval-diff.mjs baseline.json current.json --history evals/results --config <plugin>   # exit 1 on red
node <plugin-root>/tools/eval-report.mjs current.json --baseline baseline.json --config <plugin>
node <plugin-root>/tools/eval-dashboard.mjs <plugin>/evals/results --config <plugin> --out dashboard.html

# free checks (no model runs)
node <plugin-root>/tools/skill-lint.mjs <plugin>                    # every SKILL.md
node <plugin-root>/tools/suite-doctor.mjs <plugin> --fix            # eval cases vs the installed runner
node <plugin-root>/tools/context-cost.mjs <plugin> --md -           # tokens your setup adds to every session
node <plugin-root>/tools/config-coverage.mjs <plugin> --list         # rule ids for a case's covers.yaml
node <plugin-root>/tools/pr-impact.mjs --base main --head HEAD --plugin <plugin>   # what a branch changes in the setup
node <plugin-root>/tools/harness-diff.mjs --from <v> --to <v> --md -   # what changed inside Claude Code
node <plugin-root>/tools/release-report.mjs --discover              # every public suite on the newest release

# test your tests
node <plugin-root>/tools/mutate.mjs <plugin> --dry-run              # sabotages and a cost estimate
node <plugin-root>/tools/trigger-map.mjs <plugin> --dry-run         # fire rates per skill, collisions
node <plugin-root>/tools/usage-check.mjs <plugin> --since 30d       # real skill usage vs your eval cases
node <plugin-root>/tools/case-miner.mjs <plugin> --dry-run          # real sessions into suggested cases
node <plugin-root>/tools/runs-needed.mjs <plugin>/evals/results --config <plugin>   # runs each case needs

# investigate
node <plugin-root>/tools/drift-bisect.mjs <plugin> --case '<glob>' --good <v> --bad <v>
node <plugin-root>/tools/drift-matrix.mjs <plugin> --models sonnet,haiku --last 5 --dry-run

# set up and operate
node <plugin-root>/tools/cdc-bootstrap.mjs .                        # headless setup; --no-agent for $0
node <plugin-root>/tools/cdc-config.mjs <plugin> init               # write .cdc.yml; set-pins --model ... --harness ...
node <plugin-root>/tools/evals-convert.mjs import skills/<s>/evals/evals.json --dry-run   # skill-creator suites in
node <plugin-root>/tools/baseline-check.mjs aggregate-result.json --config <plugin>   # exit 1 if not baseline material
node <plugin-root>/tools/release-watch.mjs --state .release-watch.json --models --pin <model-id>
node <plugin-root>/tools/trace-keeper.mjs out.json --clean          # after claude plugin eval --keep-temp
node <plugin-root>/tools/fleet.mjs --config fleet.yml --out fleet.html

13. Cost (measured)

$0.05 to $0.08 per short Sonnet run; $0.20 to $0.25 per real-code run. A 3-case suite at 3 runs is about $0.43 per pinned run; a canary at 1 run per case is $0.15 to $0.25. With min_interval_hours: 72, 25 Claude Code releases a month collapse into at most about 10 canaries, and budget.per_month_usd is the hard ceiling whatever npm publishes. On a subscription token, API cost is $0 but runs count against that plan’s usage limits: a six-case canary is about six short agent runs per release, three times that only when a case deviates. Use ablation: none in CI and Haiku for PR smoke.

The deeper tools, measured on our six-case suite: a mutation test of 19 sabotages, with the no-plugin arm, cost $4.59; a trigger map of 25 prompts run 3 times each on Haiku cost $0.11; a model and version matrix of 24 cells (2 models, 2 releases, 6 cases) cost $0.73 (--dry-run prices any grid first). The preflight, context-cost, harness-diff, usage-check, case-miner, pr-impact and the release report cost nothing: no model runs.

14. Safety

Workspaces are throwaway directories, not sandboxes for Docker, the network or your host. Every run carries a safety-net hook that blocks docker compose down -v, prunes, force-pushes, rm -rf outside the workspace, DROP TABLE and similar, in both arms. Write hook cases so the command is harmless when it succeeds: a scratch git repo, or a stub binary in .eval-bin/ (the setup skill does this for you). Read third-party suites before running them with --scaffold. The repair skill may edit CLAUDE.md, skills and hooks only, never a case or grader, and every PR it opens carries its re-run evidence and is never auto-merged.

15. See it work: the demo repo

config-drift-checker-demo is a small Spring Boot notes API with a typical setup: CLAUDE.md, one conventions skill, one guard hook. /config-drift-checker:setup ran against it unattended (78 turns, 13 minutes, $1.68) and wrote three cases from the real content: a real-code case that asks for a feature the API doesn’t have and grades the diff, a negative-trigger case, and a guard-hook case in a scratch git repo. It smoke-ran them, fixed two of its own graders, and reached 1.00. Everything it produced is in the repo as generated, run log included. Read those three cases first; they are the best starting point for writing your own.

16. FAQ

Isn’t this what /doctor or /skill-doctor does? No. Those are static health checks: they never run the agent. A setup can be perfectly well-formed and silently useless after a release. This runs real tasks and compares behaviour with your baseline. Linter versus test suite.

Will this drain my API key? Not past budget.per_month_usd. The gate reads the ledger before every run and skips with a notice at the cap; the runner stops mid-run at per_run_usd; scheduled canaries are throttled by min_interval_hours.

Do the bump / pin / repair PRs merge themselves? Never. They carry the evidence; you decide.

What if my pinned model is retired? release-watch --pin warns when the id disappears from Anthropic’s model list; the next green canary streak opens a bump PR to a current id.

Does installing the plugin change my repos? No. Only setup writes files, only in the repo you run it in, as a reviewable diff.

Does pushing a repo trigger Actions/Slack by itself? Only if that repo has the workflow file and the secrets. No workflow file, nothing runs. No key, the run fails loudly.

Do I need Anthropic’s claude plugin eval? It ships with current Claude Code and the Action prefers it automatically; the bundled runner covers older versions. Both read the same case format, and a claude plugin eval ... --json out.json result diffs directly against any baseline. One caveat: the official runner keeps transcripts in a temp trace, so refusal labelling needs --keep-temp plus tools/trace-keeper.mjs (see the runbook).

Where does my code go? Into a temporary directory on your runner for one run, then deleted. Results stay in your repo’s eval-results branch and the workflow artifact. We operate no server.

Can I test CLAUDE.md rules? Yes. Cases copy your CLAUDE.md into the workspace via scaffold_script, so the rule is in force during the run and the grader checks the outcome.

Codex / Gemini / Cursor? Codex is in: --agent codex on the shim runs the same cases through OpenAI’s Codex CLI (codex exec), bridges your CLAUDE.md to AGENTS.md in the workspace, and grades with the same graders; Claude-only indicators like tool_used: Skill are skipped, not failed, so scores stay comparable. Codex has no subscription-token equivalent here, so runs use your ChatGPT plan’s included usage (or bill an OpenAI key). Gemini is in too: --agent gemini runs headlessly with GEMINI.md bridging on the free Google tier; it emits no machine-readable tool calls, so tool-use indicators are skipped and the content graders carry the score. The case format and .cdc.yml stay agent-agnostic. A published run of the same suite on all three scored Claude 1.00, Gemini 0.77 and Codex 0.63, and showed the main thing that doesn’t travel: Claude Code hooks don’t run in the other CLIs.

Licence? FSL-1.1-Apache-2.0: free to use, modify and self-host in your own CI; not to be offered as a competing commercial service; each release becomes Apache-2.0 two years after publication.

Uninstall: delete the workflow file, .cdc.yml and the evals/ folder; claude plugin uninstall config-drift-checker@jameskomo.