/managing-experiment-lifecycle
Guides experiment state transitions: launching, pausing, resuming, freezing/unfreezing exposure, ending, shipping variants, archiving, resetting, duplicating, and copying to another project. Covers preconditions, implications for variant assignment and analysis, and the decision
$ npx -y skills add posthog/posthog --skill managing-experiment-lifecycle --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/managing-experiment-lifecycle
Context preview
The summary Claude sees to decide when to auto-load this skill.
Guides experiment state transitions: launching, pausing, resuming, freezing/unfreezing exposure, ending, shipping variants, archiving, resetting, duplicating, and copying to another project. Covers preconditions, implications for variant assignment and analysis, and the decision
SKILL.md
managing-experiment-lifecycle.SKILL.mdname: managing-experiment-lifecycle
description: "Guides experiment state transitions: launching, pausing, resuming, freezing/unfreezing exposure, ending, shipping variants, archiving, resetting, duplicating, and copying to another project. Covers preconditions, implications for variant assignment and analysis, and the decision framework for when to use each action.\nTRIGGER when: user asks to launch, pause, resume, end, ship, archive, reset, duplicate, or copy an experiment to another project, or to freeze/unfreeze exposure (stop enrolling new users while metrics keep flowing, or reopen enrollment).\nDO NOT TRIGGER when: user is creating an experiment (use creating-experiments), configuring rollout (use configuring-experiment-rollout), or setting up metrics (use configuring-experiment-analytics)."
Managing experiment lifecycle
This skill covers experiment state transitions — what each action does, when to use it, and how it affects variant assignment and analysis.
State diagram
draft ──launch──▶ running ──end──▶ stopped ──archive──▶ archived
│ │ ▲ │
│ pause resume ship_variant
│ │ │ (also ends if running)
│ ▼ │
│ paused (flag inactive, still "running" status)
│
├─freeze_exposure──▶ exposure_frozen ──unfreeze_exposure──▶ running
│ (enrollment closed, metrics keep flowing)
Any non-draft state ──reset──▶ draftActions and their implications
For each action, the two key questions:
1. **Who sees what variant?** (user perspective) 2. **Who is in my analysis?** (statistical perspective)
Launch (`experiment-launch`)
Transitions draft → running. Activates the feature flag and sets `start_date`.
- **Preconditions**: must be in draft, flag needs 2-20 multivariate variants (no specific key required; the baseline defaults to "control" when present, else the first variant)
- **Pre-launch checklist**: has at least one metric? Variants correct? Flag implemented in code?
- **Variants**: users start being bucketed into variants based on the configured split
- **Analysis**: data collection begins from `start_date`
No request body needed.
Pause (`experiment-pause`)
Deactivates the feature flag. Users fall back to the default experience (typically control).
- **Preconditions**: must be running and not already paused
- **Variants**: flag is not returned by `/decide` — no new exposure events recorded
- **Analysis**: no new data while paused, but existing data is preserved. Experiment stays "running".
No request body. Use `experiment-resume` to reactivate.
Resume (`experiment-resume`)
Reactivates the feature flag after a pause. Users are re-bucketed deterministically into the same variants.
- **Preconditions**: must be paused
- **Variants**: same assignment as before pause — deterministic bucketing
- **Analysis**: exposure tracking resumes
No request body.
Freeze exposure (`experiment-freeze-exposure`)
Stops enrolling **new** users while everything else keeps going: already-enrolled users keep their variant, metrics keep flowing, and `end_date` stays null. Snapshots the already-exposed users into a static cohort and narrows every release condition on the feature flag to that cohort. Status becomes `exposure_frozen`.
Use for long-horizon metrics (revenue, LTV, retention, renewals) when the sample is big enough and you want to stop adding users without stopping measurement. Neither end nor pause fits that job: end stops measurement at `end_date`, and pause deactivates the flag for everyone.
- **Preconditions**: must be running (not draft, stopped, paused, or already frozen), flag linked and not deleted, at least one release condition
- **Variants**: enrolled users keep their variant (deterministic bucketing); new users no longer match the flag
- **Analysis**: exposures stop growing (a flat exposure curve is expected), but metric data keeps accumulating for enrolled users
**Timing**: the exposure scan and cohort snapshot run synchronously inside the API call, and duration scales with the number of exposed persons — an experiment with tens of thousands of exposed users can take on the order of tens of seconds. Set expectations with the user, wait for the response, and don't treat a slow call as a failure or retry it.
**Not applicable (400) for**:
- **Group-aggregated experiments** — the flag targets groups, not persons, and a person cohort can't freeze group-based matching
- **Experiments in a holdout** — holdout assignment is evaluated before release conditions, so new users would keep entering the holdout
- **Flags with early access conditions** — also evaluated before release conditions, so freezing can't stop new enrollment
- **Mostly-anonymous exposure** (e.g. experiments on logged-out surfaces) — anonymous "personless" users can never match a person cohort and would silently lose their variant, so freezes with more than a small unresolved share are rejected
- **Very large exposed sets** — the exposure scan is bounded by a person cap and a timeout; over either bound the API returns a clean 400 rather than freezing
When a freeze is rejected, explain which limitation applies rather than retrying — these are structural, not transient.
**Interactions with other actions**: ship-variant and reset strip the freeze (both also delete the snapshot cohort); end does NOT touch the flag, so ending a frozen experiment leaves the flag narrowed to the snapshot cohort. SDKs using local evaluation can't resolve static cohorts, so a frozen flag evaluates via the `/decide` endpoint (standard static-cohort behavior). Exposures ingested in the final moments before freezing may miss the snapshot (ingestion lag).
No request body. Use `experiment-unfreeze-exposure` to reopen enrollment.
Unfreeze exposure (`experiment-unfreeze-exposure`)
Reopens enrollment on an exposu
Read more
name: managing-experiment-lifecycle description: "Guides experiment state transitions: launching, pausing, resuming, freezing/unfreezing exposure, ending, shipping variants, archiving, resetting, duplicating, and copying to another project. Covers preconditions, implications for variant assignment and analysis, and the decision framework for when to use each action.\nTRIGGER when: user asks to launch, pause, resume, end, ship, archive, reset, duplicate, or copy an experiment to another project, or to freeze/unfreeze exposure (stop enrolling new users while metrics keep flowing, or reopen enrollment).\nDO NOT TRIGGER when: user is creating an experiment (use creating-experiments), configuring rollout (use configuring-experiment-rollout), or setting up metrics (use configuring-experiment-analytics)."
Managing experiment lifecycle
This skill covers experiment state transitions — what each action does, when to use it, and how it affects variant assignment and analysis.
State diagram
draft ──launch──▶ running ──end──▶ stopped ──archive──▶ archived
│ │ ▲ │
│ pause resume ship_variant
│ │ │ (also ends if running)
│ ▼ │
│ paused (flag inactive, still "running" status)
│
├─freeze_exposure──▶ exposure_frozen ──unfreeze_exposure──▶ running
│ (enrollment closed, metrics keep flowing)
Any non-draft state ──reset──▶ draftActions and their implications
For each action, the two key questions:
1. **Who sees what variant?** (user perspective) 2. **Who is in my analysis?** (statistical perspective)
Launch (`experiment-launch`)
Transitions draft → running. Activates the feature flag and sets `start_date`.
- **Preconditions**: must be in draft, flag needs 2-20 multivariate variants (no specific key required; the baseline defaults to "control" when present, else the first variant)
- **Pre-launch checklist**: has at least one metric? Variants correct? Flag implemented in code?
- **Variants**: users start being bucketed into variants based on the configured split
- **Analysis**: data collection begins from `start_date`
No request body needed.
Pause (`experiment-pause`)
Deactivates the feature flag. Users fall back to the default experience (typically control).
- **Preconditions**: must be running and not already paused
- **Variants**: flag is not returned by `/decide` — no new exposure events recorded
- **Analysis**: no new data while paused, but existing data is preserved. Experiment stays "running".
No request body. Use `experiment-resume` to reactivate.
Resume (`experiment-resume`)
Reactivates the feature flag after a pause. Users are re-bucketed deterministically into the same variants.
- **Preconditions**: must be paused
- **Variants**: same assignment as before pause — deterministic bucketing
- **Analysis**: exposure tracking resumes
No request body.
Freeze exposure (`experiment-freeze-exposure`)
Stops enrolling **new** users while everything else keeps going: already-enrolled users keep their variant, metrics keep flowing, and `end_date` stays null. Snapshots the already-exposed users into a static cohort and narrows every release condition on the feature flag to that cohort. Status becomes `exposure_frozen`.
Use for long-horizon metrics (revenue, LTV, retention, renewals) when the sample is big enough and you want to stop adding users without stopping measurement. Neither end nor pause fits that job: end stops measurement at `end_date`, and pause deactivates the flag for everyone.
- **Preconditions**: must be running (not draft, stopped, paused, or already frozen), flag linked and not deleted, at least one release condition
- **Variants**: enrolled users keep their variant (deterministic bucketing); new users no longer match the flag
- **Analysis**: exposures stop growing (a flat exposure curve is expected), but metric data keeps accumulating for enrolled users
**Timing**: the exposure scan and cohort snapshot run synchronously inside the API call, and duration scales with the number of exposed persons — an experiment with tens of thousands of exposed users can take on the order of tens of seconds. Set expectations with the user, wait for the response, and don't treat a slow call as a failure or retry it.
**Not applicable (400) for**:
- **Group-aggregated experiments** — the flag targets groups, not persons, and a person cohort can't freeze group-based matching
- **Experiments in a holdout** — holdout assignment is evaluated before release conditions, so new users would keep entering the holdout
- **Flags with early access conditions** — also evaluated before release conditions, so freezing can't stop new enrollment
- **Mostly-anonymous exposure** (e.g. experiments on logged-out surfaces) — anonymous "personless" users can never match a person cohort and would silently lose their variant, so freezes with more than a small unresolved share are rejected
- **Very large exposed sets** — the exposure scan is bounded by a person cap and a timeout; over either bound the API returns a clean 400 rather than freezing
When a freeze is rejected, explain which limitation applies rather than retrying — these are structural, not transient.
**Interactions with other actions**: ship-variant and reset strip the freeze (both also delete the snapshot cohort); end does NOT touch the flag, so ending a frozen experiment leaves the flag narrowed to the snapshot cohort. SDKs using local evaluation can't resolve static cohorts, so a frozen flag evaluates via the `/decide` endpoint (standard static-cohort behavior). Exposures ingested in the final moments before freezing may miss the snapshot (ingestion lag).
No request body. Use `experiment-unfreeze-exposure` to reopen enrollment.
Unfreeze exposure (`experiment-unfreeze-exposure`)
Reopens enrollment on an exposu
:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Repo: posthog/posthog
Other skills on posthog.
- /analyzing-expensive-users
Analyze the most expensive users in AI observability and explain why they cost so much. Use when the user asks about top spenders, expensive users, per-user LLM cost, user-level cost drivers, or patterns behind high AI observability spend.
Open skill - /creating-online-evaluations
Author continuously-running online evaluations in PostHog AI observability, grounded in real failure modes you've identified. Use when the user wants evaluations that automatically score new generations or whole traces going forward — "create an eval to catch X", "continuously
Open skill - /exploring-ai-failures
Find where an AI/LLM application is failing in production and surface the failure patterns, working from real traces. Use when someone wants to understand what's going wrong with an AI feature, find and categorize failure modes, triage errors, or investigate quality issues
Open skill - /exploring-llm-clusters
Investigate AI observability clusters — understand usage patterns in AI/LLM traffic, compare cluster behavior, compute cost/latency metrics, and drill into individual traces within clusters.
Open skill - /exploring-llm-costs
Investigate LLM spend in PostHog — total cost over time, cost by model, provider, user, trace, or custom dimension, token and cache-hit economics, and cost regressions. Use when the user asks "how much are we spending on LLMs?", "which model / user / feature is most expensive?",
Open skill - /exploring-llm-evaluations
Investigate AI observability evaluations — `hog` (deterministic code-based), `llm_judge` (LLM-prompt-based), and `sentiment` (user-message sentiment). Find existing evaluations, inspect their configuration, run them against specific generations, query individual results, and
Open skill

