# Ab test design

> Ab test design is an open-source agent skill for analytics and data. Judges whether an A/B test is worth running and builds a test card with a sample-size. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/superhero-tech/superhero-skills/tree/main/plugins/product-discovery/skills/product-discovery/ab-test-design
- **Repository:** https://github.com/superhero-tech/superhero-skills
- **GitHub stars:** 313
- **License:** MIT
- **Skill name:** ab-test-design
- **Collection:** https://github.com/superhero-tech/superhero-skills
- **Categories:** [analytics and data](https://ai-powered.com/categories/analytics-and-data)
- **Listing updated:** 2026-12-04

## About

This skill helps a product team decide whether a randomized comparison of two product experiences is worth running before any traffic is split. It walks through the change and its hypothesis, the eligible population and how many new units enter each week, a single primary metric with its baseline and the smallest effect worth acting on, and a few guardrail metrics. The result is a clear recommendation to run, revise the plan, or skip the test in favor of a cheaper alternative such as a baseline measurement or usability check.

The workflow asks focused questions one at a time and then runs a bundled Python calculator for the primary metric, which assumes one binary outcome per independent unit, two variants, equal allocation, a fixed horizon, two-sided alpha of 0.05 and 80% target power. Recruitment durations are rounded to at least 14 days and whole-week intervals, and the skill includes reference notes on statistics and guardrail interpretation. A JavaScript renderer produces a standalone HTML test card with sliders, variant cards, guardrail rows and a results panel that stays empty until actual counts are entered.

Users provide their own traffic figures, baseline rate and target effect; the skill does not fetch analytics data. Outputs are a card.json file and an ab-test-card.html file saved in the user's project, and the skill does not configure any external experimentation tool.

## When your agent uses it

> Design an A/B test and decide whether available traffic can detect a useful effect. Use when planning a randomized product comparison, checking sample size or test duration, or creating an interactive A/B test card.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs JavaScript and Python scripts](https://github.com/superhero-tech/superhero-skills/tree/HEAD/plugins/product-discovery/skills/product-discovery/ab-test-design)
- [No network calls found in its scripts](https://github.com/superhero-tech/superhero-skills/tree/HEAD/plugins/product-discovery/skills/product-discovery/ab-test-design)
- [License: MIT](https://github.com/superhero-tech/superhero-skills/tree/HEAD/plugins/product-discovery/skills/product-discovery/ab-test-design)

## Features

- **Hypothesis framing:** Turns a vague change idea into a testable if-then hypothesis with defined control and treatment variants.
- **Traffic feasibility check:** Counts eligible new units per week to estimate whether available traffic can detect a useful effect.
- **Sample size calculator:** Computes required sample per arm, power and recruitment time for a single binary primary metric.
- **Recruitment timing rules:** Sets test length in whole-week intervals of at least 14 days and adds the outcome follow-up period.
- **Guardrail monitoring rule:** Defines a simple check for significant deterioration in secondary metrics before rollout.
- **Interactive test card:** Generates a standalone HTML card with a calculator, variant cards and a results panel for entered counts.

## Good for

- Decide whether a signup page change has enough traffic to test within a month
- Calculate the sample size needed to detect a 2 point lift in checkout conversion
- Plan the duration of a randomized onboarding experiment including the follow-up window
- Define a primary metric and guardrail metrics before launching a pricing page test
- Build a shareable HTML card summarizing a proposed experiment for stakeholders

## Install

### Claude Code

This skill ships in the `product-discovery` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add superhero-tech/superhero-skills
/plugin install product-discovery@superhero-skills
```

Or copy only this skill to `~/.claude/skills/ab-test-design`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/superhero-tech/superhero-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/ab-test-design &&
cp -R "$tmp/plugins/product-discovery/skills/product-discovery/ab-test-design" ~/.claude/skills/ab-test-design &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/ab-test-design` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/ab-test-design` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/superhero-tech/superhero-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/ab-test-design &&
cp -R "$tmp/plugins/product-discovery/skills/product-discovery/ab-test-design" ~/.agents/skills/ab-test-design &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/ab-test-design` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/ab-test-design` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/superhero-tech/superhero-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/ab-test-design &&
cp -R "$tmp/plugins/product-discovery/skills/product-discovery/ab-test-design" ~/.cursor/skills/ab-test-design &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/ab-test-design` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/superhero-tech/superhero-skills.git --path plugins/product-discovery/skills/product-discovery/ab-test-design
```

Or copy the folder to `~/.gemini/skills/ab-test-design` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/ab-test-design`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/superhero-tech/superhero-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/ab-test-design &&
cp -R "$tmp/plugins/product-discovery/skills/product-discovery/ab-test-design" ~/.copilot/skills/ab-test-design &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/ab-test-design` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/superhero-tech/superhero-skills.git
```

Then copy `superhero-skills/plugins/product-discovery/skills/product-discovery/ab-test-design` into your agent's skills folder as `ab-test-design`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to run?

It needs the eligible traffic per day or week, a current baseline rate for the primary metric, and the smallest effect worth acting on. It runs a bundled Python calculator, and the browser card needs an available browser to verify it.

### Does Ab test design launch or configure an A/B test?

No. Designing the test does not launch it or configure an external experimentation tool; it produces a plan and a card file.

### What statistical assumptions does the calculator use?

It assumes one binary outcome per independent unit, two variants with equal allocation, a fixed horizon, two-sided alpha of 0.05 and 80% target power. Revenue, clustered or multi-variant designs need a separate calculation.

### Where are the outputs saved?

The skill creates experiments/<short-name>/card.json and a standalone ab-test-card.html in the user's project, keeping earlier versions.

### How do I install Ab test design in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/ab-test-design to use it in all your projects, or to .claude/skills/ab-test-design in one project. Or install the product-discovery plugin, which includes it: /plugin marketplace add superhero-tech/superhero-skills, then /plugin install product-discovery@superhero-skills.

### Does Ab test design run scripts?

Yes. It runs JavaScript and Python scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Ab test design?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Ab test design?

The closest alternatives to Ab test design are Ab test designer, Ab test setup, Ab test analysis, Ab testing and Ab test designer.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Ab test designer](https://ai-powered.com/skills/ab-test-designer-lionelsimai): Ab test designer is an open-source agent skill for analytics and data.
- [Ab test setup](https://ai-powered.com/skills/ab-test-setup): Ab test setup is an open-source agent skill for marketing and seo.
- [Ab test analysis](https://ai-powered.com/skills/ab-test-analysis): Ab test analysis is an open-source agent skill for analytics and data.
- [Ab testing](https://ai-powered.com/skills/ab-testing): Ab testing is an open-source agent skill for marketing and seo.
- [Ab test designer](https://ai-powered.com/skills/ab-test-designer): Ab test designer is an open-source agent skill for productivity.
- [Duo experimentation](https://ai-powered.com/skills/duo-experimentation): Duo experimentation is an open-source agent skill for analytics and data.
- [Analyze experiment consolidated](https://ai-powered.com/skills/analyze-experiment-consolidated): Analyze experiment consolidated is an open-source agent skill for analytics and data.
- [Analyze experiments](https://ai-powered.com/skills/analyze-experiments): Analyze experiments is an open-source agent skill for analytics and data.

---
Source: https://ai-powered.com/skills/ab-test-design
