Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

ab-test-validity-checklist

БесплатноБез исполняемых скриптовНе проверен

Use when launching, auditing or governing an A/B test or online experiment design. Builds a per-experiment checklist and sign-off: pre-registered metric…

testlandот testland★ 18 звёзд на GitHub

Об этом скилле

ab-test-validity-checklist

Overview

Produces the pre-flight and post-flight validity checklist for one A/B test. Each step is a gate: a failed gate stops the ship discussion until it is fixed or explicitly waived in writing. Output: experiments/<id>/checklist.md from references/checklist-template.md, signed by the owner (pre-registration) and a different reviewer (post-experiment).

When to use

  • Launching a new experiment, or reviewing a PR that changes its config.
  • Auditing an experiment whose result looks too good or too strange.
  • Setting up experiment peer review for a team.

Step 1 - Pre-register before launch

Commit experiments/<id>/proposal.yml with:

Item What
OEC The one metric (or weighted combination) to improve
Power Effect size (MDE), sample size, alpha, beta
Guardrails Each metric with alert and block thresholds; pick from the guardrail catalog in experiment-results-interpreter (its guardrails and thresholds references). Always include one quality guardrail (latency or error rate) and use max(%, absolute) thresholds on fast endpoints
Randomization unit User / session / device / cookie / tenant
Allocation Percent per arm; ramp-up rules
Look schedule and method Fixed horizon, Pocock, O'Brien-Fleming, or always-valid (see the peeking reference in experiment-results-interpreter)
Stop-early rules Which signals stop the test

Checkpoint: the reviewer confirms every row has a value and the power calculation's N is reachable in the planned duration. After launch, any change to this file needs a recorded team approval.

Step 2 - Check Sample Ratio Mismatch (SRM)

An SRM means the observed split differs from the configured one, and the results cannot be trusted until the cause is found. About 6% of Microsoft's A/B tests have one; Microsoft ExP flags SRM at p < 0.0005, a conservative threshold that limits false alarms ([ExP SRM article][srm]). Run it daily during the test and again before the ship decision:

# srm_check.py - usage: python srm_check.py 503000 497000 --split 50 50
import argparse
from scipy.stats import chisquare

p = argparse.ArgumentParser()
p.add_argument("observed", type=int, nargs="+")
p.add_argument("--split", type=float, nargs="+", required=True)
a = p.parse_args()
total = sum(a.observed)
expected = [total * s / sum(a.split) for s in a.split]
stat, pvalue = chisquare(a.observed, f_exp=expected)
print(f"chi2={stat:.1f} p={pvalue:.2e}")
raise SystemExit(1 if pvalue < 0.0005 else 0)

For 503,000 / 497,000 at 50/50: chi2 = 36.0, p ≈ 2e-9, so SRM. scipy.stats.chisquare takes observed and expected counts and returns the statistic and p-value ([SciPy][chisq]).

If SRM is detected, stop analysis and work through the causes ExP groups by stage ([ExP SRM article][srm]), checking each against data:

  1. Assignment: bucketing bugs, bad user IDs, carry-over from an earlier experiment on the same users.
  2. Execution: a redirect or extra step in one arm only; a variant that changes how often users come back and get logged.
  3. Log processing: joins or bot filters that drop rows unevenly.
  4. Analysis: a segment condition that the treatment itself changes.
  5. Ramp-up: arms ramped unevenly, or users able to self-assign.

Fix the cause, then either restart the experiment or exclude the affected period, re-run srm_check.py, and continue only on exit code 0. Never analyse the OEC on data with an unexplained SRM.

Step 3 - Assignment integrity

Test Pass
Determinism Same (unit, experiment) gives the same arm on every call
Stickiness A unit changes arm only when the experiment is reconfigured
Independence Arm in experiment A does not predict arm in experiment B
Bot exclusion Bots are filtered before assignment, identically for all arms

These run in the per-vendor harnesses of experiment-sdk-testing. A failing test here blocks launch.

Step 4 - Telemetry

  • Conversion events fire once per eligible conversion.
  • Exposure is logged for every unit that could see the variant, not only those who did.
  • Every guardrail is queryable by arm (variant ID joined to the event stream).

Checkpoint: run one A/A day or a staging pass and confirm event counts per arm match assignment counts within SRM tolerance (Step 2 script on the exposure counts).

Step 5 - Peeking discipline

Declared method Gate
Sequential / always-valid The dashboard p-value uses that method's math
Fixed horizon No ship decision before the planned N
Pocock / O'Brien-Fleming Looks happen only on the declared days

Step 6 - Novelty and primacy

Novelty inflates the early effect and primacy depresses it, so compare week 1 with week 2+ and new vs returning users. A test shorter than two full weeks cannot pass this gate; mark it "not assessed" rather than "pass".

Step 7 - Post-exp

Полный SKILL.md на GitHub

Установить ab-test-validity-checklist в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

.tessl-plugin/plugin.jsonreferences/checklist-template.md

FAQ

Что делает скилл ab-test-validity-checklist?

Use when launching, auditing or governing an A/B test or online experiment design. Builds a per-experiment checklist and sign-off: pre-registered metric, power and guardrails, randomization unit and sample ratio mismatch checks, assignment, telemetry, peeking rules and novelty effects.

Как установить скилл ab-test-validity-checklist?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл ab-test-validity-checklist запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить ab-test-validity-checklist с