All skills
sanity-io avatar

/content-experimentation-best-practices

@ad50ea4 official
by Sanitysanity-io/agent-toolkit187 stars
30

Content experimentation and A/B testing guidance covering experiment design, hypotheses, metrics, sample size, statistical foundations, CMS-managed variants, and common analysis pitfalls. Use this skill when planning experiments, setting up variants, choosing success metrics, interpreting statistical results, or building experimentation workflows in a CMS or frontend stack.

Use this Skill: https://skilld.dev/gh/sanity-io/agent-toolkit/content-experimentation-best-practices

This session only. Nothing lands on disk.

referencesexperiment-design.md

≈782 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Experiment Design Principles

Well-designed experiments produce actionable insights. Poorly designed ones waste time and can mislead.

The Experiment Framework

1. Hypothesis

State what you believe and why.

Bad: "Let's test a new headline" Good: "We believe a benefit-focused headline will increase signup rate by 10% because users are currently confused about our value proposition"

Structure: "We believe [change] will [impact metric] because [reasoning]"

2. Success Metric

Define primary and guardrail metrics.

Primary metric: The main thing you're trying to improve (conversion rate, engagement time) Guardrail metrics: Things that shouldn't get worse (bounce rate, page load time)

3. Sample Size

Calculate required sample size before starting.

Factors:

  • Baseline conversion rate
  • Minimum detectable effect (MDE)
  • Statistical significance level (usually 95%)
  • Statistical power (usually 80%)

Use calculators like Evan Miller's.

4. Duration

Run tests for full business cycles.

  • Minimum: 1-2 weeks (capture weekly patterns)
  • Include weekends
  • Avoid holidays and major events
  • Don't stop early when you see "winning" results

What to Test

High-Impact Areas

  • Headlines and value propositions
  • Call-to-action text and placement
  • Form length and fields
  • Pricing presentation
  • Social proof placement

Lower-Impact (Usually)

  • Button colors
  • Minor copy tweaks
  • Image variations (unless hero)
  • Footer changes

Test Priority Matrix

Impact Effort Priority
High Low Do first
High High Plan carefully
Low Low Quick wins
Low High Avoid

Sanity Integration Pattern

// Experiment variant schema
defineType({
  name: 'experimentVariant',
  type: 'object',
  fields: [
    defineField({ name: 'name', type: 'string' }),
    defineField({ name: 'weight', type: 'number', description: 'Traffic allocation (0-100)' }),
    defineField({ name: 'content', type: 'reference', to: [{ type: 'page' }] }),
  ]
})

// Experiment document
defineType({
  name: 'experiment',
  type: 'document',
  fields: [
    defineField({ name: 'name', type: 'string' }),
    defineField({ name: 'hypothesis', type: 'text' }),
    defineField({ name: 'status', type: 'string', options: { 
      list: ['draft', 'running', 'concluded'] 
    }}),
    defineField({ name: 'variants', type: 'array', of: [{ type: 'experimentVariant' }] }),
    defineField({ name: 'startDate', type: 'datetime' }),
    defineField({ name: 'endDate', type: 'datetime' }),
    defineField({ name: 'winner', type: 'string' }),
    defineField({ name: 'learnings', type: 'text' }),
  ]
})

Avoiding Common Mistakes

Don't peek and stop early

Statistical significance can fluctuate. Commit to your sample size.

Don't test too many things at once

Each variable multiplies required sample size.

Don't ignore segmentation

Winners may differ by device, traffic source, or user type.

Document everything

Future you (and your team) will thank you.

Source: SKILL.md on GitHub

No alerts16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill provides comprehensive guidelines and best practices for content experimentation and A/B testing. It includes illustrative code snippets for CMS integration and statistical calculation. No security risks were identified.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer6mo

    5 files scanned · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at ad50ea4. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 6 months ago
  • a-b-testing
  • content-experimentation
  • statistical-analysis
  • cms
  • conversion-optimization
  • multivariate-testing
  • metrics
  • hypothesis-testing

README badge

README badge for sanity-io/agent-toolkit/content-experimentation-best-practices

Provides guidance on A/B testing, multivariate testing, and statistical analysis for content experiments, including experiment design, metrics selection, sample sizing, CMS integration patterns, and common pitfalls. Use when setting up experimentation infrastructure, designing content variants, or interpreting test results in a headless CMS or frontend stack.

Generated from the current SKILL.md.

Does this skill cover statistical rigor for A/B tests?
Yes. The skill includes statistical foundations covering p-values, confidence intervals, power analysis, and Bayesian methods to help interpret results correctly.
Can I use this skill to set up experiments in a headless CMS?
Yes. The skill includes guidance on CMS-managed variants and field-level variants, with patterns for integrating experimentation into CMS workflows.
What common mistakes does this skill help avoid?
The skill documents 17 common pitfalls across statistics, design, execution, and interpretation to help teams avoid typical experimentation errors.
Does this cover multivariate testing or just A/B tests?
Both. The skill covers A/B testing, multivariate testing, and how to design experiments that test multiple variables simultaneously.

Generated from the current SKILL.md. These answers refresh after source changes.