mcpbeat Sign in

Ab Test Setup Agent Skill

Structured guide for setting up A/B tests with mandatory gates for hypothesis, metrics, and execution readiness.

2k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
1
copies elsewhere
how many repositories repackaged it
223
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/lingxling/awesome-skills-cn --skill ab-test-setup

The instruction itself

26 sections, as written by the author

A/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.


Tracking Verification (Required before Gate 8)

Before entering the Execution Readiness Gate below, run through this checklist to make "Tracking is verified" mean something concrete:

  • Event firing: Trigger each event the primary and secondary metrics depend on (sign-up, add-to-cart, custom event) on staging or a debug page, and confirm it lands in your analytics destination within 30 seconds.
  • Variant attribution: Verify that the variant assignment ID is attached to every fired event — not just the entry event. Use your analytics' raw event view to compare a sample of 5+ events per variant.
  • De-duplication: Confirm that a user reloading the page does not cause double-counted events. If your stack uses client-side de-duping, the variant ID must be part of the dedup key.
  • Sample randomization: Pull the first 100 assignment records from your assignment table; the variant split should be within ±5% of the configured allocation.
  • Guardrail metric pipeline: Each guardrail metric defined in §6️⃣ must have a working dashboard or alert by the time the test launches.

If any of the above fails, stop and resolve it before Gate 8.


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.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

Other skills for the same job

different authors, same section of the catalogue
Seaborn
by ComeOnOliver
×3

Statistical visualization. Scatter, box, violin, heatmaps, pair plots, regression, correlation matrices, KDE, faceted plots, for exploratory analysis and publication figures.

57k tokens
Dbt Transformation Patterns
by ComeOnOliver
×1

Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.

6k tokens
Dbt Transformation Patterns
by ComeOnOliver
×1

Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.

7k tokens
Keeper Stress Analysis
by ClickHouse
vendor

Analyze ClickHouse Keeper stress-test results from play.clickhouse.com / keeper_stress_tests data warehouse. Use whenever the user asks about Keeper performance, validates Keeper PRs against stress dashboards, investigates regressions or improvements in Keeper nightlies, asks about specific date windows / SHAs / PR-sets in Keeper stress tests, wants per-PR or window-vs-window comparisons, asks "did this PR break Keeper", asks "what changed in Keeper between dates", or wants a summary report of Keeper stress runs. Triggers on terms like "keeper stress", "keeper PR", "keeper p99", "keeper memory", "keeper rps", "keeper nightly", "keeper-stress-tests", "keeper validation", "keeper regression", or any question referencing the keeper-stress Grafana dashboard. ALWAYS prefer this skill over re-deriving the workflow from scratch — it captures hard-learned lessons about cgroup-vs-Keeper memory, bench-harness confounds, noise floors, and per-PR attribution limits.

40k tokens scripts
Dbt Transformation Patterns
by wshobson

Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.

3k tokens
Dashboard Testing
by microsoft
vendor

Guide for writing tests for the Aspire Dashboard. Use this when asked to create, modify, or debug dashboard unit tests or Blazor component tests.

4k tokens
Canvas2d Data Visualization
by openai
vendor

Render data visualizations with Canvas2D. Use when the visualization needs high mark counts, fast redraws, immediate-mode rendering, custom hit testing, or a hybrid Canvas plus SVG or HTML architecture.

10k tokens
Analyze Test Report
by pytorch
vendor

Analyze torch-tensorrt local test results and drive failures to a fix. Use when the user pastes a test report / summary, asks why tests failed, asks to triage or fix failing tests, or mentions the JUnit/test-summary output from `just tests-report` / `just test-summary`. Covers where the JUnit XMLs live, how to read the consolidated report, how to reproduce a single failure, and how to categorize (real bug vs torch-API change vs OOM/skip vs flake).

1k tokens

How to use it

Copy the folder

Take lingxling/ab-test-setup from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.