# Ab testing

> Ab testing is an open-source agent skill for marketing and seo. Plan, run and read A/B tests: hypotheses, sample size and stopping calls. 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/coreyhaines31/marketingskills/tree/main/skills/ab-testing
- **Repository:** https://github.com/coreyhaines31/marketingskills
- **GitHub stars:** 60,928
- **License:** MIT
- **Skill name:** ab-testing
- **Collection:** https://github.com/coreyhaines31/marketingskills
- **Categories:** [marketing and SEO](https://ai-powered.com/categories/marketing-and-seo), [analytics and data](https://ai-powered.com/categories/analytics-and-data)
- **Listing updated:** 2026-11-21

## About

Helps the agent design experiments that produce valid, actionable results, and make judgement calls on running ones: is the result real, can we stop, which version won, is a test worth running. Topics include hypotheses, sample size, duration, significance and experiment backlogs.

It reads a product marketing context file first if one exists, then asks about test context, current baseline and traffic, and constraints. Core principles are to start from a hypothesis, test one variable, pre-determine sample size and avoid peeking, and to pick a primary metric with guardrails. A hypothesis template and weak versus strong examples are included.

Tracking setup and page-level conversion fixes are left to the analytics and cro skills.

## When your agent uses it

> When the user wants to plan, run, or read A/B tests, or asks a judgement call on one: is the result real, can we stop, which version won, is this worth testing at all: sample size, duration, significance, hypotheses, and experiment backlogs. For tracking setup, see analytics. For page-level conversion fixes, see cro.

## What it can access

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

- [Instructions only, no scripts](https://github.com/coreyhaines31/marketingskills/tree/HEAD/skills/ab-testing)
- [License: MIT](https://github.com/coreyhaines31/marketingskills/tree/HEAD/skills/ab-testing)

## Features

- **Hypothesis framework:** A structured statement with observation, change, outcome and audience.
- **Core principles:** One variable, fixed sample size and no early peeking.
- **Metric selection:** Primary, secondary and guardrail metrics.
- **Context check:** Reads the product marketing context file before asking questions.
- **Experiment backlogs:** Prioritizing what is worth testing.

## Good for

- Write a test hypothesis
- Calculate sample size and duration
- Decide if a test can stop early
- Prioritize an experiment backlog

## Install

### Claude Code

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

```sh
/plugin marketplace add coreyhaines31/marketingskills
/plugin install marketing-skills@marketingskills
```

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

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/coreyhaines31/marketingskills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/ab-testing &&
cp -R "$tmp/skills/ab-testing" ~/.claude/skills/ab-testing &&
rm -rf "$tmp"
```

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

### Codex

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

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/coreyhaines31/marketingskills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/ab-testing &&
cp -R "$tmp/skills/ab-testing" ~/.agents/skills/ab-testing &&
rm -rf "$tmp"
```

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

### Cursor

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

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/coreyhaines31/marketingskills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/ab-testing &&
cp -R "$tmp/skills/ab-testing" ~/.cursor/skills/ab-testing &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/ab-testing` 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/coreyhaines31/marketingskills.git --path skills/ab-testing
```

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

### VS Code

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

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/coreyhaines31/marketingskills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/ab-testing &&
cp -R "$tmp/skills/ab-testing" ~/.copilot/skills/ab-testing &&
rm -rf "$tmp"
```

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

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/coreyhaines31/marketingskills.git
```

Then copy `marketingskills/skills/ab-testing` into your agent's skills folder as `ab-testing`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does Ab testing set up tracking?

No, the skill points to the analytics skill for that.

### Which context file does Ab testing read?

Product marketing context, e.g. .agents/product-marketing.md or .claude/product-marketing.md.

### What does Ab testing advise on peeking?

Pre-determine sample size and don't stop early.

### How do I install Ab testing in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/ab-testing to use it in all your projects, or to .claude/skills/ab-testing in one project. Or install the marketing-skills plugin, which includes it: /plugin marketplace add coreyhaines31/marketingskills, then /plugin install marketing-skills@marketingskills.

### Does Ab testing run scripts?

No. It is instructions only, with no 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 testing?

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

The closest alternatives to Ab testing are Ab test analysis, Cro, Ads, Attribution and Conversion tracking.

## Where this comes from

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

## Alternatives

- [Ab test analysis](https://ai-powered.com/skills/ab-test-analysis): Ab test analysis is an open-source agent skill for analytics and data.
- [Cro](https://ai-powered.com/skills/cro-coreyhaines31): Cro is an open-source agent skill for marketing and seo.
- [Ads](https://ai-powered.com/skills/ads-coreyhaines31): Ads is an open-source agent skill for marketing and seo.
- [Attribution](https://ai-powered.com/skills/attribution): Attribution is an open-source agent skill for marketing and seo.
- [Conversion tracking](https://ai-powered.com/skills/conversion-tracking): Conversion tracking is an open-source agent skill for analytics and data.
- [Analytics](https://ai-powered.com/skills/analytics-coreyhaines31): Analytics is an open-source agent skill for analytics and data.
- [App analytics](https://ai-powered.com/skills/app-analytics): App analytics is an open-source agent skill for analytics and data.
- [Attribution setup](https://ai-powered.com/skills/attribution-setup): Attribution setup is an open-source agent skill for marketing and seo.

---
Source: https://ai-powered.com/skills/ab-testing
