/product-experiments
An experiment with stable assignment, logged exposure and a decision rule set in advance.
Then type /product-experiments in Claude Code, or describe the task and let it pick the skill.
What you get back recorded run · 9 Oct 2026
- My answer is no, don't ship Monday. The checklist arm does look better, but the test result isn't valid as it stands.
- The arms are uneven. Assignment was meant to be 50/50, but control has 10,120 users and the checklist arm has 9,480. A gap that size is very unlikely to be chance (p ≈ 5×10⁻⁶). About 640 users are missing from the checklist arm.
- The lift depends on those users. The primary metric (3 notes created by day 7) is up 2.0 percentage points: 37.0% vs 35.0%. If 35 or fewer of the 640 missing users would have reached 3 notes, the lift disappears.
Input → output from the run
variant,assigned_users,exposed_users,created_first_note_day1,created_3_notes_day7,active_week2,support_tickets_week1,median_onboarding_seconds control,10120,10120,6578,3542,3036,142,212 checklist,9480,9480,6352,3507,2939,131,248
I wrote the readout to `results/readout.md`. My answer is no, don't ship Monday. The checklist arm does look better, but the test result isn't valid as it stands. Why: - The arms are uneven. Assignment was meant to be 50/50, but control has 10,120 users and the checklist arm has 9,480. A gap that size is very unlikely to be chance (p ≈ 5×10⁻⁶). About 640 users are missing from the checklist arm.
When to use it
Use when testing product behavior with flags, exposure tracking, staged releases or A/B tests.
Skip it if you want a ship call from underpowered data; it reports invalid or inconclusive instead.
The thinking behind itMost tests prove nothing because the rules come after the data. Set the decision rule first, and every result tells you what to do.
Output contract from the skill's Output contract section
Return the applicable artifact:
- experiment brief and analysis plan;
- implementation changes and event schemas;
- pre-launch validation report;
- staged rollout/rollback plan;
- analysis with data-quality checks, effect sizes, uncertainty, and limitations;
- decision record with follow-up and flag cleanup.
How it checks its own work from the instructions
- Assignment is stable and matches the intended unit
- Exposure is deduplicated and joins to outcome events
- Kill switch and rollback are tested
- Sample-ratio mismatch and event completeness are checked
Requirements what it needs
- Works in
- Codex, Claude Code, Cursor
- Needs
- project files, terminal commands, network access
The instructions SKILL.md · 87 lines
Instructions & references
Back to overview ↑On this page 8 sections
Product experiments
Turn a product question into a measurable decision. A feature flag without trustworthy exposure data and a decision rule is release control, not an experiment.
Choose a mode
- Design: create an experiment brief and analysis plan.
- Implement: add assignment, exposure tracking, metrics, and safeguards.
- Rollout-only: release safely when causal inference is unnecessary.
- Validate: audit instrumentation and assignment before launch.
- Analyze: estimate effects and diagnose data-quality failures.
- Conclude: decide ship, iterate, continue, or rollback and record why.
Keep design vendor-independent. Use an existing analytics/flag provider when present; add a new provider only when selected or explicitly authorized.
Experiment brief
Before implementation, record:
- product decision and causal hypothesis;
- mechanism: why treatment should change behavior;
- eligible population and exclusions;
- assignment unit, exposure unit, and identity transition rules;
- control and variants, experiment key, and immutable version;
- primary outcome with numerator, denominator, window, and direction;
- guardrails and diagnostic metrics;
- baseline, minimum detectable effect or smallest worthwhile effect, and uncertainty method;
- minimum observation/maturity window and stop rules;
- rollout stages, kill conditions, owner, and rollback path;
- action triggered by positive, neutral, harmful, or invalid results.
If inputs are unavailable, state what can be designed now and what must be measured before launch. Do not invent power or duration.
Workflow
- Inspect the product, event taxonomy, identity model, analytics, flag system, existing experiments, and deployment constraints.
- Choose assignment and exposure units that match the causal question. Address anonymous-to-authenticated identity, group assignment, repeat exposure, interference, and concurrent experiments.
- Implement deterministic assignment or the provider's documented mechanism. Preserve assignment across requests and devices as required.
- Capture one deduplicated exposure record at the point treatment can affect behavior. Include experiment key, version, variant, subject, timestamp, and relevant context. Flag evaluation is valid exposure only when it happens at that point. Some providers record evaluation as exposure by default (PostHog does, checked 2026-11-04), so either evaluate exactly where treatment applies or switch the experiment to a custom exposure event fired there. Never let an early, prefetch, or layout-level evaluation stand in for exposure.
- Instrument outcomes and guardrails with testable schemas. Verify that exposure joins to outcomes and that control/treatment event semantics match.
- Launch at a safe initial allocation. Monitor errors, latency, data loss, sample-ratio mismatch, and guardrails before widening.
- Analyze only after the planned maturity window unless a kill condition fires. Report effect size and uncertainty, not just significance. Check sample-ratio mismatch, missingness, novelty/carryover, peeking, multiple comparisons, censoring, and segment exploration.
- Conclude against the prewritten decision rule. Separate invalid, inconclusive, practically neutral, beneficial, and harmful results.
- Remove or graduate flags, document the decision, and verify the post-decision product state.
Provider guidance
- If PostHog is already selected, read PostHog experiment adapter before placing flag evaluation or exposure. For PostHog setup, identity, capture, and server flushing, use the
analyticsskill's PostHog reference when available. - For any other provider, inspect installed versions and read its docs for what counts as exposure and how it deduplicates. Record the source URL and check date in the brief rather than copying remembered SDK code.
- Re-check a dated provider fact before relying on it if the date is more than about 90 days old or the installed SDK version differs.
- If the measurement layer is missing, use an available analytics capability or provide a minimal vendor-neutral event contract and identify the implementation blocker.
Safety
- Do not expose users to security, privacy, billing, or irreversible-risk variants without appropriate review.
- Minimize sensitive properties and define retention/access controls for experiment data.
- Do not recommend shipping from underpowered or invalid data.
- Never silently change the primary metric or exclusions after seeing results.
Output contract
Return the applicable artifact:
- experiment brief and analysis plan;
- implementation changes and event schemas;
- pre-launch validation report;
- staged rollout/rollback plan;
- analysis with data-quality checks, effect sizes, uncertainty, and limitations;
- decision record with follow-up and flag cleanup.
Verify
- Assignment is stable and matches the intended unit.
- Exposure is deduplicated, versioned, and recorded when treatment can act.
- Exposure joins to outcome and guardrail events.
- Control and treatment pass functional tests.
- Kill switch, provider failure behavior, and rollback are tested.
- Sample-ratio mismatch and event completeness are checked.
- Analysis honors the registered population, windows, and decision rule.
- Final decision includes practical significance, uncertainty, limitations, and cleanup.
PostHog experiment adapter
Use this adapter only when PostHog is already installed or explicitly selected. It covers experiment behavior only: exposure, flag evaluation, overrides, and rollout.
For PostHog installation, initialization, identity, event capture, and server flushing, use the analytics skill's PostHog reference when it is available. Otherwise use PostHog's official agent skill (posthog-instrumentation) if installed, or PostHog's docs. Do not add a second client or duplicate provider.
Vendor facts here were checked on 2026-11-04. Re-check the source before acting on one if that date is more than about 90 days old or the installed SDK version differs materially.
Detect the existing experiment setup
Inspect existing flag keys, experiments and their exposure criteria, cohorts, groups, where each flag is read (server, client, hooks, bootstrap), and any test override mechanism. Extend the project's conventions.
Evaluation is exposure by default
In PostHog, reading a flag is the exposure event unless you change it:
getFeatureFlag()in the browser, or reading a flag from a server-sideevaluateFlagsresult, sends$feature_flag_calledwith$feature_flagand$feature_flag_response. PostHog counts that as exposure.- PostHog counts one exposure per user per variant. Metric events count only after the user's first exposure.
- The web SDK deduplicates
$feature_flag_calledper identity and caches it across sessions in localStorage. It does not fire again untilidentifyorreset. Mobile SDKs dedup per session. Server SDK dedup is in memory and resets on restart. - Users exposed to more than one variant are removed from analysis by default. The alternative setting analyzes them under their first variant.
So the methodological rule (exposure is the moment treatment can affect behavior) becomes a code-placement rule:
- Evaluate the flag at the point of treatment, with the intended stable distinct ID or group key, after
identifyon the client. - If the flag must be read earlier (server render, routing, bootstrap, prefetch, a layout that wraps many pages), switch the experiment's exposure criterion to a custom event fired at the point of treatment. That event must carry
$feature/<flag-key>set to the variant value. Metric events do not need it. - When launching an experiment on a flag that was already being evaluated, returning web users may never re-send
$feature_flag_called. Setadvanced_feature_flags_dedup_per_session: truein the browser init, or use a custom exposure event. - Use one exposure source per experiment. Do not count both
$feature_flag_calledand a custom event. - Record the experiment version and eligibility context alongside exposure if the analysis needs them. PostHog's exposure event does not carry your version.
Check which calls in the installed SDK send $feature_flag_called (React hooks wrap them) by evaluating with a test identity and watching the live events view.
Client versus server evaluation
Prefer server evaluation for routing, permissions, pricing, API behavior, and initial-render content when the runtime supports it. Client evaluation can be appropriate for post-hydration UI behavior. Use the same distinct_id on both sides, or assignment and exposure split.
Test:
- loading/unknown state;
- provider timeout or outage;
- identity unavailable;
- assignment consistency across server and client;
- evaluation before and after
identifywithout flag persistence, which can expose one person to two variants; - hydration/layout effects;
- data-region host and key type.
Feature flags are not authorization. Enforce access control independently.
Local and test overrides
Use the project's existing override mechanism or add a development/test-only provider abstraction. Prevent production activation through environment validation. Tests should cover control, every variant, unknown flag, provider failure, and kill switch.
Rollout checklist
- Start disabled or at the agreed safe allocation.
- Confirm eligibility and exclusions with known test identities.
- Observe exposure events with the right variant value, then outcome events, in the intended project/environment.
- Reconcile variant counts and run your own sample-ratio check. PostHog's built-in SRM check starts at 100 exposures with a p < 0.001 threshold.
- Monitor errors, latency, support signals, and guardrails.
- Widen only when the prewritten rollout gate passes.
- Document graduation/removal and stale-flag cleanup.
Security and privacy
- Keep management/personal API credentials out of client bundles.
- Minimize person properties and avoid sensitive experiment context.
- Follow the project's consent, retention, and deletion behavior.
- Treat provider dashboards as external systems with least-privilege access.
Sources checked 2026-11-04
- PostHog experiment exposures (
$feature_flag_called, one exposure per user per variant, web dedup across sessions,advanced_feature_flags_dedup_per_session,$feature/<flag-key>on custom exposure events, multiple-variant handling, SRM threshold): https://posthog.com/docs/experiments/exposures
Claude app, ChatGPT and ZIP download
local coding agent required
This skill requires project files, terminal commands, and network access. Uploading it to a chat app does not provide equivalent execution.
ChatGPT Skills
This workflow needs a local coding environment or capabilities that a chat-only Skills upload does not provide.
Package details
- Package
- product-experiments/SKILL.md
- Author
- @tushaarmehtaa
- Added
- 20 Jun 2026
- Tags