SkillsReviewed · sanity-io

Content Experimentation Best Practices

Content Experimentation Best Practices is an AI assistant skill for content teams and developers planning A/B tests, but its implementation examples need adaptation. It covers experiment design, statistical interpretation and Sanity CMS integration, including variant assignment and analytics events.

Researched 15 Nov 2026

In short.

Content Experimentation Best Practices is an AI assistant skill for content teams and developers planning A/B tests, but it provides guidance rather than a working experimentation system. Four references connect hypotheses, metrics and statistical interpretation to Sanity schemas, cookie-based variant assignment and analytics events. Its concrete integration patterns make it useful for planning and implementation, while incomplete runtime code and simplified statistical claims require further work. Execution results, compatibility and measured conversion improvements are not established by the supplied files.

Researched and written by an AI model and checked by a second AI model. How it works

Covers skills/content-experimentation-best-practices/SKILL.md and its four references: cms-integration.md, common-pitfalls.md, experiment-design.md and statistical-foundations.md. Includes the repository-level LICENSE supplied above the folder. Excludes the rest of agent-toolkit, external platform documentation and linked calculators. No code was executed. Installation, assistant-host behavior, live traffic assignment, analytics delivery, statistical calibration and conversion outcomes remain untested.

The overview

Identity

Content Experimentation Best Practices is a skill folder in Sanity's agent-toolkit repository. Its SKILL.md entry file describes when the guidance applies and points to four references: experiment design, statistical foundations, CMS integration and common pitfalls.

The selected resource is this instruction and reference collection. The wider toolkit is outside its scope. Original source folder: [https://github.com/sanity-io/agent-toolkit/tree/main/skills/content-experimentation-best-practices].

Assessment

The skill is useful for turning an informal content change into a structured experiment: state a hypothesis, choose a primary metric and guardrails, estimate traffic requirements, and plan measurement. Its strongest implementation detail is the connection between Sanity content models, visitor assignment and experiment-specific queries.

It is an implementation starting point. The files do not supply a complete assignment service, analytics backend or statistical analysis engine. Statistical explanations are introductory, and several recommendations lack the conditions needed for direct operational use.

Users

Content strategists and growth teams can use the planning material to define what a test should teach them. Beginners get explanations of controls, statistical power, confidence intervals and meaningful effect sizes. Interpreting results still requires care; these explanations do not replace a complete analysis method.

Developers familiar with TypeScript, Sanity schemas and GROQ will get the most direct implementation value. Teams with limited traffic should pay particular attention to the warnings about underpowered tests: the skill does not guarantee a conclusive result from a small audience.

Capabilities

The guidance covers hypotheses, primary and guardrail metrics, minimum detectable effects, sample-size estimation, duration and test prioritization. It explains p-values, confidence intervals and power, and discusses early stopping, multiple comparisons, segment differences, sample ratio mismatch and novelty effects.

The CMS reference presents separate experiment documents, variants stored directly on content documents, and external experimentation platforms. Its examples include Sanity schemas, weighted visitor assignment, GROQ content selection, exposure and conversion events, and a browser data-layer event. Bayesian analysis, bandits and sequential testing receive brief introductions rather than implementations.

Using it

Requirements

Using the folder as an assistant skill requires a host that can read SKILL.md and access its relative reference files. The supplied material names no supported assistant hosts, required model, installation command or compatibility matrix.

Implementing the Sanity examples requires schema helpers, appropriate page content types, GROQ query integration, cookie handling and an analytics client. The examples leave imports, the Variant type, getCookie, setCookie and analytics initialization unspecified. Package versions and deployment requirements are unknown.

Mechanism

The entry file directs an assistant to the reference matching the task. The references supply explanatory text and code sketches; they do not execute experiments themselves.

The assignment sketch returns null for an empty variant list, reuses a cookie only when its variant ID still exists, and otherwise chooses a variant using weights normalized against their total. It stores assignments for 30 days. A nonpositive total selects the first variant; a final fallback selects the last variant.

The GROQ example matches both experiment ID and variant ID and requires the experiment to be running. Matching both IDs addresses the risk of selecting another experiment's row when identifiers such as control are reused. Separate functions illustrate exposure and conversion event payloads.

Setup

Obtain the complete skill folder and keep SKILL.md alongside references/. The entry file depends on those relative paths. No host-specific activation procedure is supplied. Original entry file: [https://raw.githubusercontent.com/sanity-io/agent-toolkit/3ed3a143f8d3413faa7790ac0b2274fd3a8a6320/skills/content-experimentation-best-practices/SKILL.md].

For a Sanity implementation, choose an architecture and reconcile the schema sketches into one consistent model. Supply the missing cookie and analytics integrations, connect assignment to content rendering, and ensure experiment status and exposure events reflect the content visitors actually see. Installation and runtime compatibility remain untested.

Example

For a landing-page headline test, a team could define signup rate as its primary metric and page-load time as a guardrail, then write a hypothesis explaining why the alternative headline should help. The CMS-managed pattern stores experiment configuration and variant content, assigns visitors, queries the matching experiment and variant, and records exposure and conversion events.

The statistical reference illustrates a 5% baseline conversion rate and a target of 6%, an increase of one percentage point. Its approximate formula produces 7,600 visitors per variant, or about 15,200 total. These are illustrative planning figures, not observed results or a universal traffic requirement.

Assessment & evidence

Limitations

The integration examples are incomplete application fragments. They use differing schema sketches that need reconciliation. The assignment function does not validate individual weights as finite and nonnegative, and existing valid cookie assignments persist when allocation weights change. Cross-device identity and exposure deduplication are not specified.

The sample-size formula uses a fixed coefficient and does not expose significance level, power or unequal allocation as parameters. The broad claim that Bayesian methods have no peeking problem is not accompanied by priors, decision thresholds or a stopping policy. It does not establish a complete continuous-monitoring method.

Duration advice includes both 1–2 weeks and at least two full business cycles; neither establishes adequate duration for every experiment. Segment analysis is encouraged without a worked treatment of additional comparisons. Runtime correctness, statistical calibration and conversion benefits remain unverified.

Reasoning

The practical value comes from connecting content decisions to implementation details. A hypothesis and primary metric define the question; content schemas define the alternatives; assignment and tracking determine whether the resulting measurements answer that question.

The stale-cookie check and combined experiment-and-variant query address concrete routing risks. The warnings about early stopping, inadequate traffic and trivial effects address common interpretation risks. Together they provide a useful checklist, while reliable conclusions still depend on implementation verification and a justified statistical method.

Alternatives

The resource presents three architectural options. Separate experiment documents give content teams control but complicate queries and publishing coordination. Fields on existing content documents keep related content together but reduce flexibility. External platforms move experimentation responsibilities into another service and add integration complexity and cost.

The source names Optimizely, LaunchDarkly and VWO as external options; their current capabilities, pricing and compatibility are not assessed here. Bayesian analysis, multi-armed bandits and sequential testing are also introduced as methodological options, with no included engines or comparative results.

Evidence

The supplied evidence includes the complete SKILL.md entry file, all four referenced documents and the repository LICENSE. These establish the resource's contents, illustrative code and redistribution terms.

The material is documentation with embedded TypeScript and GROQ examples. It contains no actual experiment dataset, execution logs, compatibility results or measured business outcomes. Correct operation and effectiveness cannot be established from these files alone.

Access & freshness

Costs

The supplied MIT notice permits use and redistribution free of charge, subject to its notice requirements. Operating costs are unknown: the files quote no prices for an assistant host, Sanity, analytics, hosting or experimentation services.

The CMS reference identifies additional cost as a drawback of external experimentation platforms, but supplies no amounts, quotas or plan details. Developer integration and experiment traffic are required by the examples, but their cost is not quantified.

Rights

The supplied repository-level MIT license names Sanity as the 2025 copyright holder and covers software and associated documentation. It permits use, copying, modification, publication, distribution, sublicensing and sale, provided the copyright and permission notice accompany copies or substantial portions.

The license disclaims warranties and liability. No different license notice appears in the supplied skill files. Preserve the supplied notice when redistributing the entry file and references. License source: [https://raw.githubusercontent.com/sanity-io/agent-toolkit/3ed3a143f8d3413faa7790ac0b2274fd3a8a6320/LICENSE].

Freshness

The available source snapshot is commit 3ed3a143f8d3413faa7790ac0b2274fd3a8a6320, captured on 15 November 2026 at 21:12:12 UTC. The pinned source links identify that snapshot; the main-branch folder may change.

The supplied files establish no tagged release, supported Sanity version or later changes. The capture date does not establish when the guidance was authored or updated.

Actions

Start with a written hypothesis, one primary metric, guardrails, a meaningful detectable effect and a justified sample-size and duration plan. Choose the CMS architecture that matches who will create variants and who will maintain assignment and analytics.

Before adapting the code for live traffic, reconcile the schemas, validate weights, define assignment persistence rules and supply the missing integrations. Verify rendered variants, experiment status, exposure and conversion events, and observed traffic allocation. Validate any continuous-monitoring or multiple-comparison method separately; treat inconclusive results as uncertain.

Evidence for this report

LICENSEnotice · checked 2026-11-15