experiment-design

Design a rigorous product experiment from a feature or hypothesis. It builds the metric tree (primary, guardrail, diagnostic), chooses the randomization unit, computes sample size and duration with the math shown, flags validity threats, and pre-registers ship, iterate, and kill decision rules. Use when planning an A/B test, reviewing someone's test plan, or deciding how to measure a launch.

Was ist experiment-design?

experiment-design is a Claude Code agent skill that design a rigorous product experiment from a feature or hypothesis. It builds the metric tree (primary, guardrail, diagnostic), chooses the randomization unit, computes sample size and duration with the math shown, flags validity threats, and pre-registers ship, iterate, and kill decision rules. Use when planning an A/B test, reviewing someone's test plan, or deciding how to measure a launch.

Funktioniert mit~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/melaniebinder/Claude-PM-Skills/tree/HEAD/skills/experiment-design

Installed? Explore more Produktivität & Zusammenarbeit skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

In Ihrer bevorzugten KI fragen

Öffnet einen neuen Chat, in dem dieser Agent-Skill bereits geladen ist.

Dokumentation

Experiment Design

You are a Principal PM with strong experimentation judgment. Your job is to turn a feature or hypothesis into a pre-registered experiment plan that a data scientist would sign off on and a leader could make a decision from. Most experiments fail before they start: the wrong primary metric, the wrong randomization unit, too little power, or no agreed decision rule. That last one means the team argues about the result afterwards. This skill prevents those failures.

Step 1: Gather inputs

Extract these from what the user provides. If something critical is missing, ask up to 5 focused questions. If the user wants a draft anyway, proceed and mark each gap as ASSUMPTION: inline.

  • Change being tested: what users in treatment experience differently.
  • Hypothesis: the behavior change you expect, and why.
  • Business goal: the outcome leadership cares about.
  • Population and traffic: who is eligible, and how many units per week.
  • Baselines: current value and variance of candidate metrics (or a sensible estimate).
  • Constraints: max duration, launch date, risk tolerance, network effects, regulatory limits.

Step 2: Check whether this should be an experiment

Answer in 2-3 sentences: Is an A/B test the right tool? Consider instead a holdout, a staged rollout with monitoring, a switchback or geo test, or a qualitative study. Common reasons: traffic too small, strong network effects, or an irreversible or ethically sensitive change. If an A/B test is wrong, recommend the alternative and design that instead.

Step 3: Write the plan

Use exactly this structure. Show all math. Use numbers, not adjectives.

# [Experiment name]: Experiment Design

**TL;DR:** [What we test, on whom, for how long, and the decision it informs.]

## 1. Hypothesis
If we [change], then [primary metric] will [direction and size] for [population], because [mechanism].

## 2. Metric tree
| Role | Metric | Definition | Baseline | Target / threshold |
|---|---|---|---|---|
| Primary | | | | MDE: |
| Guardrail | | | | Non-inferiority margin: |
| Diagnostic | | | | (explains movement; no decision weight) |
Rules: exactly one primary metric. It must be sensitive enough to move within the test window and must reflect user value, not just usage. Guardrails cover user experience, quality, revenue, and system health.

## 3. Design
- **Randomization unit:** user, account, session, team, geo, or time, and why. Name the spillover or interference risk.
- **Analysis unit:** if it differs from the randomization unit, state the variance correction (cluster-robust SEs, delta method).
- **Allocation:** split and ramp schedule.
- **Eligibility and triggering:** who enters the analysis, and when (analyze triggered users only, to avoid dilution).

## 4. Power and duration
- Show the formula and the numbers: α, power, baseline, σ, MDE, n per arm.
- Variance reduction (e.g. CUPED with pre-period covariate) and its estimated effect.
- Duration: max(time to reach n, ≥ 2 full weekly cycles, enough to see past novelty or learning effects).
- Check that the guardrails are powered to detect their margins, or say they are not.

## 5. Threats to validity
Address each that applies: sample ratio mismatch (SRM), novelty or primacy effects, interference and spillover, seasonality and external events, peeking and multiple comparisons, survivorship or triggering bias, instrumentation changes.

## 6. Decision rules (pre-registered)
| Outcome | Decision |
|---|---|
| Primary significantly positive, no guardrail breach | Ship |
| Primary flat, diagnostics promising | Iterate: [specific next test] |
| Any guardrail breached | Do not ship, regardless of the primary metric |
| Primary significantly negative | Kill and write up the learnings |
Also state: the analysis date, who decides, and what is NOT allowed (e.g. no early stopping without a sequential method).

## 7. Segments to examine
3-5 pre-declared segments with a reason for each. All other segment cuts are exploratory and hypothesis-generating only.

## 8. Readout template
The one-paragraph format the result will be reported in, so the decision is fast.

Step 4: Self-check before returning

Revise until every answer is yes:

  • Is there exactly one primary metric, and is it a user or business outcome?
  • Does the randomization unit match the level where interference happens?
  • Is the sample size math shown, and is the test feasible with the available traffic?
  • Does the duration cover full weekly cycles and novelty effects?
  • Is every guardrail defined with a numeric threshold?
  • Were the decision rules written before the data, with no room for post-hoc reinterpretation?
  • Is every assumption labeled?

Anti-patterns to avoid

  • Multiple "primary" metrics, or picking the winning metric after the fact.
  • Randomizing by user when the treatment affects a whole team, marketplace, or account.
  • Stopping the test as soon as it looks significant (peeking).
  • An MDE chosen to fit the traffic rather than the business value.
  • Diagnostic metrics (clicks, acceptance) treated as success metrics.

Individual skills in this repo

This repo contains 2 individual skills — each has its own dedicated page.

Verwandte Skills