Ab test setup

From sundial-org/awesome-openclaw-skills · View interactive version

Ab test setup is an AI agent skill from the GitHub repository sundial-org/awesome-openclaw-skills. 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 copy," "multivariate test," or "hypothesis." For tracking implementation, see analytics-tracking.

How to use this skill

Skill file

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

Before designing a test, understand:

  1. Test Context
  1. Current State
  1. Constraints

Core Principles

1. Start with a Hypothesis

2. Test One Thing

3. Statistical Rigor

4. Measure What Matters


Hypothesis Framework

Structure

Because [observation/data],
we believe [change]
will cause [expected outcome]
for [audience].
We'll know this is true when [metrics].

Examples

Weak hypothesis:

"Changing the button color might increase clicks."

Strong hypothesis:

"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."

Good Hypotheses Include


Test Types

A/B Test (Split Test)

A/B/n Test

Multivariate Test (MVT)

Split URL Test


Sample Size Calculation

Inputs Needed

  1. Baseline conversion rate: Your current rate
  2. Minimum detectable effect (MDE): Smallest change worth detecting
  3. Statistical significance level: Usually 95%
  4. Statistical power: Usually 80%

Quick Reference

| 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 |

Formula Resources

Test Duration

Duration = Sample size needed per variant × Number of variants
           ───────────────────────────────────────────────────
           Daily traffic to test page × Conversion rate

Minimum: 1-2 business cycles (usually 1-2 weeks)

Maximum: Avoid running too long (novelty effects, external factors)


Metrics Selection

Primary Metric

Secondary Metrics

Guardrail Metrics

Metric Examples by Test Type

Homepage CTA test:

Pricing page test:

Signup flow test:


Designing Variants

Control (A)

Variant (B+)

Best practices:

What to vary:

Headlines/Copy:

Visual Design:

CTA:

Content:

Documenting Variants

Control (A):
- Screenshot
- Description of current state

Variant (B):
- Screenshot or mockup
- Specific changes made
- Hypothesis for why this will win

Traffic Allocation

Standard Split

Conservative Rollout

Ramping

Considerations


Implementation Approaches

Client-Side Testing

Tools: PostHog, Optimizely, VWO, custom

How it works:

Best for:

Server-Side Testing

Tools: PostHog, LaunchDarkly, Split, custom

How it works:

Best for:

Feature Flags


Running the Test

Pre-Launch Checklist

During the Test

DO:

DON'T:

Peeking Problem

Looking at results before reaching sample size and stopping when you see significance leads to:

Solutions:


Analyzing Results

Statistical Significance

Practical Significance

Statistical ≠ Practical

What to Look At

  1. Did you reach sample size?
  1. Is it statistically significant?
  1. Is the effect size meaningful?
  1. Are secondary metrics consistent?
  1. Any guardrail concerns?
  1. Segment differences?

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 |


Documenting and Learning

Test Documentation

Test Name: [Name]
Test ID: [ID in testing tool]
Dates: [Start] - [End]
Owner: [Name]

Hypothesis:
[Full hypothesis statement]

Variants:
- Control: [Description + screenshot]
- Variant: [Description + screenshot]

Results:
- Sample size: [achieved vs. target]
- Primary metric: [control] vs. [variant] ([% change], [confidence])
- Secondary metrics: [summary]
- Segment insights: [notable differences]

Decision: [Winner/Loser/Inconclusive]
Action: [What we're doing]

Learnings:
[What we learned, what to test next]

Building a Learning Repository


Output Format

Test Plan Document

# A/B Test: [Name]

## Hypothesis
[Full hypothesis using framework]

## Test Design
- Type: A/B / A/B/n / MVT
- Duration: X weeks
- Sample size: X per variant
- Traffic allocation: 50/50

## Variants
[Control and variant descriptions with visuals]

## Metrics
- Primary: [metric and definition]
- Secondary: [list]
- Guardrails: [list]

## Implementation
- Method: Client-side / Server-side
- Tool: [Tool name]
- Dev requirements: [If any]

## Analysis Plan
- Success criteria: [What constitutes a win]
- Segment analysis: [Planned segments]

Results Summary

When test is complete

Recommendations

Next steps based on results


Common Mistakes

Test Design

Execution

Analysis


Questions to Ask

If you need more context:

  1. What's your current conversion rate?
  2. How much traffic does this page get?
  3. What change are you considering and why?
  4. What's the smallest improvement worth detecting?
  5. What tools do you have for testing?
  6. Have you tested this area before?

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.