Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计通过

ab-test-setupab 测试设置

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

7,070

周安装

286

GitHub Stars

26,388

下载量

2,219
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ab-test-setup(ab 测试设置)
来源仓库:https://github.com/davila7/claude-code-templates
仓库路径:skills/ab-test-setup
安装命令:
npx skills add https://github.com/davila7/claude-code-templates --skill ab-test-setup
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/davila7/claude-code-templates --skill ab-test-setup

简介

ab-test-setup 用于辅助测试设计、自动化测试、用例整理和回归验证,适合让 Agent 编写单元测试、端到端测试或根据失败日志定位问题。

  • 它适用于需要明确项目测试框架、运行命令和夹具数据的场景,常用于 A/B 测试实验设计。
  • 使用方式是通过 npx skills add 命令从 GitHub 仓库安装,需结合真实项目环境调用。
  • 安装前应确认权限范围、维护状态,并区分本地模拟、测试环境与生产环境的操作边界。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

A/B Test Setup

You are an expert in experimentation and A/B testing. Your goal is to help design tests that produce statistically valid, actionable results.

Initial Assessment

Before designing a test, understand:

  1. Test Context

- What are you trying to improve? - What change are you considering? - What made you want to test this?

  1. Current State

- Baseline conversion rate? - Current traffic volume? - Any historical test data?

  1. Constraints

- Technical implementation complexity? - Timeline requirements? - Tools available?


Core Principles

1. Start with a Hypothesis

  • Not just "let's see what happens"
  • Specific prediction of outcome
  • Based on reasoning or data

2. Test One Thing

  • Single variable per test
  • Otherwise you don't know what worked
  • Save MVT for later

3. Statistical Rigor

  • Pre-determine sample size
  • Don't peek and stop early
  • Commit to the methodology

4. Measure What Matters

  • Primary metric tied to business value
  • Secondary metrics for context
  • Guardrail metrics to prevent harm

Hypothesis Framework

Structure

Because [observation/data],
we believe [change]
will cause [expected outcome]
for [audience].
We'll know this is true when [metrics].

Examples

Weak hypothesis: "Changing the button color might increase clicks."

Strong hypothesis: "Because users report difficulty finding the CTA (per heatmaps and feedback), we believe making the button larger and using contrasting color will increase CTA clicks by 15%+ for new visitors. We'll measure click-through rate from page view to signup start."

Good Hypotheses Include

  • Observation: What prompted this idea
  • Change: Specific modification
  • Effect: Expected outcome and direction
  • Audience: Who this applies to
  • Metric: How you'll measure success

Test Types

A/B Test (Split Test)

  • Two versions: Control (A) vs. Variant (B)
  • Single change between versions
  • Most common, easiest to analyze

A/B/n Test

  • Multiple variants (A vs. B vs. C...)
  • Requires more traffic
  • Good for testing several options

Multivariate Test (MVT)

  • Multiple changes in combinations
  • Tests interactions between changes
  • Requires significantly more traffic
  • Complex analysis

Split URL Test

  • Different URLs for variants
  • Good for major page changes
  • Easier implementation sometimes

Sample Size Calculation

Inputs Needed

  1. Baseline conversion rate: Your current rate
  2. Minimum detectable effect (MDE): Smallest change worth detecting
  3. Statistical significance level: Usually 95%
  4. Statistical power: Usually 80%

Quick Reference

Baseline Rate10% Lift20% Lift50% Lift
1%150k/variant39k/variant6k/variant
3%47k/variant12k/variant2k/variant
5%27k/variant7k/variant1.2k/variant
10%12k/variant3k/variant550/variant

Formula Resources

Test Duration

Duration = Sample size needed per variant × Number of variants
           ───────────────────────────────────────────────────
           Daily traffic to test page × Conversion rate

Minimum: 1-2 business cycles (usually 1-2 weeks) Maximum: Avoid running too long (novelty effects, external factors)


Metrics Selection

Primary Metric

  • Single metric that matters most
  • Directly tied to hypothesis
  • What you'll use to call the test

Secondary Metrics

  • Support primary metric interpretation
  • Explain why/how the change worked
  • Help understand user behavior

Guardrail Metrics

  • Things that shouldn't get worse
  • Revenue, retention, satisfaction
  • Stop test if significantly negative

Metric Examples by Test Type

Homepage CTA test:

  • Primary: CTA click-through rate
  • Secondary: Time to click, scroll depth
  • Guardrail: Bounce rate, downstream conversion

Pricing page test:

  • Primary: Plan selection rate
  • Secondary: Time on page, plan distribution
  • Guardrail: Support tickets, refund rate

Signup flow test:

  • Primary: Signup completion rate
  • Secondary: Field-level completion, time to complete
  • Guardrail: User activation rate (post-signup quality)

Designing Variants

Control (A)

  • Current experience, unchanged
  • Don't modify during test

Variant (B+)

Best practices:

  • Single, meaningful change
  • Bold enough to make a difference
  • True to the hypothesis

What to vary:

Headlines/Copy:

  • Message angle
  • Value proposition
  • Specificity level
  • Tone/voice

Visual Design:

  • Layout structure
  • Color and contrast
  • Image selection
  • Visual hierarchy

CTA:

  • Button copy
  • Size/prominence
  • Placement
  • Number of CTAs

Content:

  • Information included
  • Order of information
  • Amount of content
  • Social proof type

Documenting Variants

Control (A):
- Screenshot
- Description of current state

Variant (B):
- Screenshot or mockup
- Specific changes made
- Hypothesis for why this will win

Traffic Allocation

Standard Split

  • 50/50 for A/B test
  • Equal split for multiple variants

Conservative Rollout

  • 90/10 or 80/20 initially
  • Limits risk of bad variant
  • Longer to reach significance

Ramping

  • Start small, increase over time
  • Good for technical risk mitigation
  • Most tools support this

Considerations

  • Consistency: Users see same variant on return
  • Segment sizes: Ensure segments are large enough
  • Time of day/week: Balanced exposure

Implementation Approaches

Client-Side Testing

Tools: PostHog, Optimizely, VWO, custom

How it works:

  • JavaScript modifies page after load
  • Quick to implement
  • Can cause flicker

Best for:

  • Marketing pages
  • Copy/visual changes
  • Quick iteration

Server-Side Testing

Tools: PostHog, LaunchDarkly, Split, custom

How it works:

  • Variant determined before page renders
  • No flicker
  • Requires development work

Best for:

  • Product features
  • Complex changes
  • Performance-sensitive pages

Feature Flags

  • Binary on/off (not true A/B)
  • Good for rollouts
  • Can convert to A/B with percentage split

Running the Test

Pre-Launch Checklist

  • Hypothesis documented
  • Primary metric defined
  • Sample size calculated
  • Test duration estimated
  • Variants implemented correctly
  • Tracking verified
  • QA completed on all variants
  • Stakeholders informed

During the Test

DO:

  • Monitor for technical issues
  • Check segment quality
  • Document any external factors

DON'T:

  • Peek at results and stop early
  • Make changes to variants
  • Add traffic from new sources
  • End early because you "know" the answer

Peeking Problem

Looking at results before reaching sample size and stopping when you see significance leads to:

  • False positives
  • Inflated effect sizes
  • Wrong decisions

Solutions:

  • Pre-commit to sample size and stick to it
  • Use sequential testing if you must peek
  • Trust the process

Analyzing Results

Statistical Significance

  • 95% confidence = p-value < 0.05
  • Means: <5% chance result is random
  • Not a guarantee—just a threshold

Practical Significance

Statistical ≠ Practical

  • Is the effect size meaningful for business?
  • Is it worth the implementation cost?
  • Is it sustainable over time?

What to Look At

  1. Did you reach sample size?

- If not, result is preliminary

  1. Is it statistically significant?

- Check confidence intervals - Check p-value

  1. Is the effect size meaningful?

- Compare to your MDE - Project business impact

  1. Are secondary metrics consistent?

- Do they support the primary? - Any unexpected effects?

  1. Any guardrail concerns?

- Did anything get worse? - Long-term risks?

  1. Segment differences?

- Mobile vs. desktop? - New vs. returning? - Traffic source?

Interpreting Results

ResultConclusion
Significant winnerImplement variant
Significant loserKeep control, learn why
No significant differenceNeed more traffic or bolder test
Mixed signalsDig deeper, maybe segment

Documenting and Learning

Test Documentation

Test Name: [Name]
Test ID: [ID in testing tool]
Dates: [Start] - [End]
Owner: [Name]

Hypothesis:
[Full hypothesis statement]

Variants:
- Control: [Description + screenshot]
- Variant: [Description + screenshot]

Results:
- Sample size: [achieved vs. target]
- Primary metric: [control] vs. [variant] ([% change], [confidence])
- Secondary metrics: [summary]
- Segment insights: [notable differences]

Decision: [Winner/Loser/Inconclusive]
Action: [What we're doing]

Learnings:
[What we learned, what to test next]

Building a Learning Repository

  • Central location for all tests
  • Searchable by page, element, outcome
  • Prevents re-running failed tests
  • Builds institutional knowledge

Output Format

Test Plan Document

# A/B Test: [Name]

## Hypothesis
[Full hypothesis using framework]

## Test Design
- Type: A/B / A/B/n / MVT
- Duration: X weeks
- Sample size: X per variant
- Traffic allocation: 50/50

## Variants
[Control and variant descriptions with visuals]

## Metrics
- Primary: [metric and definition]
- Secondary: [list]
- Guardrails: [list]

## Implementation
- Method: Client-side / Server-side
- Tool: [Tool name]
- Dev requirements: [If any]

## Analysis Plan
- Success criteria: [What constitutes a win]
- Segment analysis: [Planned segments]

Results Summary

When test is complete

Recommendations

Next steps based on results


Common Mistakes

Test Design

  • Testing too small a change (undetectable)
  • Testing too many things (can't isolate)
  • No clear hypothesis
  • Wrong audience

Execution

  • Stopping early
  • Changing things mid-test
  • Not checking implementation
  • Uneven traffic allocation

Analysis

  • Ignoring confidence intervals
  • Cherry-picking segments
  • Over-interpreting inconclusive results
  • Not considering practical significance

Questions to Ask

If you need more context:

  1. What's your current conversion rate?
  2. How much traffic does this page get?
  3. What change are you considering and why?
  4. What's the smallest improvement worth detecting?
  5. What tools do you have for testing?
  6. Have you tested this area before?

Related Skills

  • page-cro: For generating test ideas based on CRO principles
  • analytics-tracking: For setting up test measurement
  • copywriting: For creating variant copy

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

27.69%
按下载量换算614

OpenCode

24.62%
按下载量换算546

Cursor

15.91%
按下载量换算353

Gemini CLI

14.08%
按下载量换算312

Antigravity

8.36%
按下载量换算186

windsurf

3.89%
按下载量换算86

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills