Communitygithub.com

ab-testing

当用户想要计划、设计或实施A/B测试或实验,或构建增长实验项目时使用。

ab-testing 是什么?

该技能旨在帮助用户设计具有统计有效性和可操作结果的实验与A/B测试。它从假设构建、核心原则和测试类型选择入手,提供了完整的实验设计框架。技能详细说明了样本量计算、指标选择(主要、次要和护栏指标)、变体设计最佳实践以及流量分配策略。此外,技能还涵盖了客户端与服务器端实现、测试运行检查清单、结果分析(包括统计显著性解读和常见误区)以及完整的文档模板。重点在于将一次性测试转化为可持续的增长实验项目,通过ICE优先级评分、实验节奏管理和实验手册来建立增长引擎。该技能适用于Claude Code、Cursor和Codex等AI Agent平台。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/coreyhaines31/marketingskills/tree/main/skills/ab-testing

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

A/B 测试设置

您是实验和A/B测试方面的专家。您的目标是帮助设计能够产生统计有效、可操作结果的测试。

初始评估

首先检查产品营销背景: 如果存在 .agents/product-marketing.md(或 .claude/product-marketing.md,或在旧版设置中的旧版文件名 product-marketing-context.md),请先阅读它,然后再提出问题。使用该上下文,仅询问未涵盖或与本任务特定相关的信息。

在设计测试之前,需要了解:

  1. 测试背景 - 您想要改进什么?您正在考虑什么变更?
  2. 当前状态 - 基准转化率?当前流量水平?
  3. 约束条件 - 技术复杂性?时间线?可用工具?

核心原则

1. 从假设开始

  • 不仅仅是“看看会发生什么”
  • 对结果的特定预测
  • 基于推理或数据

2. 一次只测试一个变量

  • 每次测试仅改变一个变量
  • 否则你无法知道什么起了作用

3. 统计严谨性

  • 预先确定样本量
  • 不要偷看结果并提前停止
  • 承诺遵循方法论

4. 衡量重要指标

  • 主要指标与业务价值挂钩
  • 次要指标提供上下文
  • 护栏指标防止伤害

假设框架

结构

因为 [观察/数据],
我们认为 [变更]
将导致 [预期结果]
对 [受众]。
当 [指标] 时,我们就会知道这是真的。

示例

弱假设:“改变按钮颜色可能会增加点击。”

强假设:“由于用户报告难以找到CTA(根据热图和反馈),我们相信对于新访客,将按钮放大并使用对比色将使CTA点击率提高15%以上。我们将衡量从页面浏览量到注册开始的点击率。”


测试类型

类型描述所需流量
A/B两个版本,单一变更中等
A/B/n多个变体较高
MVT组合中的多个变更非常高
拆分URL变体使用不同URL中等

样本量

快速参考

基准10% 提升20% 提升50% 提升
1%15万/变体3.9万/变体6000/变体
3%4.7万/变体1.2万/变体2000/变体
5%2.7万/变体7000/变体1200/变体
10%1.2万/变体3000/变体550/变体

计算器:

有关详细的样本量表和时间计算:参见 references/sample-size-guide.md


指标选择

主要指标

  • 最重要的单一指标
  • 直接与假设挂钩
  • 用于判断测试结果

次要指标

  • 支持主要指标的解释
  • 解释变更为何/如何起作用

护栏指标

  • 不应恶化的事项
  • 如果显著负面,则停止测试

示例:定价页面测试

  • 主要:套餐选择率
  • 次要:页面停留时间、套餐分布
  • 护栏:支持工单、退款率

设计变体

可以改变的内容

类别示例
标题/文案信息角度、价值主张、具体性、语气
视觉设计布局、颜色、图片、层次结构
CTA按钮文案、大小、位置、数量
内容包含的信息、顺序、数量、社会证明

最佳实践

  • 单一、有意义的变更
  • 足够大胆以产生差异
  • 忠实于假设

流量分配

方法分配比例何时使用
标准50/50A/B测试默认
保守90/10、80/20限制不良变体的风险
逐步增加从小开始,逐步增加技术风险缓解

注意事项:

  • 一致性:用户回访时看到相同变体
  • 在一天/一周的不同时间段内平衡曝光度

实现

客户端

  • 页面加载后通过JavaScript修改
  • 实现快速,但可能导致闪烁
  • 工具:PostHog、Optimizely、VWO

服务端

  • 在渲染前确定变体
  • 无闪烁,需要开发工作
  • 工具:PostHog、LaunchDarkly、Split

运行测试

启动前检查清单

  • 假设已记录
  • 主要指标已定义
  • 样本量已计算
  • 变体已正确实现
  • 追踪已验证
  • 所有变体已完成QA

测试期间

应该做:

  • 监控技术问题
  • 检查细分质量
  • 记录外部因素

避免:

  • 偷看结果并提前停止
  • 在测试进行中修改变体
  • 从新来源添加流量

偷看问题

在达到样本量之前查看结果并提前停止会导致误报和错误决策。预先承诺样本量并信任过程。


分析结果

统计显著性

  • 95%置信度 = p值 < 0.05
  • 意味着结果随机发生的概率小于5%
  • 不是保证——只是一个阈值

分析清单

  1. 是否达到样本量? 如果没有,结果是初步的
  2. 是否统计显著? 检查置信区间
  3. 效应量是否具有实际意义? 与MDE、项目影响比较
  4. 次要指标是否一致? 是否支持主要指标?
  5. 护栏指标是否有问题? 是否有任何指标恶化?
  6. 不同细分群体是否有差异? 移动端与桌面端?新访客与回访用户?

解读结果

结果结论
显著胜出实施变体
显著落败保留对照组,了解原因
无显著差异需要更多流量或更大胆的测试
信号混杂深入挖掘,可能按细分群体分析

文档记录

每次测试都记录以下内容:

  • 假设
  • 变体(附带截图)
  • 结果(样本量、指标、显著性)
  • 决策和经验教训

有关模板:参见 references/test-templates.md


增长实验项目

单独测试很有价值。持续的实验项目是一种复利资产。本节介绍如何将实验作为持续的增长引擎来运行,而不仅仅是一次性测试。

实验循环

1. 产生假设(来自数据、研究、竞争对手、客户反馈)
2. 使用ICE评分进行优先级排序
3. 设计并运行测试
4. 以统计严谨性分析结果
5. 将获胜者推广到手册
6. 从经验教训中产生新假设
→ 重复

假设产生

从多个来源为你的实验待办列表注入内容:

来源寻找什么
分析流失点、转化率低的页面、表现不佳的细分群体
客户研究痛点、困惑、未满足的期望
竞争对手分析他们使用而你没有的功能、信息或用户体验模式
支持工单关于转化流程的重复问题或投诉
热图/录屏用户犹豫、愤怒点击或放弃的地方
过去的实验“显著落败者”测试通常揭示值得尝试的新角度

ICE优先级排序

在每个维度上给每个假设打分1-10分:

维度问题
影响如果这有效,它会在多大程度上影响主要指标?
信心我们有多确定这能奏效?(基于数据,而非直觉。)
容易度我们能够多快、多低成本地发布并衡量这个?

ICE分数 = (影响 + 信心 + 容易度) / 3

首先运行得分最高的实验。随着背景变化,每月重新评分。

实验速度

将你的实验速率作为增长的前瞻性指标进行追踪:

指标目标
每月启动的实验数大多数团队为4-8个
胜率成熟项目通常为20-30%(持续较高的胜率可能表明假设过于保守)
平均测试持续时间2-4周
待办列表深度20+个假设排队中
累计提升所有获胜者的复合增益

实验手册

当测试获胜时,不仅要实施它,还要记录该模式:

## [实验名称]
**日期**:[日期]
**假设**:[假设]
**样本量**:[每个变体的样本数]
**结果**:[胜出/落败/无结论] — [主要指标] 改变了 [X%](95%置信区间:[范围],p=[值])
**护栏**:[任何护栏指标及其结果]
**细分差异**:[按设备、细分群体或队列的显著差异]
**为何成功/失败**:[分析]
**模式**:[可重复使用的洞察,例如“定价CTA附近的社会证明增加了套餐选择”]
**应用场景**:[此模式可能适用的其他页面/流程]
**状态**:[已实施/搁置/需要后续测试]

随着时间的推移,你的手册将成为针对你的产品和受众的经过验证的增长模式库。

实验节奏

每周(30分钟):审查正在运行的实验是否存在技术问题和护栏指标。不要过早宣布胜者——但如果护栏显著负面,请停止测试。

双周:总结已完成的实验。分析结果,更新手册,从待办列表中启动下一个实验。

每月(1小时):审查实验速度、胜率、累计提升。补充假设待办列表。使用ICE重新确定优先级。

每季度:审计手册。哪些模式已被广泛应用?哪些获胜模式尚未扩展?漏斗的哪些区域测试不足?


常见错误

测试设计

  • 测试的变更过小(无法检测)
  • 测试的变量过多(无法隔离)
  • 没有明确的假设

执行

  • 提前停止
  • 在测试过程中进行修改
  • 不检查实现

分析

  • 忽略置信区间
  • 挑选细分群体
  • 过度解读无结论的结果

特定任务问题

  1. 你当前的转化率是多少?
  2. 这个页面获得了多少流量?
  3. 你正在考虑什么改变,为什么?
  4. 值得检测的最小改善是多少?
  5. 你有用于测试的工具吗?
  6. 你之前测试过这个领域吗?

相关技能

  • cro:用于基于CRO原则生成测试想法
  • analytics:用于设置测试衡量
  • copywriting:用于创建变体文案

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ads

When the user wants help with paid advertising campaigns on Google Ads, Meta (Facebook/Instagram), LinkedIn, Twitter/X, or other ad platforms. Also use when the user mentions

ai-seo

When the user wants to optimize content for AI search engines, get cited by LLMs, or appear in AI-generated answers. Also use when the user mentions

analytics

When the user wants to set up, improve, or audit analytics tracking and measurement. Also use when the user mentions

aso

When the user wants to audit or optimize an App Store or Google Play listing. Also use when the user mentions

attribution

When the user wants to figure out which marketing actually drives conversions and revenue, choose or interpret an attribution model, or reconcile conflicting numbers across tools. Also use when the user mentions

churn-prevention

When the user wants to reduce churn, build cancellation flows, set up save offers, recover failed payments, or implement retention strategies. Also use when the user mentions

cold-email

Write B2B cold emails and follow-up sequences that get replies. Use when the user wants to write cold outreach emails, prospecting emails, cold email campaigns, sales development emails, or SDR emails. Also use when the user mentions

co-marketing

When the user wants to find co-marketing partners, plan joint campaigns, or brainstorm partnership opportunities. Use when the user says

community-marketing

Build and leverage online communities to drive product growth and brand loyalty. Use when the user wants to create a community strategy, grow a Discord or Slack community, manage a forum or subreddit, build brand advocates, increase word-of-mouth, drive community-led growth, engage users post-signup, or turn customers into evangelists. Trigger phrases: \

competitor-profiling

When the user wants to research, profile, or analyze competitors from their URLs. Also use when the user mentions

competitors

When the user wants to create competitor comparison or alternative pages for SEO and sales enablement. Also use when the user mentions

content-strategy

When the user wants to plan a content strategy, decide what content to create, or figure out what topics to cover. Also use when the user mentions

copy-editing

When the user wants to edit, review, or improve existing marketing copy, or refresh outdated content. Also use when the user mentions

copywriting

When the user wants to write, rewrite, or improve marketing copy for any page — including homepage, landing pages, pricing pages, feature pages, about pages, or product pages. Also use when the user says

coreyhaines31/ab-test-setup

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program," or "experiment playbook." Use this whenever someone is comparing two approaches and wants to measure which performs better, or when they want to build a systematic experimentation practice. For tracking implementation, see analytics-tracking. For page-level conversion optimization, see page-cro.

coreyhaines31/analytics-tracking

When the user wants to set up, improve, or audit analytics tracking and measurement. Also use when the user mentions "set up tracking," "GA4," "Google Analytics," "conversion tracking," "event tracking," "UTM parameters," "tag manager," "GTM," "analytics implementation," "tracking plan," "how do I measure this," "track conversions," "attribution," "Mixpanel," "Segment," "are my events firing," or "analytics isn't working." Use this whenever someone asks how to know if something is working or wants to measure marketing results. For A/B test measurement, see ab-test-setup.

coreyhaines31/aso-audit

When the user wants to audit or optimize an App Store or Google Play listing. Also use when the user mentions 'ASO audit,' 'app store optimization,' 'optimize my app listing,' 'improve app visibility,' 'app store ranking,' 'audit my listing,' 'why aren't people downloading my app,' 'improve my app conversion,' 'keyword optimization for app,' or 'compare my app to competitors.' Use when the user shares an App Store or Google Play URL and wants to improve it.

coreyhaines31/competitor-alternatives

When the user wants to create competitor comparison or alternative pages for SEO and sales enablement. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' 'competitive landing pages,' 'how do we compare to X,' 'battle card,' or 'competitor teardown.' Use this for any content that positions your product against competitors. Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. For sales-specific competitor docs, see sales-enablement.

coreyhaines31/email-sequence

When the user wants to create or optimize an email sequence, drip campaign, automated email flow, or lifecycle email program. Also use when the user mentions "email sequence," "drip campaign," "nurture sequence," "onboarding emails," "welcome sequence," "re-engagement emails," "email automation," "lifecycle emails," "trigger-based emails," "email funnel," "email workflow," "what emails should I send," "welcome series," or "email cadence." Use this for any multi-email automated flow. For cold outreach emails, see cold-email. For in-app onboarding, see onboarding-cro.

coreyhaines31/form-cro

When the user wants to optimize any form that is NOT signup/registration — including lead capture forms, contact forms, demo request forms, application forms, survey forms, or checkout forms. Also use when the user mentions "form optimization," "lead form conversions," "form friction," "form fields," "form completion rate," "contact form," "nobody fills out our form," "form abandonment," "too many fields," "demo request form," or "lead form isn't converting." Use this for any non-signup form that captures information. For signup/registration forms, see signup-flow-cro. For popups containing forms, see popup-cro.

相关技能