ab-testing
Helps your agent plan and run A/B tests. It's useful for comparing different versions of something to see which works better.
What it does
Helps plan and run A/B tests (or split tests) to compare two versions of something (like a website or ad) and find out which performs better. The goal is to make data-driven decisions.
When to use it
- ✓When wanting to test which ad headline gets more clicks.
- ✓When deciding which button color on a website leads to more sales.
- ✓When aiming to improve the sign-up rate on a form.
Example of what to ask your AI
“I want to test two headline versions for my Facebook ad. Which one should get more clicks?”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The AI helps define a clear hypothesis (what you expect to happen), choose what to test (only one thing at a time), calculate how many people need to see the test, and define how to measure success.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add coreyhaines31/marketingskills --skill ab-testingOr download just the file:
curl -L https://raw.githubusercontent.com/coreyhaines31/marketingskills/main/skills/ab-testing/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
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 .agents/product-marketing.md exists (or .claude/product-marketing.md, or the legacy product-marketing-context.md filename, in older setups), 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
- Hypothesis documented
- Primary metric defined
- Sample size calculated
- Variants implemented correctly
…
FAQ
What is an A/B test?
It's a method to compare two versions (A and B) of something, like a webpage or email, to see which one performs better based on specific metrics.
Why is having a hypothesis important?
A hypothesis turns a test from 'let's see what happens' into a prediction based on reasoning or data. It guides the test and helps understand the results.
Can I stop the test at any time?
It's not recommended. Stopping a test early, before reaching the planned number of participants, can lead to wrong conclusions. It's important to be patient and stick to the plan.
Details
Original description by the author
When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "gro
Popularity
- GitHub stars
- 55k
- Ranking position
- #1752
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
ad-creative
Has your agent create and improve ads. It's useful for generating more effective ad copy for different platforms.
coreyhaines31/marketingskills
ads
Helps your agent with paid advertising campaigns. It's useful for managing ads on platforms like Google and Facebook.
coreyhaines31/marketingskills
ai-seo
Helps your agent optimize content for AI searches. It's useful for getting your content to appear in AI-generated answers.
coreyhaines31/marketingskills
analytics
Helps your agent set up and improve data tracking. It's useful for understanding how users interact with your site or app.
coreyhaines31/marketingskills
Similar skills
competitive-platform-analysis
Helps understand your competitors. It identifies, categorizes, and filters competing companies before any deeper analysis.
affaan-m/ECC
competitive-report-structure
Creates comprehensive competitor reports. It combines information to show the overall landscape, recommendations, and helps align the team.
affaan-m/ECC
lead-intelligence
Helps your agent find and contact important people. It analyzes leads, suggests approaches, and manages outreach via email and social media.
affaan-m/ECC