ab-test-design
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…
Install / Use
npx skills add Trystan-SA/product-engineer-skills --skill ab-test-designInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of ab-test-design
ab-test-design scores 89/100 on our quality scale, 1491st of 4,722 Development & Engineering skills we index (top 32%).
Its SKILL.md is 6.0 KB long, well organised into 10 sections with 1 code example: a thorough specification that gives an agent plenty to work with.
With 2,066 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 4 days ago, so ab-test-design is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-11-28. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
ab-test-design compared with similar skills
All 4 of these similar skills score higher than ab-test-design; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| ab-test-design (this skill)by Trystan-SA | 89 | 2.1k | 4d ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 122.3k | 1d ago | CLAUDE.md |
| archifyby tt-a1i | 100 | 101.0k | today | CLAUDE.md |
| hyperframesby heygen-com | 100 | 91.5k | today | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 73.7k | today | CLAUDE.md |
Frequently asked questions
- How do I install ab-test-design?
- Run
npx skills add Trystan-SA/product-engineer-skills --skill ab-test-design. The install tabs above show the steps for each supported agent. - Which AI agents does ab-test-design work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is ab-test-design safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is ab-test-design still maintained?
- The repository was last updated 4 days ago, so ab-test-design is actively maintained.
Skill content
View source on GitHubname: ab-test-design description: 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.
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 3000
It 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.
Related Skills
taste-skill
122.3kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
archify
101.0kTurn any idea, plan, or codebase into an interactive diagram or one-page answer: 10 diagram types, Architecture Diagnosis, Story video and PR walkthroughs. An Agent Skill for Claude Code, Codex, Cursor and more.
hyperframes
91.5kOpen-source AI video editor: edit your own footage, or create and remake any video with Claude Code, Codex or the free Studio app. Write HTML, render MP4. By HeyGen.
ai-job-search
73.7kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
