/testing-plugin:measurement-controlsfrom testing-plugin
Validates that benchmarks, A/B tests, and eval metrics measure what they claim. Checks control arms, oracle reliability, pooled correlations, and small x/N rates.
Ships in testing-plugin. 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.
Read when SKILL.md points to them.
A measurement fails most expensively when it returns a confident, well-formed answer about something it never observed. Nothing in the run contradicts it, so the finding ships. Each numbered section is one way a control, an oracle or a metric produces that answer, and the check that exposes it.
| Use this skill when... | Use something else when... |
|---|---|
| Setting up an A/B, an A/A′, or a "did X change the output?" control | Timing a change against a baseline → benchmark-controls |
| An oracle or scorer is about to turn artifacts into verdicts | Auditing whether a green suite tests what it aims at → test-strategy-review |
| A metric says "improved" and a person still complains | Finding weak assertions by mutating code → mutation-testing |
| Correlating two variables, or reporting a rate as x/N | A tool's empty result is about to gate an action → agent-patterns-plugin:tool-result-traps |
| Locating a defect in a long artifact (video, audio, logs, rows) | |
| Claiming an operation is "lossless", "exact" or "byte-identical" |
A comparison control answers "did X change the output?" only while X is the only difference. If the arms also differ in a label, filename, extra step or timestamp, and the compared artifact carries it, the control reports "different" whatever X did. A control that cannot fail has not tested anything. Canonical break: a container format that embeds the generating parameters makes two files differ unconditionally; hash the decoded stream.
Two gates, not one:
| Gate | Asks |
|---|---|
| A == A′ | Can the comparison report "same"? (determinism) |
| B ≠ A in what the system receives | Was the variable applied at all? |
Diff the input the system actually receives (the converted request, the resolved config), not the source file you edited: a value overridden downstream is inert. Prove the gate refuses a deliberately broken variant.
The instrument, build-time checks and a few more ways a control lies (stale bytecode, a result cache, a test that re-implements its subject, a control that cannot pass) are in REFERENCE.md.
An oracle can be wrong in the direction that produces a finding. Before an oracle scores a failure case, make it recover a case already known to have succeeded. An instrument no better than chance on the known-good case cannot certify a failure anywhere. The known-good case is usually free: a project chasing a defect has examples where the thing worked.
Correlating over several groups stacked together can produce a large r that
reports only that the groups differ in both variables. Before believing a
correlation, ask what else varies along with both axes. Report the
within-group coefficient next to the pooled one.
r within each group and report both. A pooled figure alone is
not a result.r at small n is
suggestive, never established.The same law for a rate: x/N over observations that are not independent inflates n by the group size, and lets a systematic failure score partial credit (a constant answer earns 2/4 on an alternating truth).
A A A A, not
2/4). The vector shows the failure mode.mixed bucket you look at. A taxonomy with
no escape hatch confirms itself.A probe that computes where to look from an index formula measures whatever sits at that index, precisely. Find the event by scanning for it, then measure. An index derived from arithmetic is a hypothesis about the artifact's layout.
argmax.
It finds the true location and events nobody knew to look for.Calibrating with an injected signal, control-testing the failing arm, and diffing by identity: REFERENCE.md.
An evaluator measures one quantity; the user experiences a phenomenon. Before a metric gates work, establish that it measures what decides the user's verdict. An accurate, well-controlled metric about the wrong half manufactures progress.
A placement check that correlates a source against a mixed result answers "is this where I put it" only while the window holds that source alone. Sum each layer separately and verify each against its own stem. "The layers do not overlap" is a property of today's content, not of the checker.
"Lossless", "byte-identical", "no re-encode" are claims about one code path, and a file carries several streams. A guarantee is scoped to the stream the code actually copies. Name which stream, and measure the others.
benchmark-controls — timing-specific control hazardsmutation-testing — the mutation table that proves a check can failagent-patterns-plugin:tool-result-traps — empty or well-formed tool output
that is not the answer it looks likedocumentation-plugin:docs-claim-hygiene — writing a measurement down with
its scopecode-quality-plugin:code-derived-facts — guards that must use a looser,
independent patternDistilled from rules in the laurigates/comfyui-nodes repository, whose dated instances (video, audio and attribution experiments) are the provenance for each law.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
experiment-design, metric-validation, ab-testing, eval-quality
20 skills in this plugin
/benchmark-controlsBenchmark control hazards: mutated controls, disagreeing harnesses, VM lock scaling, hyperfine 2.0 exports. Use when benchmarking, comparing timings, A/B runs, hyperfine./mutation-testingMutation testing with Stryker (TS/JS) and mutmut (Python). Use when finding weak tests that pass on mutated code, or improving test quality through mutation analysis./odiff-image-diffingodiff pixel-by-pixel image diffing. Use when comparing screenshots, detecting visual regressions, diffing before/after PNGs, asserting golden images.npx claudepluginhub laurigates/claude-plugins --plugin testing-pluginOther plugins' skills for the same job