ab-test-design
Skill2.1k starsChanged 11 days agoMITView on GitHub
Design an A/B test that can answer its question — hypothesis, one primary metric, guardrails, randomization unit, minimum detectable effect, sample size and duration with a bundled calculator — decide whether a test is worth running at all, and implement the variant behind the project's feature-flag tool (GrowthBook, LaunchDarkly, Statsig, PostHog, Optimizely, Unleash or in-house flags). Use when asked to A/B test, experiment, split test, or validate a change with data before rolling it out.
5 other projects use a version of this.
Trending
More talk lately.thin dataabout the whole repository
Most recently taken up by
- ali-demirbas/ab-test-playbooktheir own version, first seen Nov 14, 2026
- RBraga01/builder-producttheir own version, first seen Nov 1, 2026
- gmanch94/claude-code-aidlc-templatetheir own version, first seen Jul 11, 2026
- Mehdibargach/claude-code-pm-skillstheir own version, first seen Mar 18, 2026
- nandanosql/all_in_one_pm_skillstheir own version, first seen Feb 28, 2026
Who's talking about Trystan-SA/product-engineer-skills
- sudosubin/agents.nix“codex-marketplaces.github.trystan-sa.product-engineer-skills: init at 0-unstable-2026-07-06”GitHub · Nov 28, 2026
- sudosubin/agents.nix“claude-code-marketplaces.github.trystan-sa.product-engineer-skills: init at 0-unstable-2026-07-06”GitHub · Nov 26, 2026
- tekvisions/prompt-index“fix: retain 4 reviewed references that left discovery (Nov 25)”GitHub · Nov 25, 2026
- xiaolai/nlpm“Audit candidate: Trystan-SA/product-engineer-skills”GitHub · Nov 23, 2026
The biggest 4 of 4 mentions linking to the repository that our crawl found. Each line is their own headline.
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- Mehdibargach/claude-code-pm-skills★ 97same name
- gmanch94/claude-code-aidlc-template★ 2same name
- RBraga01/builder-product★ 2same name
- nandanosql/all_in_one_pm_skills★ 1same name
- ali-demirbas/ab-test-playbook★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- accessibility-auditSkill
- adoption-planSkill
- design-system-adoptionSkill
- design-system-extractSkill
- experiment-readoutSkill
- feature-briefSkill
- flow-testSkill
- happy-path-auditSkill
- instrument-featureSkill
- launch-reviewSkill
- unhappy-pathsSkill
- usability-test-planSkill
- user-interviewsSkill
- ux-reviewSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 34
Run the bundled calculator, in the scripts/ folder next to this file:
- Distinctive: line 54
Fall back to control: when the flag service fails or times out.
- Distinctive: line 56
Log exposure: when the variant renders for an eligible user.
- Distinctive: line 62
Write these down now, before any data arrives:
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
A/B Test Design
An A/B test is a measuring instrument. Designed badly, it gives a confident answer to the wrong question, or no answer after six weeks of traffic. This skill writes the experiment spec before any code, checks that the test is feasible, and implements it so the data can be trusted.
Phase 1: Write the hypothesis
Because
<evidence>, we believe that<change>for<eligible users>will<increase or decrease><primary metric>by at least<MDE>.
Evidence comes from brief.md, flow-audit.md or adoption-plan.md in the feature folder (docs/product/<feature-slug>/), from research, or from data. Test one idea per experiment: if the variant changes copy, layout and pricing at once, a win can't tell you which change worked. Bundling is fine when you only need the decision and not the learning — say so explicitly.
Phase 2: Decide whether to test at all
An experiment fits when the change is reversible, the outcome is genuinely uncertain, and there's enough traffic. Don't run one when:
- It's a fix. Ship bug fixes, accessibility fixes and repaired flows directly.
- Traffic is too low. If Phase 4 asks for more than about 6–8 weeks, the test won't conclude. Alternatives: test a bigger change (larger MDE), choose a more sensitive metric closer to the change, widen the eligible population, or ship behind a flag and compare before and after with qualitative feedback — while saying clearly that this is weaker evidence.
- The decision is already made. A test nobody will act on is waste.
Phase 3: Choose metrics and the unit
- Primary metric — exactly one, chosen now. It must move if the hypothesis is true, be measurable per randomization unit, and matter to the business: the value moment beats clicks on the button you changed.
- Guardrails — 2 to 4 metrics that must not get worse: error rate, latency, support contacts, revenue, unsubscribes, a later step of the funnel.
- Secondary metrics — for learning only, never to declare a winner.
- Randomization unit — the user for signed-in products (stable across devices); the account or organization when users collaborate, otherwise teammates see different versions and contaminate each other; an anonymous ID for signed-out flows (accept some cross-device noise).
- Eligibility and exposure — only users who can reach the change are enrolled, and they're counted from the moment they actually see it. Users who never reach the changed screen dilute the effect.
Phase 4: Size it
Run the bundled calculator, in the scripts/ folder next to this file:
# Conversion metric: 12% baseline, detect a +10% relative lift, 3,000 eligible users a day
python3 scripts/sample_size.py --baseline 0.12 --mde 0.10 --daily-users 3000
# Continuous metric: standard deviation 40, detect +3 units
python3 scripts/sample_size.py --std 40 --mde-abs 3 --daily-users 3000It prints users per variant, the total, and the duration rounded up to whole weeks, because weekdays and weekends behave differently and a test should never stop mid-week. Defaults: α = 0.05 two-sided, 80 % power. With more than two variants it applies a Bonferroni correction; each extra variant costs traffic, so prefer two.
Sanity check by hand for conversions: n per variant ≈ 16 · p(1 − p) / δ², where δ is the absolute difference.
The MDE is a business decision, not a statistical one: the smallest lift worth shipping and maintaining. If the answer is "any lift", no test will ever be big enough.
Phase 5: Implement
- Use the project's flag tool (GrowthBook, LaunchDarkly, Statsig, PostHog, Optimizely, Unleash, Flagsmith, ConfigCat, Vercel Flags or an in-house system) and its experiment features — assignment and exposure logging — rather than random numbers in app code.
- Assign deterministically by the randomization unit, so a user sees the same variant on every visit and device.
- Fall back to control when the flag service fails or times out.
- No flicker. Evaluate flags on the server or bootstrap them before first render. Showing control and then switching to the variant biases the result and degrades the experience.
- Log exposure when the variant renders for an eligible user. Many SDKs log on evaluation, so evaluate at the point of exposure, not at app start.
- QA both variants by forcing each one through the tool's overrides, and check that tracking fires in both (
instrument-feature). - Keep the variant easy to delete: one flag check at a boundary, not conditions scattered through the code.
Phase 6: Pre-register the analysis
Write these down now, before any data arrives:
- The fixed duration and sample size, and the commitment not to stop early because results look good. Peeking pushes the false-positive rate far above 5 %. If the tool supports sequential testing, use its rules instead and say so.
- The decision rule: ship if the primary metric improves significantly and no guardrail degrades beyond its threshold; otherwise keep control or iterate.
- The segments you'll look at — two or three at most, chosen in advance. Patterns found in other segments are hypotheses for the next test.
Output
Write experiment.md to the feature folder: hypothesis, metrics, unit, eligibility, sample size and duration (with the calculator command), implementation notes (flag key, variants, exposure point), and the pre-registered analysis plan. Summarize: duration, MDE, and anything that makes the test risky. When the test ends, experiment-readout analyzes it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

