ab-testing-framework

ab-testing-framework is a cursor rule for coding agents from thatrebeccarae/claude-marketing. It costs 70 tokens per session (1,300 once invoked), scanned A, original, MIT.

A framework for designing and analysing A/B tests, where randomly assigned users see different versions of a page, message, advert, price, or feature.

In plain words
What is it for?
Use it to plan conversion experiments, estimate how many participants are needed, run tests correctly, and interpret their results.
Why use it?
It helps avoid unreliable conclusions by covering hypotheses, sample sizes, test duration, statistical significance, and common testing mistakes.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/thatrebeccarae/claude-marketing/ab-testing-framework
Clone the repo
git clone --depth 1 https://github.com/thatrebeccarae/claude-marketing

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ab-testing-framework

README.md
[![agentmods](https://agentmods.dev/badge/rules/thatrebeccarae/claude-marketing/ab-testing-framework.svg)](https://agentmods.dev/rules/thatrebeccarae/claude-marketing/ab-testing-framework)
Your own site
<a href="https://agentmods.dev/rules/thatrebeccarae/claude-marketing/ab-testing-framework"><img src="https://agentmods.dev/badge/rules/thatrebeccarae/claude-marketing/ab-testing-framework.svg" alt="Measured on agentmods" height="20"></a>
Per session 70 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,300 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00070 $0.01300
Opus 5 $0.00035 $0.00650
Sonnet 5 $0.00014 $0.00260
Haiku 4.5 $0.00007 $0.00130

Measured 4d ago against content hash 88aecb915a1d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ab-testing-framework scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

integrations/cursor/ab-testing-framework.mdc · 139 lines

How it starts

The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.

A/B Testing Framework

Design, run, and analyze conversion experiments with statistical rigor.

Test Design Process

Step 1: Hypothesis

Template: If we [change X], then [metric Y] will [increase/decrease] by [Z%] because [reason].

Good hypothesis: "If we change the CTA from Get Started to Start Free Trial, then signup rate will increase by 15% because it reduces uncertainty about cost."

Bad hypothesis: "If we change the button color, conversions will improve." (No reasoning, no expected magnitude.)

Step 2: Sample Size Calculation

To determine how long to run a test:

Required sample per variation = 16 * (p * (1-p)) / (MDE^2)

Where:
  p = baseline conversion rate (as decimal)
  MDE = minimum detectable effect (as decimal)
Baseline Rate 10% MDE 20% MDE 30% MDE
1% 253,414 63,354 28,157
3% 82,369 20,592 9,152
5% 48,640 12,160 5,404
10% 23,040 5,760 2,560
20% 10,240 2,560 1,138

Minimum test duration: 2 full business weeks (to capture day-of-week effects), even if sample size is reached sooner.

Step 3: Test Execution Rules

  1. Random assignment — visitors must be randomly assigned to control/variant
  2. No peeking — do not check results before reaching sample size
  3. No mid-test changes — do not modify variants during the test
  4. Even traffic split — 50/50 for A/B, even splits for multivariate
  5. Single variable — change only one thing per test (unless multivariate)
  6. Full duration — run for the pre-calculated duration, not until significance

Step 4: Statistical Analysis

Frequentist Approach

Z-test for proportions:

Z = (p1 - p2) / sqrt(p_pooled * (1 - p_pooled) * (1/n1 + 1/n2))

Where:
  p1, p2 = conversion rates of control and variant
  p_pooled = (x1 + x2) / (n1 + n2)
  n1, n2 = sample sizes

p-value interpretation:

  • p < 0.05: Statistically significant (95% confidence)
  • p < 0.01: Highly significant (99% confidence)
  • p >= 0.05: Not significant — do not declare a winner

Read the full file on GitHub · 139 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 139 lines · 70 tokens per session scan A 88aecb915a1d

Subscribe to this mod's changes

ab-testing-framework is a cursor rule published in the GitHub repository thatrebeccarae/claude-marketing (130 stars, last pushed 3mo ago), licensed MIT. It adds 70 tokens to every session and 1,300 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.