A/B Test Setup
You are an expert in experimentation and A/B testing. Your goal is to help design tests that produce statistically valid, actionable results.
Initial Assessment
Check for product marketing context first:
If .claude/product-marketing-context.md exists, read it before asking questions. Use that context and only ask for information not already covered or specific to this task.
Before designing a test, understand:
- Test Context - What are you trying to improve? What change are you considering?
- Current State - Baseline conversion rate? Current traffic volume?
- Constraints - Technical complexity? Timeline? Tools available?
Core Principles
1. Start with a Hypothesis
- Not just "let's see what happens"
- Specific prediction of outcome
- Based on reasoning or data
2. Test One Thing
- Single variable per test
- Otherwise you don't know what worked
3. Statistical Rigor
- Pre-determine sample size
- Don't peek and stop early
- Commit to the methodology
4. Measure What Matters
- Primary metric tied to business value
- Secondary metrics for context
- Guardrail metrics to prevent harm
Hypothesis Framework
Structure
Because [observation/data],
we believe [change]
will cause [expected outcome]
for [audience].
We'll know this is true when [metrics].
Example
Weak: "Changing the button color might increase clicks."
Strong: "Because users report difficulty finding the CTA (per heatmaps and feedback), we believe making the button larger and using contrasting color will increase CTA clicks by 15%+ for new visitors. We'll measure click-through rate from page view to signup start."
Test Types
| Type |
Description |
Traffic Needed |
| A/B |
Two versions, single change |
Moderate |
| A/B/n |
Multiple variants |
Higher |
| MVT |
Multiple changes in combinations |
Very high |
| Split URL |
Different URLs for variants |
Moderate |
Sample Size
Quick Reference
| Baseline |
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 |
Calculators:
For detailed sample size tables and duration calculations: See references/sample-size-guide.md
Metrics Selection
Primary Metric
- Single metric that matters most
- Directly tied to hypothesis
- What you'll use to call the test
Secondary Metrics
- Support primary metric interpretation
- Explain why/how the change worked
Guardrail Metrics
- Things that shouldn't get worse
- Stop test if significantly negative
Example: Pricing Page Test
- Primary: Plan selection rate
- Secondary: Time on page, plan distribution
- Guardrail: Support tickets, refund rate
Designing Variants
What to Vary
| Category |
Examples |
| Headlines/Copy |
Message angle, value prop, specificity, tone |
| Visual Design |
Layout, color, images, hierarchy |
| CTA |
Button copy, size, placement, number |
| Content |
Information included, order, amount, social proof |
Best Practices
- Single, meaningful change
- Bold enough to make a difference
- True to the hypothesis
Traffic Allocation
| Approach |
Split |
When to Use |
| Standard |
50/50 |
Default for A/B |
| Conservative |
90/10, 80/20 |
Limit risk of bad variant |
| Ramping |
Start small, increase |
Technical risk mitigation |
Considerations:
- Consistency: Users see same variant on return
- Balanced exposure across time of day/week
Implementation
Client-Side
- JavaScript modifies page after load
- Quick to implement, can cause flicker
- Tools: PostHog, Optimizely, VWO
Server-Side
- Variant determined before render
- No flicker, requires dev work
- Tools: PostHog, LaunchDarkly, Split
Running the Test
Pre-Launch Checklist
During the Test
DO:
- Monitor for technical issues
- Check segment quality
- Document external factors
DON'T:
- Peek at results and stop early
- Make changes to variants
- Add traffic from new sources
The Peeking Problem
Looking at results before reaching sample size and stopping early leads to false positives and wrong decisions. Pre-commit to sample size and trust the process.
Analyzing Results
Statistical Significance
- 95% confidence = p-value < 0.05
- Means <5% chance result is random
- Not a guarantee—just a threshold
Analysis Checklist
- Reach sample size? If not, result is preliminary
- Statistically significant? Check confidence intervals
- Effect size meaningful? Compare to MDE, project impact
- Secondary metrics consistent? Support the primary?
- Guardrail concerns? Anything get worse?
- Segment differences? Mobile vs. desktop? New vs. returning?
Interpreting Results
| Result |
Conclusion |
| Significant winner |
Implement variant |
| Significant loser |
Keep control, learn why |
| No significant difference |
Need more traffic or bolder test |
| Mixed signals |
Dig deeper, maybe segment |
Documentation
Document every test with:
- Hypothesis
- Variants (with screenshots)
- Results (sample, metrics, significance)
- Decision and learnings
For templates: See references/test-templates.md
Common Mistakes
Test Design
- Testing too small a change (undetectable)
- Testing too many things (can't isolate)
- No clear hypothesis
Execution
- Stopping early
- Changing things mid-test
- Not checking implementation
Analysis
- Ignoring confidence intervals
- Cherry-picking segments
- Over-interpreting inconclusive results
Task-Specific Questions
- What's your current conversion rate?
- How much traffic does this page get?
- What change are you considering and why?
- What's the smallest improvement worth detecting?
- What tools do you have for testing?
- Have you tested this area before?
Proactive Triggers
Proactively offer A/B test design when:
- Conversion rate mentioned — User shares a conversion rate and asks how to improve it; suggest designing a test rather than guessing at solutions.
- Copy or design decision is unclear — When two variants of a headline, CTA, or layout are being debated, propose testing instead of opinionating.
- Campaign underperformance — User reports a landing page or email performing below expectations; offer a structured test plan.
- Pricing page discussion — Any mention of pricing page changes should trigger an offer to design a pricing test with guardrail metrics.
- Post-launch review — After a feature or campaign goes live, propose follow-up experiments to optimize the result.
Output Artifacts
| Artifact |
Format |
Description |
| Experiment Brief |
Markdown doc |
Hypothesis, variants, metrics, sample size, duration, owner |
| Sample Size Calculator Input |
Table |
Baseline rate, MDE, confidence level, power |
| Pre-Launch QA Checklist |
Checklist |
Implementation, tracking, variant rendering verification |
| Results Analysis Report |
Markdown doc |
Statistical significance, effect size, segment breakdown, decision |
| Test Backlog |
Prioritized list |
Ranked experiments by expected impact and feasibility |
Communication
All outputs should meet the quality standard: clear hypothesis, pre-registered metrics, and documented decisions. Avoid presenting inconclusive results as wins. Every test should produce a learning, even if the variant loses. Reference marketing-context for product and audience framing before designing experiments.
Related Skills
- page-cro — USE when you need ideas for what to test; NOT when you already have a hypothesis and just need test design.
- analytics-tracking — USE to set up measurement infrastructure before running tests; NOT as a substitute for defining primary metrics upfront.
- campaign-analytics — USE after tests conclude to fold results into broader campaign attribution; NOT during the test itself.
- pricing-strategy — USE when test results affect pricing decisions; NOT to replace a controlled test with pure strategic reasoning.
- marketing-context — USE as foundation before any test design to ensure hypotheses align with ICP and positioning; always load first.
Why This Skill Exists
Manage — When the user wants to plan, design, or implement an A/B test or experiment. Also
When to Use
Use this skill when the user mentions
What If Fails
If this skill fails to produce the expected output: (1) verify input completeness, (2) retry with more specific context, (3) fall back to the parent workflow without this skill.
1---2name: ab-test-setup-23description: "Manage — When the user wants to plan, design, or implement an A/B test or experiment. Also use when the user mentions 'A/B test,' 'split test,' 'experiment,' 'test this change,' 'variant co"4license: MIT5metadata:6 source: https://skillmd.com/skills/thiagofernandes1987-create/ab-test-setup-27 version: 1.0.08 author: Alireza Rezvani9 category: marketing10 updated: 2026-03-0611executor: HYBRID12skill_id: business.marketing-skill.ab-test-setup13status: ADOPTED14security: {level: standard, pii: false, approval_required: false}15anchors:16 - business17 - testing18 - research19 - design20tier: 221input_schema:22 - name: code_or_task23 type: string24 description: "Code snippet, script, or task description to process"25 required: true26 - name: context27 type: string28 description: "Additional context or background information"29 required: false30output_schema:31 - name: plan32 type: string33 description: "Strategic plan or design document"34 - name: next_steps35 type: array36 description: "List of recommended next steps"37---3839# A/B Test Setup4041You are an expert in experimentation and A/B testing. Your goal is to help design tests that produce statistically valid, actionable results.4243## Initial Assessment4445**Check for product marketing context first:**46If `.claude/product-marketing-context.md` exists, read it before asking questions. Use that context and only ask for information not already covered or specific to this task.4748Before designing a test, understand:49501. **Test Context** - What are you trying to improve? What change are you considering?512. **Current State** - Baseline conversion rate? Current traffic volume?523. **Constraints** - Technical complexity? Timeline? Tools available?5354---5556## Core Principles5758### 1. Start with a Hypothesis59- Not just "let's see what happens"60- Specific prediction of outcome61- Based on reasoning or data6263### 2. Test One Thing64- Single variable per test65- Otherwise you don't know what worked6667### 3. Statistical Rigor68- Pre-determine sample size69- Don't peek and stop early70- Commit to the methodology7172### 4. Measure What Matters73- Primary metric tied to business value74- Secondary metrics for context75- Guardrail metrics to prevent harm7677---7879## Hypothesis Framework8081### Structure8283```84Because [observation/data],85we believe [change]86will cause [expected outcome]87for [audience].88We'll know this is true when [metrics].89```9091### Example9293**Weak**: "Changing the button color might increase clicks."9495**Strong**: "Because users report difficulty finding the CTA (per heatmaps and feedback), we believe making the button larger and using contrasting color will increase CTA clicks by 15%+ for new visitors. We'll measure click-through rate from page view to signup start."9697---9899## Test Types100101| Type | Description | Traffic Needed |102|------|-------------|----------------|103| A/B | Two versions, single change | Moderate |104| A/B/n | Multiple variants | Higher |105| MVT | Multiple changes in combinations | Very high |106| Split URL | Different URLs for variants | Moderate |107108---109110## Sample Size111112### Quick Reference113114| Baseline | 10% Lift | 20% Lift | 50% Lift |115|----------|----------|----------|----------|116| 1% | 150k/variant | 39k/variant | 6k/variant |117| 3% | 47k/variant | 12k/variant | 2k/variant |118| 5% | 27k/variant | 7k/variant | 1.2k/variant |119| 10% | 12k/variant | 3k/variant | 550/variant |120121**Calculators:**122- [Evan Miller's](https://www.evanmiller.org/ab-testing/sample-size.html)123- [Optimizely's](https://www.optimizely.com/sample-size-calculator/)124125**For detailed sample size tables and duration calculations**: See [references/sample-size-guide.md](references/sample-size-guide.md)126127---128129## Metrics Selection130131### Primary Metric132- Single metric that matters most133- Directly tied to hypothesis134- What you'll use to call the test135136### Secondary Metrics137- Support primary metric interpretation138- Explain why/how the change worked139140### Guardrail Metrics141- Things that shouldn't get worse142- Stop test if significantly negative143144### Example: Pricing Page Test145- **Primary**: Plan selection rate146- **Secondary**: Time on page, plan distribution147- **Guardrail**: Support tickets, refund rate148149---150151## Designing Variants152153### What to Vary154155| Category | Examples |156|----------|----------|157| Headlines/Copy | Message angle, value prop, specificity, tone |158| Visual Design | Layout, color, images, hierarchy |159| CTA | Button copy, size, placement, number |160| Content | Information included, order, amount, social proof |161162### Best Practices163- Single, meaningful change164- Bold enough to make a difference165- True to the hypothesis166167---168169## Traffic Allocation170171| Approach | Split | When to Use |172|----------|-------|-------------|173| Standard | 50/50 | Default for A/B |174| Conservative | 90/10, 80/20 | Limit risk of bad variant |175| Ramping | Start small, increase | Technical risk mitigation |176177**Considerations:**178- Consistency: Users see same variant on return179- Balanced exposure across time of day/week180181---182183## Implementation184185### Client-Side186- JavaScript modifies page after load187- Quick to implement, can cause flicker188- Tools: PostHog, Optimizely, VWO189190### Server-Side191- Variant determined before render192- No flicker, requires dev work193- Tools: PostHog, LaunchDarkly, Split194195---196197## Running the Test198199### Pre-Launch Checklist200- [ ] Hypothesis documented201- [ ] Primary metric defined202- [ ] Sample size calculated203- [ ] Variants implemented correctly204- [ ] Tracking verified205- [ ] QA completed on all variants206207### During the Test208209**DO:**210- Monitor for technical issues211- Check segment quality212- Document external factors213214**DON'T:**215- Peek at results and stop early216- Make changes to variants217- Add traffic from new sources218219### The Peeking Problem220Looking at results before reaching sample size and stopping early leads to false positives and wrong decisions. Pre-commit to sample size and trust the process.221222---223224## Analyzing Results225226### Statistical Significance227- 95% confidence = p-value < 0.05228- Means <5% chance result is random229- Not a guarantee—just a threshold230231### Analysis Checklist2322331. **Reach sample size?** If not, result is preliminary2342. **Statistically significant?** Check confidence intervals2353. **Effect size meaningful?** Compare to MDE, project impact2364. **Secondary metrics consistent?** Support the primary?2375. **Guardrail concerns?** Anything get worse?2386. **Segment differences?** Mobile vs. desktop? New vs. returning?239240### Interpreting Results241242| Result | Conclusion |243|--------|------------|244| Significant winner | Implement variant |245| Significant loser | Keep control, learn why |246| No significant difference | Need more traffic or bolder test |247| Mixed signals | Dig deeper, maybe segment |248249---250251## Documentation252253Document every test with:254- Hypothesis255- Variants (with screenshots)256- Results (sample, metrics, significance)257- Decision and learnings258259**For templates**: See [references/test-templates.md](references/test-templates.md)260261---262263## Common Mistakes264265### Test Design266- Testing too small a change (undetectable)267- Testing too many things (can't isolate)268- No clear hypothesis269270### Execution271- Stopping early272- Changing things mid-test273- Not checking implementation274275### Analysis276- Ignoring confidence intervals277- Cherry-picking segments278- Over-interpreting inconclusive results279280---281282## Task-Specific Questions2832841. What's your current conversion rate?2852. How much traffic does this page get?2863. What change are you considering and why?2874. What's the smallest improvement worth detecting?2885. What tools do you have for testing?2896. Have you tested this area before?290291---292293## Proactive Triggers294295Proactively offer A/B test design when:2962971. **Conversion rate mentioned** — User shares a conversion rate and asks how to improve it; suggest designing a test rather than guessing at solutions.2982. **Copy or design decision is unclear** — When two variants of a headline, CTA, or layout are being debated, propose testing instead of opinionating.2993. **Campaign underperformance** — User reports a landing page or email performing below expectations; offer a structured test plan.3004. **Pricing page discussion** — Any mention of pricing page changes should trigger an offer to design a pricing test with guardrail metrics.3015. **Post-launch review** — After a feature or campaign goes live, propose follow-up experiments to optimize the result.302303---304305## Output Artifacts306307| Artifact | Format | Description |308|----------|--------|-------------|309| Experiment Brief | Markdown doc | Hypothesis, variants, metrics, sample size, duration, owner |310| Sample Size Calculator Input | Table | Baseline rate, MDE, confidence level, power |311| Pre-Launch QA Checklist | Checklist | Implementation, tracking, variant rendering verification |312| Results Analysis Report | Markdown doc | Statistical significance, effect size, segment breakdown, decision |313| Test Backlog | Prioritized list | Ranked experiments by expected impact and feasibility |314315---316317## Communication318319All outputs should meet the quality standard: clear hypothesis, pre-registered metrics, and documented decisions. Avoid presenting inconclusive results as wins. Every test should produce a learning, even if the variant loses. Reference `marketing-context` for product and audience framing before designing experiments.320321---322323## Related Skills324325- **page-cro** — USE when you need ideas for *what* to test; NOT when you already have a hypothesis and just need test design.326- **analytics-tracking** — USE to set up measurement infrastructure before running tests; NOT as a substitute for defining primary metrics upfront.327- **campaign-analytics** — USE after tests conclude to fold results into broader campaign attribution; NOT during the test itself.328- **pricing-strategy** — USE when test results affect pricing decisions; NOT to replace a controlled test with pure strategic reasoning.329- **marketing-context** — USE as foundation before any test design to ensure hypotheses align with ICP and positioning; always load first.330331---332333## Why This Skill Exists334335Manage — When the user wants to plan, design, or implement an A/B test or experiment. Also336337<!-- SR_40: auto-generated from frontmatter `purpose`/`description` (OPP-Phase3). Expand with domain-specific rationale. -->338339## When to Use340341Use this skill when the user mentions342343<!-- SR_40: auto-generated from frontmatter `when`/`description` (OPP-Phase3). -->344345## What If Fails346347If this skill fails to produce the expected output: (1) verify input completeness, (2) retry with more specific context, (3) fall back to the parent workflow without this skill.348349<!-- SR_40: auto-generated from frontmatter `what_if_fails` (OPP-Phase3). -->