
19-ab-test-setup-global
Use when the user wants a VALID experiment instead of a guess — hypothesis, one variable, sample size and runtime math, statistical significance, primary versus secondary metrics, multi-arm designs, and a results template, across Optimizely, VWO, and native Meta and Google tests. Trigger on 'A/B test', 'split test', 'how long should I run the test', 'is this result significant', 'test two versions', 'which creative is actually better'. Also use when a winner was declared after two days on tiny numbers. Not for — scaling the proven winner, see 55-scaling-ads-global; analyzing data already collected, see 13-data-analysis-global; auditing the account, see 21-ads-audit-global.
- Installs
- 42
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/minhnv0807/ai-business-skills --skill 19-ab-test-setup-global- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads 19-ab-test-setup-global automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
A/B Test Setup (Global)
Run experiments that produce decisions, not noise. Most "A/B tests" in marketing are underpowered, peeked-at, and badly hypothesized — meaning the team learns nothing and ships the louder variant.
For Newbies
A valid A/B test answers one question: "Did this change cause a real improvement, or am I seeing noise?"
To answer it credibly you need four things:
- A specific hypothesis with a numeric prediction
- One variable changed (everything else identical)
- Enough sample to detect the effect you care about
- Statistical significance before you call a winner (typically p < 0.05)
If any one of these is missing, you don't have an A/B test — you have a coin flip with extra steps.
Common newbie mistake: running a test for 3 days, seeing variant B 40% higher, declaring victory, and shipping. Three days is too short to absorb day-of-week effects, and small samples produce wild swings. Variant B may revert (or reverse) by day 14.
Step 0 — Read Context
Read .agents/product-marketing-context.md if it exists. Audience size, average traffic, and current conversion rate determine whether a test is even feasible.
Step 1 — Information Gathering
Ask up to 4 questions:
- What are you testing? (Ad headline / Landing page section / Email subject / Pricing display / CTA button / Creative video)
- Primary metric? (CTR / Conversion rate / CPM / CPA / Revenue / Open rate / Reply rate)
- Daily traffic to the test surface? (Needed for sample size and duration)
- Goal of the test? (Lift X% on primary metric / Pick a winner among N candidates / Validate a strategic hypothesis)
The 7 Principles of a Valid A/B Test
1. Test exactly one variable
The cardinal rule. Change two things at once and you cannot attribute the result.
- Bad: "I changed the headline, the hero image, and the CTA color." → You learn nothing about which element drove the lift.
- Good: Change only the headline. Image, CTA, layout, traffic source, and audience targeting are identical.
If you must test multiple changes, use a multivariate test (MVT) — but those need much more traffic (often 4×–8× a single A/B).
2. Hypothesize with a number
Format: "If we [change X], [metric Y] will increase by [Z%] because [reason]."
- Good: "If we change the CTA from 'Sign up' to 'Get my free demo,' conversion rate will increase by 15% because action-specific language reduces ambiguity."
- Bad: "The new copy will be better." (No metric, no number, no causal reasoning — un-testable.)
The "because" matters: if your hypothesis is wrong but the reasoning was sound, you've still learned something generalizable.
3. Sufficient sample size
Don't stop early. Statistical tests need adequate data to distinguish signal from noise.
- Minimum rule of thumb: 100 conversions per variant (not 100 visitors)
- Better: Calculate sample size up front based on baseline conversion rate and minimum detectable effect (formula below)
4. Sufficient duration
Run for whole weeks, not 3 days, not 10 days. Different weekdays produce different audience behavior — Monday B2B traffic is not Saturday DTC traffic.
- Minimum: 7 days
- Recommended: 14 days
- Watch for: holidays, paydays, monthly billing cycles, ad spend ramp-ups
5. Don't peek
Looking at results every hour and stopping when "B looks good" is the most common error in marketing experimentation. Early peeks combined with early stops dramatically inflate false positive rates.
- Define the end date in advance. Honor it.
- If you must monitor, use sequential testing methods designed for it (Bayesian frameworks like Optimizely's Stats Engine, or platforms with built-in sequential controls).
6. Statistical significance: p < 0.05
Most marketing teams use 95% confidence (p-value < 0.05) as the bar.
- p-value < 0.05 → less than 5% chance the observed difference is random
- p-value 0.05–0.10 → suggestive but inconclusive — extend the test
- p-value > 0.10 → no evidence of an effect — keep control or test something else
For high-stakes tests (pricing, branding) consider 99% confidence (p < 0.01).
7. Document everything
Write down:
- Hypothesis (with number)
- Start date / end date
- Sample size achieved
- Primary metric, secondary metrics
- Result + p-value
- Decision + reasoning
- What you'd test next
A documented test history prevents your team from re-testing things that already failed and from forgetting why you made past decisions.
Sample Size Calculation
Quick formula
Sample size per variant ≈ 16 × p × (1 − p) / MDE²
where:
p = baseline conversion rate (e.g. 0.03 = 3%)
MDE = minimum detectable effect, in absolute terms
(e.g. 0.006 = lift from 3% to 3.6%)
This produces sample size for 80% power, 95% confidence, 50/50 split — sensible defaults for most marketing tests.
Worked example A — landing page CRO
Current conversion rate is 3%. You want to detect a 20% relative lift (from 3% to 3.6%).
- p = 0.03
- MDE (absolute) = 0.20 × 0.03 = 0.006
- Sample size per variant = 16 × 0.03 × 0.97 / 0.006² = 12,933 visitors
- Total: ~25,866 visitors. At 500 visitors/day → ~52 days.
That's slow. Either run it (if the change matters), test something with a bigger expected lift, or get more traffic on the test surface.
Worked example B — email subject line
Current open rate is 25%. You want to detect a 10% relative lift (to 27.5%).
- p = 0.25
- MDE = 0.025
- Sample size per variant = 16 × 0.25 × 0.75 / 0.025² = 4,800 sends
- Total: 9,600 sends per email — usually achievable in one campaign.
Feasibility quick-reference
| Daily volume | Conv. rate | Days needed | Test feasibility |
|---|---|---|---|
| < 100 | any | 2+ months | Skip — focus on traffic first |
| 100–500 | 2–5% | 3–6 weeks | Yes, but be patient |
| 500–2K | 2–5% | 2–3 weeks | Yes — ideal range |
| 2K–10K | 2–5% | 1–2 weeks | Yes — rapid iteration |
| 10K+ | any | days | Yes — multi-arm tests possible |
If volume is below 100/day, A/B testing is statistically wasted — concentrate on increasing traffic before running experiments.
Multi-Arm and Multivariate
Beyond simple A vs B:
- Multi-arm (A/B/C/D): test 3+ variants at once. Sample size grows roughly linearly with arms.
- Multivariate (MVT): test multiple elements simultaneously (headline × image × CTA = 8 combinations). Sample size grows multiplicatively. Only viable with very high traffic.
- Sequential / Bayesian (Thompson Sampling): dynamically allocate more traffic to better-performing variants. Optimizely, Google Optimize successors, and Meta's auto-optimization use this.
For most teams: stick to A/B until traffic exceeds ~10K/day on the test surface.
What to Test (in priority order)
1. Headline — highest impact
Roughly 80% of visitors read the headline; 20% read the body. Optimizing the headline gives the largest expected lift per unit of effort.
Variations to try:
- Question vs statement
- Specific number vs generic ("3,247 founders trust us" vs "Trusted by founders")
- Outcome-focused vs feature-focused
- Short (5–7 words) vs long (12–15 words)
2. CTA button
Easy to change, often 5–25% lift potential.
Variations:
- Text: "Sign up" vs "Get free demo" vs "Start free trial" vs "See pricing"
- Color: brand primary vs contrast (high-contrast usually wins)
- Size: standard vs large
- Position: above-the-fold vs sticky vs end-of-page
3. Hero visual
- Product shot vs lifestyle shot
- Static image vs video
- Founder face vs anonymous model
- Demo screencast vs testimonial clip
4. Pricing display
- Monthly vs annual primary
- Strikethrough discount vs clean price
- Number formatting ($299 vs $299.00 vs $299/mo)
- Anchor pricing (3-tier with middle highlighted)
5. Social proof placement
- Numbers vs detailed reviews
- Logo wall vs customer count
- Above CTA vs below CTA
- Video testimonial vs text testimonial
6. Form fields
- 3 vs 5 vs 7 fields (fewer fields almost always wins on conversion, but lead quality may drop)
- Label position (above vs left)
- Single-step vs multi-step
- Optional fields marked vs required marked
7. Email subject lines
- Question vs benefit
- Personalization vs generic
- Emoji vs no emoji (varies by region/audience)
- Length (under 40 chars vs 60+)
8. Ad creative
- First 3-second hook variants
- UGC style vs polished brand
- Format: single image vs carousel vs video vs Reels-native
- Headline on creative vs in copy field
Tool Recommendations
| Tool | Best for | Cost |
|---|---|---|
| Meta Ads built-in A/B test | Creative, audience, placement on Meta | Free |
| TikTok Ads Split Test | TikTok ad creative and audience tests | Free |
| Google Ads Experiments | Google Ads campaigns and ad copy | Free |
| Optimizely Web | Enterprise web experimentation, sequential testing | $$$ enterprise |
| VWO | Mid-market web A/B + heatmaps | $199+/mo |
| Convert.com | Privacy-first web testing | $99+/mo |
| PostHog | Product feature flags + experiments + analytics | Free tier, generous |
| GrowthBook | Open-source A/B testing platform | Free / hosted plans |
| Statsig | Product experimentation with feature flags | Free tier |
| AB Tasty | Web experimentation + personalization | $$$ |
| Unbounce / Instapage | Built-in A/B for landing pages | $90+/mo |
| Custom (split URL) | Two pages, 50/50 redirect, GA4/Pixel attribution | Free |
Note: Google Optimize was sunset in September 2023. Migration paths: GA4 + a third-party platform (Optimizely, VWO, Convert) or PostHog/GrowthBook for product-led teams.
Setup Without Dedicated Tools
1. Build two versions of the page: /landing-a and /landing-b
2. Split traffic 50/50:
- Meta Ads: 2 ad sets, identical audience, different destination URLs
- Google Ads: 2 ads in the same ad group, identical targeting, different URLs
- Email: list-split feature in your ESP
3. Track conversions per variant:
- Meta Pixel custom event with parameter: page_version = "A" / "B"
- GA4 event with custom dimension
- PostHog feature flag exposure event
4. Run for the planned duration. Don't peek mid-test.
5. Export raw counts. Run significance test (calculator below).
Result Analysis
Statistical significance
Use a calculator. Recommended:
- Evan Miller's calculator —
evanmiller.org/ab-testing/chi-squared.html - AB Testguide —
abtestguide.com/calc/ - Optimizely's calculator — built into platform
- Survey Monkey calculator — for sample size pre-test
Inputs:
- Variant A: visitors + conversions
- Variant B: visitors + conversions
Outputs:
- p-value (need < 0.05 for 95% confidence)
- Confidence interval on the lift
- Lift % (relative or absolute)
Decision matrix
| p-value | Lift size | Decision |
|---|---|---|
| < 0.05 | > 5% | B wins — implement and document |
| < 0.05 | < 5% | Significant but small — weigh implementation cost |
| 0.05–0.10 | > 10% | Borderline — extend test if feasible |
| > 0.10 | any | No evidence — keep A or design a stronger test |
Common Pitfalls
- Peeking and stopping early. Most common cause of false positives. If the platform shows "B is winning" on day 3, the platform is misleading you (unless it's specifically designed for sequential testing).
- Uneven splits. If split is 30/70 instead of intended 50/50, your delivery infrastructure has a bug. Investigate before trusting results.
- Seasonality. Tests run only on weekdays vs weekends produce different results. Always run for whole weeks.
- Novelty effect. New variants attract attention for the first 2–3 days, then performance regresses. Long enough tests absorb this.
- Sample ratio mismatch (SRM). Even with 50/50 intent, if visitor counts diverge significantly (e.g. 8,400 vs 11,600), there's likely a tracking or assignment bug. Tools like PostHog and Optimizely flag this automatically.
- Mixing traffic sources mid-test. Don't add a new ad campaign halfway through — it changes audience composition.
- Multiple comparison problem. Running 20 simultaneous tests means ~1 will look "significant" by chance alone. Adjust thresholds (Bonferroni correction) or pre-register hypotheses.
Output Template
# A/B Test: [test name]
Created: [YYYY-MM-DD]
Owner: [name]
## 1. Hypothesis
"If we [change X], [metric Y] will increase by [Z%] because [reason]."
## 2. Variants
- Variant A (Control): [current state description]
- Variant B (Challenger): [changed state description]
- Single change: [the one element that differs]
## 3. Metrics
- Primary: [e.g. conversion rate]
- Secondary (guardrails): [e.g. bounce rate, time on page, AOV]
## 4. Sample size & duration
- Baseline (p): [%]
- Minimum detectable effect (MDE): [%]
- Sample needed per variant: [N]
- Daily traffic to test surface: [N]
- Estimated days to complete: [N]
## 5. Setup
- Tool: [Optimizely / VWO / PostHog / Meta built-in / custom]
- Variant A URL or asset: [...]
- Variant B URL or asset: [...]
- Tracking events: [list]
- Split ratio: 50/50
## 6. Timeline
- Start: [date]
- End (planned): [date]
- Review meeting: [date]
## 7. Results (filled in after test ends)
| Variant | Visitors | Conversions | Rate | Lift vs A |
|---------|----------|-------------|------|-----------|
| A | | | | — |
| B | | | | +X% |
p-value: [x]
95% CI on lift: [lower%, upper%]
Significant (p < 0.05): [Yes / No]
## 8. Decision
[Ship B / Keep A / Inconclusive — extend or redesign]
## 9. Action
[Implement variant B globally / Roll back / Schedule next iteration]
## 10. Lessons
[What this teaches generalizable for future tests]
Quality Checklist
- Exactly one variable changed
- Hypothesis is specific and includes a numeric prediction
- Sample size calculated up front (minimum 100 conv/variant)
- Duration is at least 1 full week, ideally 2 weeks
- No peeking — end date defined and honored
- p-value calculated before declaring a winner (target p < 0.05)
- Result documented (winner or not — both are learning)
- Secondary metrics checked (no guardrail violations)
- Sample ratio verified (no SRM red flags)
- Next test identified based on what this one taught
FAQ
What does the 19-ab-test-setup-global skill do?
Use when the user wants a VALID experiment instead of a guess — hypothesis, one variable, sample size and runtime math, statistical significance, primary versus secondary metrics, multi-arm designs, and a results template, across Optimizely, VWO, and native Meta and Google tests. Trigger on 'A/B test', 'split test', 'how long should I run the test', 'is this result significant', 'test two versions', 'which creative is actually better'. Also use when a winner was declared after two days on tiny numbers. Not for — scaling the proven winner, see 55-scaling-ads-global; analyzing data already collected, see 13-data-analysis-global; auditing the account, see 21-ads-audit-global.
How do I install 19-ab-test-setup-global?
Run npx skills add https://github.com/minhnv0807/ai-business-skills --skill 19-ab-test-setup-global in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/19-ab-test-setup-global/ (personal) or .claude/skills/19-ab-test-setup-global/ (project).
Which AI agents can use 19-ab-test-setup-global?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is 19-ab-test-setup-global safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains 19-ab-test-setup-global?
It is published by minhnv0807 in minhnv0807/ai-business-skills. It has 42 recorded installs.
More from minhnv0807/ai-business-skills
04-script-video
minhnv0807/ai-business-skills
Dung khi can viet kich ban video ngan — TikTok, Reels, Shorts — voi hook 3 thanh phan, cau truc theo giay va 2 bien the A/B de test. Co Mode A cho san pham va Mode B cho personal brand. Kich hoat khi user nhac 'viet script video', 'kich ban TikTok', 'script Reels', 'noi dung video ngan', 'hook video', 'quay video gi'. Khong dung cho — huong dan dung phim cho editor thi dung skill 44-brief-video-editor; copy quang cao tra tien thi dung skill 05-copy-quang-cao; brief cho creator quay ho thi dung skill 06-brief-ugc-egc.
04-script-video-global
minhnv0807/ai-business-skills
Use when the user needs a spoken script for short-form video — TikTok, Reels, or YouTube Shorts — with a 3-part hook, second-by-second beats, two A/B variants, shoot notes, and a viral score. Switches between product mode and personal brand mode from the context file. Trigger on 'video script', 'TikTok script', 'Reels script', 'Shorts script', 'what should I say in the video', 'write me a hook for a video'. Also use when the user has a video idea and knows only the topic. Not for — cut and edit instructions for an editor, see 44-video-editor-brief-global; paid ad copy, see 05-ad-copy-global; briefing an outside creator to film it, see 06-ugc-egc-brief-global.
09-insight-khach-hang
minhnv0807/ai-business-skills
Dung khi can hieu khach hang du sau de viet duoc content va chon duoc tep — persona 3 tang, cau noi noi tam, pain map, objection list va ngan hang ngon ngu khach hang lay tu review va inbox that. Kich hoat khi user nhac 'insight khach hang', 'chan dung khach hang', 'customer persona', 'khach hang cua toi la ai', 'khach nghi gi', 'ho mua vi ly do gi'. Khong dung cho — thu thap thong tin khi agency nhan khach moi thi dung skill 20-brief-client-intake; nghien cuu tep de chay ads thi dung skill 51-audience-research.
05-copy-quang-cao
minhnv0807/ai-business-skills
Dung khi can viet copy quang cao TRA TIEN cho Meta, TikTok hoac Google — 6 bien the theo 3 tang pheu TOFU/MOFU/BOFU, tuan thu gioi han ky tu va chinh sach nen tang. Co Mode A cho san pham va Mode B cho personal brand, tu chon theo file context. Kich hoat khi user nhac 'viet copy quang cao', 'noi dung chay ads', 'copy Facebook Ads', 'copy TikTok Ads', 'google rsa', 'tieu de quang cao', 'copy retarget'. Khong dung cho — caption dang organic khong chay tien thi dung skill 37-caption-social; slogan / cau hai y / headline poster thi dung skill 74-copy-hai-lop; loi thoai video thi dung skill 04-script-video; duyet copy da viet thi dung skill 62-marketing-review.
16-marketing-psychology
minhnv0807/ai-business-skills
Dung khi can hieu VI SAO nguoi ta mua va ap dung nguyen tac tam ly vao marketing — khan hiem, bang chung xa hoi, cam ket nhat quan, uy tin, co lai, neo gia, ac cam mat mat — kem cach dua vao copy, landing page, email, ads va dieu chinh theo van hoa Viet Nam. Kich hoat khi user nhac 'tam ly khach hang', 'marketing psychology', 'FOMO', 'social proof', 'khan hiem', 'Cialdini', 'lam sao thuyet phuc khach', 'trigger cam xuc', 'khach doc xong van khong hanh dong'. Khong dung cho — viet copy thanh pham thi dung skill 05-copy-quang-cao; dong goi goi ban va bonus thi dung skill 31-offer-design; chan doan mot trang cu the khong ra don thi dung skill 68-cro-audit-trang.
06-brief-ugc-egc
minhnv0807/ai-business-skills
Dung khi can brief NGUOI KHAC quay video ho — khach hang lam UGC, nhan vien lam EGC, hoac KOC va creator da chot: huong dan quay tung canh, viec nen va khong nen lam, review ban tho, mau thoa thuan quyen su dung hinh anh, bang quan ly batch. Kich hoat khi user nhac 'brief UGC', 'brief EGC', 'brief KOC', 'huong dan nhan vien quay video', 'creator quay sai y', 'hop dong quyen su dung video', 'shot guide cho creator'. Khong dung cho — chon, tham dinh, bao gia KOC hoac chuong trinh affiliate thi dung skill 75-hop-tac-koc-affiliate; viet loi thoai kich ban video thi dung skill 04-script-video; huong dan editor dung phim thi dung skill 44-brief-video-editor; rai comment seeding duoi bai dang thi dung skill 38-seeding-plan; thue agency hoac production house lam tron goi thi dung skill 67-agency-vendor-brief.
Popular testing & qa skills
tdd
mattpocock/skills
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
grilling
mattpocock/skills
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
migrate-to-shoehorn
mattpocock/skills
Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.
run-train
lllllllama/rigorpilot-skills
Rigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup verification, short-run verification, full kickoff, or resume, with command, config, seed, log, checkpoint, status, and metric evidence written to standardized trainoutputs/. Do not use for environment setup, exploratory sweeps, speculative idea implementation, or end-to-end orchestration.
test-driven-development
obra/superpowers
Use when implementing any feature or bugfix, before writing implementation code
finishing-a-development-branch
obra/superpowers
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work