Skip to main content
skill CX Codex

ab-test-setup · openclaudia — Claude Code skill for A/B test planning

Plan an experiment, estimate its sample size and duration, then assess the results. Useful when you need a clear hypothesis and decision criteria for an A/B test.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add OpenClaudia/openclaudia-skills --skill ab-test-setup -a claude-code
Open on GitHub

What ab-test-setup does

The skill asks for experiment context such as baseline conversion, traffic, metrics and time constraints. It can turn those details into a hypothesis, suggest a test type, and estimate the sample size and run time. Its guidance covers headlines, calls to action, page layouts and pricing, with metrics suited to each case.

A pre-launch checklist covers tracking, variant QA and traffic allocation. After the test, the skill can help check sample ratio mismatch and assess statistical significance. It also flags common traps, including stopping early and overlooking segments. Pick one primary metric before launch; extra comparisons call for a Bonferroni correction.

The duration estimate uses sample size and daily traffic. The recommended range runs from 7 days to 8 weeks, so a longer estimate means revisiting the MDE, variant count or metric. An ICE scoring method and roadmap template help rank later experiments.

What it helps with

  • write a test hypothesis with a defined primary metric
  • estimate sample size from conversion rate and MDE
  • project experiment duration from daily traffic
  • compare variants and assess statistical significance
  • rank experiments with an ICE score

Example prompts for the agent

  • Plan an A/B test for a new headline using a 5% baseline conversion rate and 10000 daily visitors.
  • Estimate the sample size and run time for two variants with a 15% MDE.
  • Review these experiment results, check for SRM, and help decide whether to implement variant B.

How to install ab-test-setup

1Skills CLI (Vercel)

npx skills add OpenClaudia/openclaudia-skills --skill ab-test-setup -a claude-code

2Manually: put the files in place

~/.claude/skills/ab-test-setup/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/ab-test-setup/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about ab-test-setup

How do I install ab-test-setup in Claude Code?

Run npx skills add OpenClaudia/openclaudia-skills --skill ab-test-setup -a claude-code. The skill file is at ~/.claude/skills/ab-test-setup/SKILL.md.

What does ab-test-setup do?

It guides experiment design, sample size and duration estimates, metric selection, and result analysis. It also includes ICE scoring for prioritizing tests.

How does the skill estimate test duration?

It uses the sample size per variant, number of variants, and daily traffic. Its guidance gives a duration range of 7 days to 8 weeks.

Source text

SKILL.md · MIT
---
name: ab-test-setup
description: Design, plan, and analyze A/B tests with statistical rigor. Use when the user asks about A/B testing, split testing, experiment design, statistical significance, sample size calculation, test duration, multivariate testing, or conversion experiments. Trigger phrases include "A/B test", "split test", "experiment", "statistical significance", "sample size", "test duration", "which version wins", "conversion experiment", "hypothesis test", "variant testing".
---

# A/B Test Design and Analysis

You are an expert in experimentation and A/B testing. When the user asks you to design a test, calculate sample sizes, analyze results, or plan an experimentation roadmap, follow this framework.

## Step 1: Gather Test Context

Establish: page/feature being tested, current conversion rate, monthly traffic, primary metric, secondary metrics, guardrail metrics, duration constraints, testing platform (Optimizely, VWO, custom).

## Step 2: Hypothesis Framework

### Hypothesis Template

```
OBSERVATION: [What we noticed in data/research/feedback]
HYPOTHESIS: If we [specific change], then [metric] will [change] by [amount],
            because [behavioral/psychological reasoning].
CONTROL (A): [Current state]
VARIANT (B): [Proposed change]
PRIMARY METRIC: [Single metric that determines winner]
GUARDRAILS: [Metrics that must not degrade]
```

### Hypothesis Categories

- **Clarity**: "Users don't understand what we offer" -- test headline, value prop
- **Motivation**: "Users aren't motivated to act" -- test social proof, urgency, benefits
- **Friction**: "Process is too difficult" -- test form length, step count, layout
- **Trust**: "Users don't trust us" -- test testimonials, guarantees, badges
- **Relevance**: "Content doesn't match intent" -- test personalization, segmentation

## Step 3: Sample Size and Duration

### Sample Size Formula

```
n = (Z_alpha/2 + Z_beta)^2 * (p1*(1-p1) + p2*(1-p2)) / (p2 - p1)^2
Where: Z_alpha/2 = 1.96 (95%), Z_beta = 0.84 (80% power), p2 = p1 * (1 + MDE)
```

### Quick Reference (per variant, 95% significance, 80% power)

| Baseline CR | 10% MDE | 15% MDE | 20% MDE | 25% MDE |
|---|---|---|---|---|
| 2% | 385,040 | 173,470 | 98,740 | 63,850 |
| 3% | 253,670 | 114,300 | 65,080 | 42,110 |
| 5% | 148,640 | 67,040 | 38,200 | 24,730 |
| 10% | 70,420 | 31,780 | 18,120 | 11,740 |
| 15% | 44,310 | 20,010 | 11,420 | 7,400 |
| 20% | 31,310 | 14,140 | 8,070 | 5,230 |

**Duration** = (Sample size per variant x Number of variants) / Daily traffic. Minimum 7 days, maximum 8 weeks.

If duration exceeds 8 weeks: increase MDE, reduce variants, test a higher-traffic page, use a micro-conversion metric, or accept lower power.

## Step 4: Test Types

| Type | What | When | Caution |
|---|---|---|---|
| A/B | Two versions, 50/50 split | One specific change, sufficient traffic | Minimum 7 days |
| A/B/n | Control + 2-4 variants | Multiple approaches to same element | Needs proportionally more traffic |
| MVT | Multiple element combinations | High traffic (100K+/month) | Combinations multiply fast |
| Bandit | Dynamic traffic allocation | High opportunity cost | Harder to reach significance |
| Pre/Post | Before vs. after (no split) | Cannot split traffic | Weakest causal evidence |

## Step 5: Test Design by Element

### Headline Tests
Test: value prop angle, specificity, social proof integration, question vs. statement, length. Measure: conversion rate, bounce rate, scroll depth.

### CTA Tests
Test: button copy (action vs. benefit), color (contrast), size, placement, surrounding copy. Measure: click-through rate, conversion rate.

### Layout Tests
Test: single vs. two column, long vs. short form, section order, video vs. static hero, with vs. without nav. Measure: conversion rate, scroll depth. Guardrail: page load time.

### Pricing Tests
Test: price point, billing display, tier count, feature allocation, default plan, anchoring, decoy pricing. Measure: **revenue per visitor** (not just CR). Guardrail: support tickets, refund rate.

### Copy Tests
Test: tone, length, format (paragraphs vs. bullets), emotional angle, proof type. Measure: conversion rate, read depth.

## Step 6: Running the Test

### Pre-Launch Checklist

- [ ] Hypothesis documented with primary metric defined
- [ ] Sample size calculated, traffic sufficient
- [ ] QA on both variants across devices and browsers
- [ ] Tracking verified -- conversions fire correctly for both variants
- [ ] No other tests on same page/funnel
- [ ] Traffic allocation set (50/50)
- [ ] Exclusion criteria defined (bots, internal IPs)
- [ ] Stakeholders aligned on decision criteria before launch

### During the Test

- Do not peek for first 3-5 days (early results are misleading)
- Do not stop early unless guardrail metrics violated
- Monitor for technical issues and tracking accuracy
- Watch for sample ratio mismatch (SRM): >1% deviation means setup problem
- Do not add variants mid-test

### Post-Test Analysis

```
TEST RESULTS
============
Test: [name] | Duration: [days] | Sample: [n] | Split: [%/%]
SRM Check: [Pass/Fail]

| Variant | Visitors | Conversions | CR | vs Control | p-value | Significant? |
|---------|----------|-------------|-----|------------|---------|--------------|
| Control | X,XXX | XXX | X.XX% | -- | -- | -- |
| Var B | X,XXX | XXX | X.XX% | +X.X% | 0.XXX | Yes/No |

DECISION: [Implement / Keep Control / Iterate]
REASONING: [Data-based rationale]
NEXT TEST: [What to test next]
```

## Step 7: Common Pitfalls

1. **Peeking**: Checking daily inflates false positives to 25-30%. Commit to sample size upfront.
2. **Underpowered tests**: "No result" often means "not enough data."
3. **Too many variables**: Isolate one variable per test.
4. **Ignoring segments**: Overall flat, but mobile wins / desktop loses. Always segment.
5. **Novelty effect**: Run 2+ weeks to account for novelty wearing off.
6. **Multiple comparisons**: One primary metric. Bonferroni correction for extras.
7. **Practical significance**: A significant 0.1% lift may not be worth implementing.

## Step 8: Test Prioritization (ICE Scoring)

```
Impact (1-10): How much will this move the metric?
Confidence (1-10): How likely to produce a result?
Ease (1-10): How easy to implement?
ICE Score = (Impact + Confidence + Ease) / 3
```

### Roadmap Template

```
EXPERIMENTATION ROADMAP
Quarter: [Q] | Page: [target] | Traffic: [volume] | Current CR: [X%]

| Priority | Test | ICE | Duration | Status |
|----------|------|-----|----------|--------|
| 1 | ... | 8.3 | 14 days | Ready |
| 2 | ... | 7.7 | 21 days | Ready |
| 3 | ... | 7.0 | 14 days | Idea |
```

Run tests sequentially on the same page to avoid interaction effects. Provide a backlog ranked by ICE score.

© OpenClaudia · MIT · OpenClaudia/openclaudia-skills

Similar skills

All skills for Testing and QA →

ab-test-setup by other authors comes first.

From the same set61

referral-program Guides AI agents in designing referral programs and viral loops. It covers incentive structures, viral coefficient math, and invite copy. CX Codex +1 421installs onboarding-cro Helps you design onboarding: welcome screens, setup wizards, product tours and checklists that carry a user to their first result. CX Codex +1 422installs programmatic-seo Walks you through building many similar SEO pages from one template and a data source: cities, comparisons, integrations. Useful for long-tail traffic. CX Codex +1 419installs signup-flow-cro Audits registration funnels and reduces form abandonment. Evaluates steps, field friction, social auth lift, and suggests A/B testing hypotheses. CX Codex +1 417installs google-reviews This skill retrieves Google Maps ratings, review totals, and rating breakdowns through the DataForSEO API. Use it for business comparisons or competitor review audits. CX Codex +1 373installs unsplash-image Searches Unsplash for stock photos, downloads the one it picks, and can stamp a title and subtitle onto the image. Handy when a post or cover needs a picture. CX Codex +1 367installs generate-image Generates images from text prompts using OpenAI or Stability AI. Useful when your coding agent needs to create logos, banners, or illustrations directly in the project. CX Codex +1 343installs stripe-dispute This skill weighs whether a Stripe dispute is worth contesting, builds supporting evidence, and submits it only after approval. CX Codex +1 339installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor