ab-test-setup
Scannednpx machina-cli add skill ranbot-ai/awesome-skills/ab-test-setup --openclawA/B Test Setup
1️⃣ Purpose & Scope
Ensure every A/B test is valid, rigorous, and safe before a single line of code is written.
- Prevents "peeking"
- Enforces statistical power
- Blocks invalid hypotheses
2️⃣ Pre-Requisites
You must have:
- A clear user problem
- Access to an analytics source
- Roughly estimated traffic volume
Hypothesis Quality Checklist
A valid hypothesis includes:
- Observation or evidence
- Single, specific change
- Directional expectation
- Defined audience
- Measurable success criteria
3️⃣ Hypothesis Lock (Hard Gate)
Before designing variants or metrics, you MUST:
- Present the final hypothesis
- Specify:
- Target audience
- Primary metric
- Expected direction of effect
- Minimum Detectable Effect (MDE)
Ask explicitly:
“Is this the final hypothesis we are committing to for this test?”
Do NOT proceed until confirmed.
4️⃣ Assumptions & Validity Check (Mandatory)
Explicitly list assumptions about:
- Traffic stability
- User independence
- Metric reliability
- Randomization quality
- External factors (seasonality, campaigns, releases)
If assumptions are weak or violated:
- Warn the user
- Recommend delaying or redesigning the test
5️⃣ Test Type Selection
Choose the simplest valid test:
- A/B Test – single change, two variants
- A/B/n Test – multiple variants, higher traffic required
- Multivariate Test (MVT) – interaction effects, very high traffic
- Split URL Test – major structural changes
Default to A/B unless there is a clear reason otherwise.
6️⃣ Metrics Definition
Primary Metric (Mandatory)
- Single metric used to evaluate success
- Directly tied to the hypothesis
- Pre-defined and frozen before launch
Secondary Metrics
- Provide context
- Explain why results occurred
- Must not override the primary metric
Guardrail Metrics
- Metrics that must not degrade
- Used to prevent harmful wins
- Trigger test stop if significantly negative
7️⃣ Sample Size & Duration
Define upfront:
- Baseline rate
- MDE
- Significance level (typically 95%)
- Statistical power (typically 80%)
Estimate:
- Required sample size per variant
- Expected test duration
Do NOT proceed without a realistic sample size estimate.
8️⃣ Execution Readiness Gate (Hard Stop)
You may proceed to implementation only if all are true:
- Hypothesis is locked
- Primary metric is frozen
- Sample size is calculated
- Test duration is defined
- Guardrails are set
- Tracking is verified
If any item is missing, stop and resolve it.
Running the Test
During the Test
DO:
- Monitor technical health
- Document external factors
DO NOT:
- Stop early due to “good-looking” results
- Change variants mid-test
- Add new traffic sources
- Redefine success criteria
Analyzing Results
Analysis Discipline
When interpreting results:
- Do NOT generalize beyond the tested population
- Do NOT claim causality beyond the tested change
- Do NOT override guardrail failures
- Separate statistical significance from business judgment
Interpretation Outcomes
| Result | Action |
|---|---|
| Significant positive | Consider rollout |
| Significant negative | Reject variant, document learning |
| Inconclusive | Consider more traffic or bolder change |
| Guardrail failure | Do not ship, even if primary wins |
Documentation & Learning
Test Record (Mandatory)
Document:
- Hypothesis
- Variants
- Metrics
- Sample size vs achieved
- Results
- Decision
- Learnings
- Follow-up ideas
Store records in a shared, searchable location to avoid repeated failures.
Refusal Conditions (Safety)
Refuse to proceed if:
- Baseline rate is unknown and cannot be estimated
- Traffic is insufficient to detect the MDE
- Primary metric is undefined
- Multiple variables are changed without proper design
- Hypothesis cannot be clearly stated
Explain why and recommend next steps.
Key Principles (Non-Negotiable)
- One hypothesis per test
- One primary metric
- Commit before launch
- No peeking
- Learning over winning
- Statistical rigor first
Final Reminder
A/B testing is not about proving ideas right. It is about learning the truth with confidence.
If you feel tempted to rush, simplify, or “just try it” — that is the signal to slow down and re-check the design.
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Source
git clone https://github.com/ranbot-ai/awesome-skills/blob/main/skills/ab-test-setup/SKILL.mdView on GitHub Overview
Provides a structured guide to plan and gate A/B experiments, ensuring tests are valid, powered, and safe before any code changes. It enforces a Hypothesis Lock, explicit assumptions, and metric definitions, plus an Execution Readiness Gate to prevent premature launches. Following this framework helps teams avoid peeking, overclaiming causality, or underpowered results.
How This Skill Works
Begin with pre-requisites and hypothesis quality, then lock the final hypothesis with audience, primary metric, and MDE. Next, perform the Assumptions & Validity Check, select the appropriate Test Type, and define primary, secondary, and guardrail metrics, plus a realistic sample size and duration. The Execution Readiness Gate is a hard stop; you proceed only when all gates are satisfied and tracking is verified.
When to Use It
- Before coding an experiment, ensure the hypothesis is locked and the primary metric is defined with an MDE.
- When assumptions about traffic stability or independence may be weak, run the validity check and delay if needed.
- When you have a single small change, default to A/B; use A/B/n, MVT, or Split URL only if justified.
- When guardrail metrics are critical to prevent harmful wins or negative business impact.
- When you need formal documentation: hypothesis, metrics, sample plan, and learning after results.
Quick Start
- Step 1: Articulate the user problem, confirm analytics access, and estimate rough traffic.
- Step 2: Lock the final hypothesis with audience, primary metric, and MDE.
- Step 3: Define assumptions, pick a test type, set metrics (primary/secondary/guardrails), calculate sample size and duration, and verify Execution Readiness.
Best Practices
- Lock the final hypothesis before designing variants.
- Freeze the primary metric and never let secondary metrics override it.
- Compute realistic sample size and test duration before launch.
- Set guardrail metrics to halt or redesign on negative outcomes.
- Document the Test Record with hypothesis, metrics, and learning.
Example Use Cases
- Example 1: Lock final hypothesis, audience, primary metric, and MDE before any design.
- Example 2: Use A/B/n when multiple variants are possible and traffic supports it.
- Example 3: Use Split URL test for major structural changes.
- Example 4: Guardrail failure triggers test stop and learning.
- Example 5: After completion, publish a Test Record summarizing results and insights.
Frequently Asked Questions
Related Skills
AI/ML Model Testing
PramodDutta/qaskills
Testing machine learning models including accuracy validation, bias detection, drift monitoring, A/B testing, and model regression testing.
web-artifacts-builder
anthropics/skills
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
miro-automation
davepoon/buildwithclaude
Automate Miro tasks via Rube MCP (Composio): boards, items, sticky notes, frames, sharing, connectors. Always search tools first for current schemas.
10-andruia-skill-smith
ranbot-ai/awesome-skills
Ingeniero de Sistemas de Andru.ia. Diseña, redacta y despliega nuevas habilidades (skills) dentro del repositorio siguiendo el Estándar de Diamante.
session-management
athola/claude-night-market
Manage Claude Code sessions with naming, checkpointing, and resume strategies.
multi-review
Pamacea/smite
MANDATORY gate BEFORE merging PR or deploying to production in smite project. Invoke FIRST when 'comprehensive review', 'check security', 'performance review', 'test coverage review', 'code quality audit' - orchestrates parallel review by 4 specialized agents (security, performance, testing, documentation) with consolidated report and scoring. Specific phrases: 'review this PR', 'security audit', 'performance check', 'test review'. (user)