A/B Test Designer
Design statistically valid A/B tests with clear hypotheses, proper sample sizing, and actionable analysis plans.
Before You Start
Check for product marketing context first:
If .claude/product-context.md exists, read it before asking questions. Use that context and only ask for information not already covered.
Phase 1: Information Gathering
Collect test context by asking the user focused questions in batches of 2-3.
Required Context
What do you want to test? Ask: "What change are you considering? Describe the current version and what you want to try differently."
Why this test? Ask: "What made you want to test this? Is it based on data, user feedback, a hunch, or something else?"
Where does this live? — Use AskUserQuestion with options:
- Landing page / marketing page
- Pricing page
- Signup / onboarding flow
- Email (subject line, copy, CTA)
- In-product feature
- Ad creative or copy
Current performance — Ask: "What's the current conversion rate (or best estimate) for what you're testing? And roughly how much traffic or volume does this page/flow get per week?"
Success metric — Ask: "What's the primary metric you'll use to judge the winner? (e.g., click-through rate, signup rate, revenue per visitor, activation rate)"
Secondary metrics — Ask: "Any secondary metrics to watch? And are there any guardrail metrics that should NOT get worse? (e.g., support tickets, refund rate, bounce rate)"
Minimum detectable effect — Use AskUserQuestion with options:
- Small improvement is worth it (5-10% lift)
- Need a moderate improvement (10-20% lift)
- Only care about big wins (20%+ lift)
- Not sure — help me decide
Testing tools — Use AskUserQuestion with options:
- PostHog
- Optimizely / VWO
- Google Optimize (or successor)
- LaunchDarkly / feature flags
- Custom / built in-house
- No tool yet — need recommendation
Constraints — Ask: "Any constraints? (e.g., limited dev resources, can't change certain elements, seasonal traffic patterns, stakeholder opinions)"
Phase 2: Test Design
Based on gathered context, design the complete experiment.
Hypothesis
Structure as:
Because [observation/data],
we believe [specific change]
will cause [expected outcome]
for [audience segment].
We'll know this is true when [primary metric] improves by [threshold].
Sample Size & Duration
Use this reference for planning:
| Baseline Rate |
10% Lift |
20% Lift |
50% Lift |
| 1% |
150K/variant |
39K/variant |
6K/variant |
| 3% |
47K/variant |
12K/variant |
2K/variant |
| 5% |
27K/variant |
7K/variant |
1.2K/variant |
| 10% |
12K/variant |
3K/variant |
550/variant |
Calculate estimated test duration based on the user's traffic volume.
Variant Design
- Describe control (A) and variant (B) in specific detail
- Single variable change — isolate what you're testing
- Bold enough to produce a measurable difference
Traffic Allocation
- Default: 50/50 split
- If risk is high: start 90/10 or 80/20 and ramp up
- Ensure user consistency (same visitor sees same variant)
Analysis Plan
- Pre-commit to sample size — no peeking and stopping early
- 95% confidence threshold (p < 0.05)
- Plan for: significant winner, significant loser, and inconclusive scenarios
Phase 3: Deliverables
Generate and save:
split-test-plan.md — Complete test plan with hypothesis, variants, sample size, duration estimate, metrics, and analysis plan
Present a summary and suggest next steps.
Guidelines
- The #1 mistake is stopping tests early because results "look good" — pre-commit to sample size
- If traffic is too low for statistical significance, recommend bigger/bolder changes or qualitative testing instead
- One test at a time per page/flow unless traffic supports concurrent tests
- Document every test — even losers teach you something
- Always ask "what will we do with the results?" before starting
User Request
$ARGUMENTS
1---2name: ab-test3description: When the user wants to plan, design, or set up an A/B test or experiment. Also use when the user mentions "A/B test", "split test", "experiment", "test this change", "hypothesis", "multivariate test", "conversion test", or "which version is better."4---56# A/B Test Designer78Design statistically valid A/B tests with clear hypotheses, proper sample sizing, and actionable analysis plans.910## Before You Start1112**Check for product marketing context first:**13If `.claude/product-context.md` exists, read it before asking questions. Use that context and only ask for information not already covered.1415## Phase 1: Information Gathering1617Collect test context by asking the user focused questions in batches of 2-3.1819### Required Context20211. **What do you want to test?** Ask: "What change are you considering? Describe the current version and what you want to try differently."22232. **Why this test?** Ask: "What made you want to test this? Is it based on data, user feedback, a hunch, or something else?"24253. **Where does this live?** — Use `AskUserQuestion` with options:26 - Landing page / marketing page27 - Pricing page28 - Signup / onboarding flow29 - Email (subject line, copy, CTA)30 - In-product feature31 - Ad creative or copy32334. **Current performance** — Ask: "What's the current conversion rate (or best estimate) for what you're testing? And roughly how much traffic or volume does this page/flow get per week?"34355. **Success metric** — Ask: "What's the primary metric you'll use to judge the winner? (e.g., click-through rate, signup rate, revenue per visitor, activation rate)"36376. **Secondary metrics** — Ask: "Any secondary metrics to watch? And are there any guardrail metrics that should NOT get worse? (e.g., support tickets, refund rate, bounce rate)"38397. **Minimum detectable effect** — Use `AskUserQuestion` with options:40 - Small improvement is worth it (5-10% lift)41 - Need a moderate improvement (10-20% lift)42 - Only care about big wins (20%+ lift)43 - Not sure — help me decide44458. **Testing tools** — Use `AskUserQuestion` with options:46 - PostHog47 - Optimizely / VWO48 - Google Optimize (or successor)49 - LaunchDarkly / feature flags50 - Custom / built in-house51 - No tool yet — need recommendation52539. **Constraints** — Ask: "Any constraints? (e.g., limited dev resources, can't change certain elements, seasonal traffic patterns, stakeholder opinions)"5455## Phase 2: Test Design5657Based on gathered context, design the complete experiment.5859### Hypothesis6061Structure as:62```63Because [observation/data],64we believe [specific change]65will cause [expected outcome]66for [audience segment].67We'll know this is true when [primary metric] improves by [threshold].68```6970### Sample Size & Duration7172Use this reference for planning:7374| Baseline Rate | 10% Lift | 20% Lift | 50% Lift |75|---------------|----------|----------|----------|76| 1% | 150K/variant | 39K/variant | 6K/variant |77| 3% | 47K/variant | 12K/variant | 2K/variant |78| 5% | 27K/variant | 7K/variant | 1.2K/variant |79| 10% | 12K/variant | 3K/variant | 550/variant |8081Calculate estimated test duration based on the user's traffic volume.8283### Variant Design84- Describe control (A) and variant (B) in specific detail85- Single variable change — isolate what you're testing86- Bold enough to produce a measurable difference8788### Traffic Allocation89- Default: 50/50 split90- If risk is high: start 90/10 or 80/20 and ramp up91- Ensure user consistency (same visitor sees same variant)9293### Analysis Plan94- Pre-commit to sample size — no peeking and stopping early95- 95% confidence threshold (p < 0.05)96- Plan for: significant winner, significant loser, and inconclusive scenarios9798## Phase 3: Deliverables99100Generate and save:1011021. **`split-test-plan.md`** — Complete test plan with hypothesis, variants, sample size, duration estimate, metrics, and analysis plan103104Present a summary and suggest next steps.105106## Guidelines107108- The #1 mistake is stopping tests early because results "look good" — pre-commit to sample size109- If traffic is too low for statistical significance, recommend bigger/bolder changes or qualitative testing instead110- One test at a time per page/flow unless traffic supports concurrent tests111- Document every test — even losers teach you something112- Always ask "what will we do with the results?" before starting113114## User Request115116$ARGUMENTS