
Measure Experiment Design
- 508 installs
- 518 repo stars
- Updated August 4, 2026
- product-on-purpose/pm-skills
measure-experiment-design is a Claude Code PM skill that designs A/B tests with variants, metrics, sample size, and duration for developers and PMs who need quantitative validation of a framed hypothesis.
About
measure-experiment-design is a product-on-purpose PM skill at version 2.1.0 that produces a complete experiment design document before an A/B test launches. The skill walks through hypothesis articulation, control and treatment variants, primary and guardrail metrics, sample size with significance and power assumptions, duration based on traffic, targeting, and pre-defined success criteria. Its output template spans 11 sections including Overview, Hypothesis, Variants, Metrics, Sample Size and Duration, Audience Targeting, Success Criteria, Risks, and Implementation Notes. Developers and PMs invoke measure-experiment-design after a hypothesis exists but before instrumentation or results analysis. It pairs with define-hypothesis upstream and measure-experiment-results downstream in the measure phase workflow.
- measure-experiment-design
- Design & UI/UX
- AI-coding skill
Measure Experiment Design by the numbers
- 508 all-time installs (skills.sh)
- +31 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #590 of 1,880 Design & UI/UX skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/product-on-purpose/pm-skills --skill measure-experiment-designAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 508 |
|---|---|
| repo stars | ★ 518 |
| Last updated | August 4, 2026 |
| Repository | product-on-purpose/pm-skills ↗ |
How do you design an A/B test with sample size and metrics?
Helps with design & ui/ux tasks.
Who is it for?
Product engineers and PMs preparing a controlled experiment to validate a specific product change with statistical rigor.
Skip if: Teams without a framed hypothesis yet or workflows that only need qualitative surveys instead of controlled A/B tests.
When should I use this skill?
A developer or PM asks to design an A/B test, calculate sample size, or define experiment metrics after a hypothesis is already stated.
What you get
A completed experiment design document with variants, metrics, sample size, duration, targeting, and success criteria.
By the numbers
- Version 2.1.0 experiment design skill updated 2026-06-10
- Output template includes 11 documented sections from hypothesis through implementation notes
Files
<!-- PM-Skills | https://github.com/product-on-purpose/pm-skills | Apache 2.0 -->
Experiment Design
An experiment design document defines all parameters needed to run a rigorous A/B test or controlled experiment. It ensures the team aligns on what you're testing, how you'll measure success, and how long to run the test before drawing conclusions. Good experiment design prevents common pitfalls: underpowered tests, unclear success criteria, and decisions based on noise rather than signal.
When to Use
- Before launching an A/B test to validate a product change
- When testing a hypothesis that requires quantitative validation
- After solution design to validate assumptions before full rollout
- When stakeholders want data-driven evidence for a decision
- To establish a culture of experimentation and learning
When NOT to Use
- The hypothesis itself is not yet articulated -> use
define-hypothesisfirst; this skill designs the test for a claim you already have - You are analyzing a completed experiment -> use
measure-experiment-results - You need the event tracking that will measure the experiment -> use
measure-instrumentation-spec - You are gathering opinions rather than running a controlled test -> use
measure-survey-analysis
Instructions
When asked to design an experiment, follow these steps:
1. Articulate the Hypothesis Write a clear, testable hypothesis in the format: "We believe [change] for [users] will [outcome] as measured by [metric]." One hypothesis per experiment - if you're testing multiple things, run multiple experiments.
2. Define the Variants Describe the control (current experience) and treatment (new experience) in sufficient detail. Include screenshots, mockups, or precise descriptions so anyone can understand what users will see.
3. Choose Primary and Secondary Metrics Select one primary metric that will determine success or failure. Add 2-3 secondary metrics to understand the broader impact. Include guardrail metrics to catch unintended negative effects.
4. Calculate Sample Size Determine how many users you need per variant to detect your minimum detectable effect (MDE) with statistical significance. Specify your significance level (typically 0.05) and power (typically 0.80).
5. Estimate Duration Based on sample size and available traffic, calculate how long the experiment needs to run. Account for weekly patterns - avoid ending mid-week if behavior varies by day.
6. Define Targeting and Allocation Specify which users are eligible for the experiment and how traffic is split between variants. Document any exclusions (e.g., employees, specific segments).
7. Set Success Criteria Define upfront what constitutes a win, a loss, or an inconclusive result. This prevents post-hoc rationalization and moving goalposts.
8. Document Risks and Mitigations Identify what could go wrong and how you'll detect/address it. Include monitoring plans and rollback criteria.
Output Format
Use the template in references/TEMPLATE.md to structure the output. A complete design fills every template section: Overview; Hypothesis; Background; Variants; Metrics; Sample Size & Duration; Audience Targeting; Success Criteria; Risks & Mitigations; Implementation Notes; and References.
Quality Checklist
Before finalizing, verify:
- [ ] Hypothesis is falsifiable and specific
- [ ] Only one primary metric is defined
- [ ] Sample size calculation is documented with assumptions
- [ ] Duration accounts for traffic patterns and statistical requirements
- [ ] Success criteria are defined before the experiment starts
- [ ] Guardrail metrics protect against unintended harm
Examples
See references/EXAMPLE.md for a completed example.
Scenario: A/B test a new onboarding checklist
This is the INPUT brief for an output-quality eval. The skill arm and the control arm each receive everything below (and nothing else about how to do the work) and produce an experiment-design artifact for it. Judges never see this header.
Context
Product: a B2C habit-tracking mobile app. Hypothesis the team holds: showing a 3-step guided onboarding checklist (set a goal, schedule a reminder, log day one) right after signup will get more new users to form an early habit, measured by day-7 retention.
What we know (use these numbers for the design):
- New signups: ~12,000 per week, split roughly evenly across iOS and Android.
- Current day-7 retention for new users: 34%.
- The team would consider a 3 percentage-point lift (34% -> 37%) a meaningful win worth shipping.
- Current first-session completion (any logged action): 58%.
- Average revenue per retained user matters but monetization is downstream (subscription at day 14+).
- Past experiments at this app used a 0.05 significance level and 80% power by convention.
Things the team is unsure about / wants the design to address:
- How many users per arm and how long to run, given the weekly traffic and clear weekday/weekend
behavior differences.
- What the single primary metric should be, and what secondary/guardrail metrics to watch (they worry
the checklist could feel like friction and depress first-session completion or increase day-1 uninstalls).
- What exactly counts as a win vs an inconclusive result, decided before launch.
Audience for the artifact: the growth PM and the data scientist who will run the test.
Scenario: pricing-paywall experiment with a sample-size and guardrail trap
This is the INPUT brief for an output-quality eval. The skill arm and the control arm each receive everything below (and nothing else about how to do the work) and produce an experiment design for it. Judges never see this header. This scenario is seeded with the traps a strong freehand pass tends to fall into: a low base-rate primary metric (so the sample size is large and must be derived, not asserted), real guardrail risks the test could harm, and a tempting secondary metric that invites declaring success early. The skill should win on showing the sample-size math, naming ONE primary metric, pre-registering the decision rule, and protecting guardrails; the freehand control tends to skip the sizing derivation, define success loosely, or let a secondary metric move the goalposts.
Situation
We run a freemium productivity app. We want to test a new pricing paywall: moving an existing free feature (advanced filters) behind the Pro plan, with a redesigned upgrade screen. Leadership wants to know if this lifts paid conversion without hurting the broader funnel.
What we know
- Primary business goal: increase free-to-paid conversion. Current 30-day free-to-paid conversion is
about 2.0%. The team is hoping for a lift to ~2.4% (a 0.4 percentage-point absolute lift); anything below ~2.2% would not justify the churn risk.
- Traffic: ~12,000 new free signups per week enter the funnel and can be randomized.
- Known risks the change could cause: users who lose a free feature may churn or leave bad reviews;
support contacts may spike; some users may downgrade or request refunds after upgrading under pressure.
- A tempting secondary metric: clicks on the upgrade screen will almost certainly go up (more people
hit the paywall), and the team is tempted to read that as success.
- Operational notes: the app has a strong weekly usage cycle (weekday-heavy). Finance needs a
decision in about 6 weeks. There is no prior experiment on this surface to borrow an effect size from.
What the team wants
A rigorous experiment design: a single, falsifiable primary hypothesis and ONE primary decision metric; a sample-size estimate with its assumptions (baseline rate, the minimum detectable effect, significance, power) and the calculation shown - not asserted; a duration derived from sample size and weekly traffic that respects the weekly cycle; pre-registered win/lose/inconclusive criteria set BEFORE launch; and guardrail metrics (with a monitoring/rollback plan) that protect against the churn, refund, support, and review risks. Make reasonable assumptions explicit; do not invent numbers the brief does not support.
{
"schema": 1,
"skill": "measure-experiment-design",
"runs_per_query": 3,
"trigger_threshold": 0.5,
"queries": [
{
"q": "Design an A/B test for the new checkout button placement",
"expect": "trigger",
"split": "train"
},
{
"q": "We have a hypothesis about onboarding emails; spec the experiment with variants, sample size, and duration",
"expect": "trigger",
"split": "train"
},
{
"q": "How many users per variant do we need to detect a 2 percent lift in conversion, and how long should we run it?",
"expect": "trigger",
"split": "train",
"notes": "Intent-only phrasing centered on sample size and duration"
},
{
"q": "Stakeholders want data before we roll out the redesign; set up a controlled test plan",
"expect": "trigger",
"split": "train",
"notes": "Intent-only phrasing"
},
{
"q": "Write the experiment plan for testing free shipping thresholds, including guardrail metrics and success criteria",
"expect": "trigger",
"split": "train"
},
{
"q": "Define control and treatment, traffic allocation, and exclusions for the search ranking test",
"expect": "trigger",
"split": "train"
},
{
"q": "Help me design a rigorous experiment to validate the assumption we already framed about trial-to-paid conversion",
"expect": "trigger",
"split": "validation"
},
{
"q": "Plan the A/B test so we do not call it early on noise: significance level, power, and stopping rules",
"expect": "trigger",
"split": "validation"
},
{
"q": "Our hypothesis doc is approved; turn it into a runnable test design before engineering builds the variants",
"expect": "trigger",
"split": "validation"
},
{
"q": "Set up an experiment comparing two paywall designs with a single primary metric",
"expect": "trigger",
"split": "validation"
},
{
"q": "Help me articulate what we actually believe about churn before we design any test",
"expect": "no-trigger",
"split": "train",
"near_miss_of": "define-hypothesis",
"notes": "The claim itself is not articulated yet; framing it is the partner's job"
},
{
"q": "We have not framed what to test yet; write the We believe X for Y will Z claim for the referral idea",
"expect": "no-trigger",
"split": "train",
"near_miss_of": "define-hypothesis",
"notes": "Hypothesis statement comes before experiment design"
},
{
"q": "Turn the team's competing assumptions about power users into one falsifiable statement with success metrics",
"expect": "no-trigger",
"split": "validation",
"near_miss_of": "define-hypothesis",
"notes": "Aligning on the assumption, not designing the test"
},
{
"q": "The experiment finished yesterday; analyze whether the treatment won",
"expect": "no-trigger",
"split": "train",
"near_miss_of": "measure-experiment-results",
"notes": "Completed experiment analysis, not design"
},
{
"q": "Spec the event tracking we need before any experiment can be measured",
"expect": "no-trigger",
"split": "train",
"near_miss_of": "measure-instrumentation-spec"
},
{
"q": "Draft a survey to gather user opinions on the new dashboard and analyze the responses",
"expect": "no-trigger",
"split": "validation",
"near_miss_of": "measure-survey-analysis",
"notes": "Gathering opinions, not running a controlled test"
},
{
"q": "Define the dashboard requirements for our growth metrics",
"expect": "no-trigger",
"split": "train",
"near_miss_of": "measure-dashboard-requirements"
},
{
"q": "My Docker container exits with code 137; help me debug it",
"expect": "no-trigger",
"split": "train",
"notes": "Unrelated engineering ask"
},
{
"q": "Write a SQL query for daily active users by platform",
"expect": "no-trigger",
"split": "validation",
"notes": "Unrelated"
},
{
"q": "Plan a three day hiking itinerary in the Dolomites",
"expect": "no-trigger",
"split": "validation",
"notes": "Unrelated"
}
]
}
measure-experiment-design - Version History
| Version | Date | Release | Effort | Type | Summary |
|---|---|---|---|---|---|
| 2.1.0 | 2026-06-10 | v2.26.0 | F-12-batch-4 | minor | Quality convergence: When NOT to Use + output-contract enumeration (F-12 Batch 4) |
| 2.0.1 | 2026-06-10 | v2.26.0 | F-12-batch-0 | patch | Description rewrite for trigger accuracy (boundary disambiguation; 2026-06-09 audit, v2.26.0 Batch 0) |
| 2.0.0 | 2026-01-26 | - | - | baseline | Prior published version |
2.1.0 (2026-06-10)
Quality-convergence minor (F-12 Batch 4): added a "When NOT to Use" section with boundary pointers to neighboring skills, and the Output Format now enumerates the template sections a complete artifact fills. No template or example changes.
2.0.1 (2026-06-10)
Description-only patch (F-12 Batch 0, from the 2026-06-09 repo audit): the trigger-surface description was rewritten to disambiguate collision pairs with an explicit boundary pointer to the sibling skill. No body, template, or behavior changes.
2.0.0 (2026-01-26)
Baseline row for the prior published version; see git history for its changes.
Experiment Design: One-Page Checkout
Overview
| Field | Value |
|---|---|
| Experiment Name | checkout-single-page-v1 |
| Owner | Maria Santos, Product Manager |
| Start Date | January 20, 2026 |
| End Date | February 3, 2026 |
| Status | Ready |
Hypothesis
We believe replacing our 3-step checkout with a single-page checkout
for mobile web users
will increase checkout completion rate
as measured by checkout conversion rate (orders / checkout starts)
Background
Mobile checkout abandonment is at 73%, compared to 45% on desktop. User research identified friction points: confusion navigating between steps, anxiety about hidden costs appearing late in the flow, and form field frustration on small screens. A single-page checkout addresses these by showing all information upfront and reducing navigation.
Competitor analysis shows that Amazon, Shopify stores, and Apple use single-page or minimal-step checkouts. Our hypothesis is that reducing cognitive load and providing visibility into the full process will improve conversion.
Variants
Control (A)
Description: Current 3-step checkout flow
Details:
- Step 1: Shipping address entry
- Step 2: Shipping method selection + payment information
- Step 3: Order review and confirmation
- Each step loads a new page
- Progress indicator shows current step
Screenshot/Mockup: [designs/checkout-control-v3.png]
Treatment (B)
Description: Single-page checkout with accordion sections
Details:
- All sections visible on one page (shipping, payment, review)
- Accordion UI: one section expanded at a time, others collapsed but visible
- Express payment buttons (Apple Pay, Google Pay) at top
- Shipping cost shown immediately based on cart
- Edit any section without losing data
Screenshot/Mockup: [designs/checkout-treatment-v2.png]
Metrics
Primary Metric
| Metric | Definition | Current Baseline | Minimum Detectable Effect |
|---|---|---|---|
| Checkout conversion rate | Orders completed / Checkout sessions started | 27% | 5% relative (1.35 pp absolute) |
Secondary Metrics
| Metric | Definition | Purpose |
|---|---|---|
| Checkout completion time | Median seconds from checkout start to order | Confirm UX improvement |
| Express payment usage | % of orders via Apple Pay / Google Pay | Track new feature adoption |
| Cart abandonment rate | Carts abandoned before checkout start | Ensure we're not shifting drop-off |
Guardrail Metrics
| Metric | Definition | Threshold |
|---|---|---|
| Average order value | Total revenue / Orders | Must not decrease by more than 2% |
| Payment failure rate | Failed payments / Payment attempts | Must not increase by more than 1pp |
| Support tickets (checkout) | CS tickets tagged "checkout" | Must not increase by more than 20% |
Sample Size & Duration
Sample Size Calculation
| Parameter | Value |
|---|---|
| Baseline conversion rate | 27% |
| Minimum detectable effect (MDE) | 5% relative (28.35% target) |
| Statistical significance (alpha) | 0.05 (one-tailed) |
| Statistical power (1-beta) | 0.80 |
| Users per variant | 9,800 |
| Total users needed | 19,600 |
Calculation performed using Evan Miller's sample size calculator, assuming one-tailed test (we only ship if treatment is better).
Duration Estimate
| Parameter | Value |
|---|---|
| Daily eligible traffic | 18,000 mobile checkout sessions/day |
| Traffic allocation | 80% to experiment (20% holdout for safety) |
| Users per day in experiment | 14,400 |
| Minimum duration | 2 days to reach sample size |
| Recommended duration | 14 days to capture weekly patterns and ensure stability |
We're running for 14 days despite reaching sample size in 2 days to:
- Capture full weekly shopping patterns (weekday vs. weekend)
- Allow time to detect delayed effects on returns/chargebacks
- Ensure novelty effect wears off
Audience Targeting
Inclusion Criteria
- Logged-in or guest users
- Mobile web (not native apps - app experiment runs separately)
- Users in US and Canada (payment methods configured)
- Cart value >= $10 (exclude micro-purchases)
Exclusion Criteria
- Employees (identified by email domain)
- Users enrolled in conflicting experiments (cart-upsell-test, payment-method-test)
- Users who have participated in checkout experiments in past 30 days
Traffic Allocation
| Variant | Allocation |
|---|---|
| Control (A) | 50% |
| Treatment (B) | 50% |
Success Criteria
Win (Ship Treatment)
Primary metric (checkout conversion) improves by >= 5% relative with p < 0.05, AND:
- Average order value does not decrease by more than 2%
- Payment failure rate does not increase by more than 1pp
- No critical bugs or UX issues identified
Action: Roll out to 100% of mobile web, begin desktop adaptation.
Loss (Keep Control)
Any of:
- Checkout conversion decreases with p < 0.05
- Any guardrail metric breaches threshold
- Critical UX issues discovered affecting > 1% of users
Action: Revert to control, analyze learnings, iterate on design.
Inconclusive (More Data Needed)
Primary metric change is between -5% and +5% relative and not statistically significant after 14 days.
Action: Extend experiment to 21 days if traffic allows. If still inconclusive, treat as neutral and decide based on qualitative factors (user feedback, operational simplicity).
Risks & Mitigations
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| Apple Pay integration issues | Medium | High | Test extensively in staging; 5% initial ramp with monitoring |
| Page load performance degradation | Low | Medium | Performance budget enforced; lazy-load payment forms |
| Users confused by accordion UX | Low | Medium | Added progress indicators and clear "Continue" buttons |
| Increased payment failures | Low | High | Same payment provider; monitor failure rate hourly |
Monitoring Plan
- Real-time dashboard: Checkout funnel by variant, updated every 5 minutes
- Alert thresholds:
- Payment failure rate > 5% in any 1-hour window
- Checkout conversion drops > 20% relative to control
- Error rate > 1% on any checkout action
- Rollback criteria: Any alert sustained for 30 minutes triggers automatic rollback
- Daily check-ins: Team reviews metrics at 10am daily for first 5 days
Implementation Notes
- Feature flag:
checkout_single_page_v1in LaunchDarkly - Instrumentation: New events
checkout_section_opened,checkout_section_completedfor funnel analysis - Cache invalidation: Clear checkout page cache at experiment start
- Mobile detection: User-Agent parsing; tablet = desktop experience
References
- Hypothesis Document: Mobile Checkout Improvement (internal doc link)
- Design Mockups (Figma link)
- Previous Experiment: Guest Checkout (results/guest-checkout-q3-2025.md) - 3% lift, informed this design
- User Research: Checkout Friction Study (research PDF)
Experiment Design: [Experiment Name]
Overview
| Field | Value |
|---|---|
| Experiment Name | [Short descriptive name] |
| Owner | [Name, role] |
| Start Date | [Planned start date] |
| End Date | [Planned end date] |
| Status | Draft / Ready / Running / Completed |
Hypothesis
<!-- Format: We believe [change] for [users] will [outcome] as measured by [metric] -->
We believe [proposed change]
for [target user segment]
will [expected outcome]
as measured by [primary metric]
Background
<!-- Why are we running this experiment? What's the context? -->
[Context explaining why this experiment matters and what led to the hypothesis]
Variants
Control (A)
Description: [What users currently experience]
Details:
- [Specific element 1]
- [Specific element 2]
Screenshot/Mockup: [Link or embed]
Treatment (B)
Description: [What users will experience in the new variant]
Details:
- [Specific change 1]
- [Specific change 2]
Screenshot/Mockup: [Link or embed]
Metrics
Primary Metric
| Metric | Definition | Current Baseline | Minimum Detectable Effect |
|---|---|---|---|
| [Metric name] | [How it's calculated] | [Current value] | [Smallest change we want to detect] |
Secondary Metrics
| Metric | Definition | Purpose |
|---|---|---|
| [Metric 1] | [Definition] | [Why we're tracking this] |
| [Metric 2] | [Definition] | [Why we're tracking this] |
Guardrail Metrics
<!-- Metrics that should NOT decrease -->
| Metric | Definition | Threshold |
|---|---|---|
| [Metric 1] | [Definition] | [Must not decrease by more than X%] |
| [Metric 2] | [Definition] | [Must not decrease by more than X%] |
Sample Size & Duration
Sample Size Calculation
| Parameter | Value |
|---|---|
| Baseline conversion rate | [X%] |
| Minimum detectable effect (MDE) | [X% relative / X pp absolute] |
| Statistical significance (alpha) | [0.05 typical] |
| Statistical power (1-beta) | [0.80 typical] |
| Users per variant | [Calculated number] |
| Total users needed | [Sum across variants] |
Duration Estimate
| Parameter | Value |
|---|---|
| Daily eligible traffic | [X users/day] |
| Traffic allocation | [X% to experiment] |
| Users per day in experiment | [Calculated] |
| Minimum duration | [X days to reach sample size] |
| Recommended duration | [X days, accounting for weekly patterns] |
Audience Targeting
Inclusion Criteria
- [Criterion 1: e.g., "All logged-in users"]
- [Criterion 2: e.g., "Users in US and Canada"]
- [Criterion 3: e.g., "Users on mobile web"]
Exclusion Criteria
- [Exclusion 1: e.g., "Employees and internal testers"]
- [Exclusion 2: e.g., "Users in active experiments that may conflict"]
Traffic Allocation
| Variant | Allocation |
|---|---|
| Control (A) | [X%] |
| Treatment (B) | [X%] |
Success Criteria
<!-- Define BEFORE the experiment starts what each outcome means -->
Win (Ship Treatment)
[Conditions that constitute a clear win for the treatment, e.g., "Primary metric improves by >= MDE with p < 0.05, and no guardrail metrics regress beyond threshold"]
Loss (Keep Control)
[Conditions that indicate treatment is worse, e.g., "Primary metric decreases with p < 0.05, OR any guardrail metric regresses beyond threshold"]
Inconclusive (More Data Needed)
[Conditions that require further investigation, e.g., "Primary metric change is not statistically significant after full duration"]
Risks & Mitigations
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| [Risk 1] | High/Med/Low | High/Med/Low | [How we'll address it] |
| [Risk 2] | High/Med/Low | High/Med/Low | [How we'll address it] |
Monitoring Plan
- [What we'll monitor during the experiment]
- [Alert thresholds that would trigger early review]
- [Rollback criteria]
Implementation Notes
<!-- Technical details for engineering -->
- [Feature flag name/ID]
- [Instrumentation requirements]
- [Any technical considerations]
References
- [Link to related hypothesis document]
- [Link to design mockups]
- [Link to previous related experiments]
Related skills
How it compares
Use this skill to scope a future A/B test rather than analyzing completed experiment results or writing analytics instrumentation specs.
FAQ
What should exist before using measure-experiment-design?
measure-experiment-design expects a framed, testable hypothesis before scoping variants and metrics. The skill directs teams to define-hypothesis first when the underlying claim is not yet articulated.
What does measure-experiment-design output include?
measure-experiment-design fills an experiment design template with hypothesis, variants, primary and guardrail metrics, sample size, duration, targeting, success criteria, risks, and implementation notes. Version 2.1.0 documents 11 output sections.
Which statistical defaults does measure-experiment-design use?
measure-experiment-design typically assumes a 0.05 significance level and 0.80 statistical power when calculating sample size. Teams document minimum detectable effect and traffic assumptions inside the design before launch.