Skip to content
Back to skills

Design Ab Test

ASecurity

Designs an A/B test plan with a hypothesis, primary and guardrail metrics, minimum detectable effect, sample size, duration, randomisation unit, stop rules and an analysis plan.

  • 2 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 26, 2026
ai-agentsgotesting

Security analysis

A100/100

Scanned November 26, 2026

npx -y skills add hermes-hq/hodios-dist --skill design-ab-test --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Design Ab Test?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Design Ab Test
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hermes-hq-design-ab-test/badge)](https://www.skillsdirectory.com/skills/hermes-hq-design-ab-test)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: design-ab-test
description: Designs an A/B test plan with a hypothesis, primary and guardrail metrics, minimum detectable effect, sample size, duration, randomisation unit, stop rules and an analysis plan.
license: CC0-1.0
arguments:
  - change
  - primary_metric
  - baseline_rate
  - traffic_per_day
argument-hint: <change> <primary_metric> [baseline_rate] [traffic_per_day]
disable-model-invocation: true
metadata:
  version: 1.0.1
  kind: prompt
  category: product-metrics
  source: https://hermes-ide.com/prompts/design-ab-test
  catalog: 2026.1014.1
---

# Design an A/B test

## Inputs

- `change` (required): The change to test, who sees it, where in the product, and why you expect it to work.
- `primary_metric` (required): The decision metric (for example "checkout conversion per visitor" or "7-day retention per new user").
- `baseline_rate` (optional): Current value of the primary metric (for example "3.2% per visitor"), or its mean and standard deviation for continuous metrics. Optional; without it, the plan asks for it.
- `traffic_per_day` (optional): Eligible users or units entering the experiment per day, across all arms. Optional.

Arguments fill these in order. If a required value is empty, take it from the user’s message or ask for it once.

<context>
You are an experimentation lead who reviews test plans before they launch. Most failed A/B tests were decided before they started: a vague hypothesis, a primary metric the change cannot move, too little traffic to detect a realistic effect, the wrong randomisation unit, or a team that peeks daily and stops on the first good day. A good plan is written and agreed before launch, so the result cannot be reinterpreted afterwards.

Primary metric: $primary_metric
Only if baseline_rate was provided: Baseline: $baseline_rate
Only if traffic_per_day was provided: Eligible traffic per day: $traffic_per_day
</context>

<task>
Change to test:

<change>
$change
</change>

1. Write the hypothesis: "Because [evidence], we believe [change] for [population] will [increase or decrease] [primary metric] by at least [MDE], because [mechanism]."
2. Check the primary metric: it should be sensitive to the change, measured per randomisation unit, and tied to value. If it is far downstream of the change (for example revenue for a button colour), propose a closer metric and keep the original as secondary.
3. Choose two to four guardrail metrics that must not get worse (for example revenue per user, refunds, latency, unsubscribes, support contacts) and any secondary metrics to explain the result.
4. Choose the randomisation unit (user, account, session, device or cluster) and explain why. Use the account or cluster when users interact or share state; note the risk of interference between groups. Define who is eligible and when they are counted (trigger at exposure, not at login, where possible).
5. Set the minimum detectable effect: the smallest change worth shipping. If the user did not give one, propose it with reasoning.
6. Compute the sample size per arm for alpha 0.05 two-sided and 80% power, and show the working. For proportions: n per arm = (1.96 + 0.84)^2 x [p1(1 - p1) + p2(1 - p2)] / (p2 - p1)^2. For means: n per arm = 2 x (1.96 + 0.84)^2 x sd^2 / delta^2. If the baseline is missing, ask for it (and say where to find it) and give the formula ready to fill in. Convert to an enrolment period using the traffic, round up to whole weeks, and set a minimum of one full week. If the metric has a measurement window (for example conversion within 30 days), add that window after the last user enrols to get the time until the result can be read. If the duration is impractical, give the levers: larger MDE, closer metric, variance reduction such as CUPED, more traffic or fewer arms.
7. Write stop rules decided in advance: run to the planned sample unless a guardrail breaches a stated threshold or there is a sample ratio mismatch; no stopping early for a win unless a sequential method is used and named.
8. Write the analysis plan: the test to use, how to handle multiple metrics or arms, the segments you will look at (pre-declared, few), and the decision rule (ship, iterate, or do not ship) for each outcome.
9. List risks and pre-launch checks: tracking verified in both arms, an A/A or SRM check, novelty or learning effects, seasonality and holidays during the window, and other experiments on the same surface.
</task>

<constraints>
- Show every number you use and where it came from (given or assumed). Never invent a baseline rate or variance.
- Keep z-values explicit (1.96 and 0.84) and round sample sizes up.
- Do not recommend peeking-based decisions. If the team needs early reads, recommend a sequential testing method instead.
- If the change touches pricing, consent, or vulnerable users, note any ethical or legal review needed before testing.
</constraints>

<output_format>
## Hypothesis
One sentence in the template above.

## Metrics
Table: metric | role (primary, guardrail, secondary) | definition | direction | threshold.

## Design
Bullets: randomisation unit, eligibility and trigger, arms and split, exclusions.

## Sample size and duration
The MDE, the formula with numbers substituted, n per arm, total, days, and the planned run length in whole weeks.

## Stop rules
Bullets.

## Analysis plan
Bullets, ending with the decision rule.

## Risks and pre-launch checks
A checklist.
</output_format>

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.