agentleFS
MohOneXMohOneX/claude-opus-skills/experiment-design/SKILL.md

experiment-design

Skill0 starsChanged 5 months agoMITView on GitHub

Designs experiments and A/B tests that produce causal, decision-grade evidence rather than noise. Use when setting up an A/B test, validating a hypothesis empirically, designing an evaluation, or when results need to support a real decision and must survive scrutiny.

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 21 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Hypothesis and mechanism: not just "B is better" but *why* B should move the metric.

    line 14

“Common” is measured: kept by at least 6 in 10 of the 21 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Experiment Design

An experiment exists to change a decision. If no result would change what you do, don't run it. Design backward from the decision to the measurement.

Specify before you collect (pre-registration discipline)

  1. Decision and threshold: "If metric X moves by ≥ δ, we ship." Define δ from business value, not statistical convenience.
  2. One primary metric: the thing the decision hinges on. Everything else is a guardrail or exploratory. Multiple primaries = multiple comparisons = inflated false positives.
  3. Hypothesis and mechanism: not just "B is better" but why B should move the metric. A result without a mechanism is a coincidence waiting to fail to replicate.
  4. Power analysis up front: required sample size = f(baseline rate, minimum detectable effect, α, power). Running until significant ("peeking") manufactures false positives.

Causal validity is the whole game

  • Randomize at the right unit: user, not request, if effects persist across requests (otherwise contamination). Cluster randomization when interference exists (marketplaces, social graphs — one user's treatment affects another's outcome → SUTVA violation).
  • Control for confounders by design (randomization) not by post-hoc adjustment, which only handles confounders you measured.
  • Guardrail metrics: latency, error rate, revenue, retention — catch a treatment that wins the primary metric while quietly harming the system.

Adversarial validation

  • Peeking / optional stopping: did anyone look at results early and stop when significant? That inflates α from 5% to 20-30%. Use sequential testing or fixed horizons.
  • Sample ratio mismatch (SRM): is the actual split 50/50? A skew signals a broken assignment/logging pipeline that invalidates everything. Check it first, always.
  • Novelty / primacy effects: early lift may be curiosity that decays. Run long enough to capture the steady state.
  • Simpson's paradox: an aggregate win can be a loss in every segment (or vice versa) under mix shift. Segment before trusting the average.
  • Multiple comparisons: 20 metrics at α=0.05 yields ~1 false "win" by chance. Correct, or pre-declare the primary.

Non-obvious risks

  • Statistical significance ≠ practical significance; a real but tiny effect can be "significant" at huge N and worthless.
  • Survivorship and selection bias creep in when the treatment changes who shows up in the sample.
  • Winner's curse: the effect of the variant you picked because it won is biased upward; expect regression on launch.

Output structure

Deliver: the decision + threshold, the single primary metric and mechanism, the randomization unit and why, the pre-computed sample size/duration, the guardrails, and the validity checks (SRM, peeking policy, segmentation plan) that must pass before the result is trusted.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.