Guides agents through the 3-step experiment creation flow: defining the hypothesis, configuring rollout, and setting up analytics. Delegates rollout decisions to configuring-experiment-rollout and metric setup to configuring-experiment-analytics.\nTRIGGER when: user asks to create a new experiment or A/B test, OR when you are about to call experiment-create.\nDO NOT TRIGGER when: user is updating an existing experiment, managing lifecycle, or only browsing experiments.
Add this skill
npx mdskills install PostHog/creating-experiments@PostHog? Sign in with GitHub to claim this listing.Clear 3-step experiment creation flow with proper delegation and practical defaults
1---2name: creating-experiments3description: "Guides agents through the 3-step experiment creation flow: defining the hypothesis, configuring rollout, and setting up analytics. Delegates rollout decisions to configuring-experiment-rollout and metric setup to configuring-experiment-analytics.\nTRIGGER when: user asks to create a new experiment or A/B test, OR when you are about to call experiment-create.\nDO NOT TRIGGER when: user is updating an existing experiment, managing lifecycle, or only browsing experiments."4---56# Creating experiments78This skill walks through the 3-step flow for creating a new A/B test experiment.910## Core principle: draft first, iterate on details1112Create the experiment as a draft quickly, then iterate on metrics and configuration.13The user gets a tangible draft immediately and can refine it.1415## The 3-step creation flow1617### Step 1: What are we testing?1819Gather these before calling `experiment-create`:2021- **Experiment name** — descriptive, inferred from context when possible22- **Hypothesis** — what you expect to happen (goes in `description`)23- **Feature flag key** — kebab-case. Ask if they want a new flag or to reuse an existing one.24 The flag is auto-created — do NOT create one separately.25- **Type** — leave empty (will internally default to `"product"`. The `"web"` value is reserved for no-code experiments configured visually with the PostHog26 toolbar in a browser; it cannot be meaningfully driven via MCP. If a user asks for a27 no-code/toolbar experiment, point them to the PostHog UI instead of creating one here.)2829If the user gives enough context to infer these, don't ask — just proceed.3031### Step 2: Who sees what variant?3233This is about rollout configuration.3435**Before asking any rollout question, load `configuring-experiment-rollout`.** The disambiguation wording, recommendations, and post-answer branches live there — do not formulate rollout questions yourself, and do not assume an example you remember covers the user's path.3637Key decision points (covered in detail by `configuring-experiment-rollout`):3839- Variant split (how many variants, what percentage each)40- Overall rollout percentage (what % of all users enter the experiment)41- Whether to persist the flag across authentication steps4243If the user doesn't mention rollout specifics, use defaults: 50/50 control/test, 100% rollout.4445### Step 3: How to measure impact?4647This is about analytics and metrics. **Load the `configuring-experiment-analytics` skill** for guidance.4849**Do NOT configure metrics on creation.** Metrics are not passed to `experiment-create` — they are added50afterwards via `experiment-update`. This keeps the creation call lightweight.5152When the user specifies metrics upfront, acknowledge them and add them immediately after creation.53When they don't, create the draft and then guide them through metric setup as a follow-up.5455## How to create5657Call `experiment-create` with:5859```json60{61 "name": "Descriptive experiment name",62 "feature_flag_key": "kebab-case-key",63 "description": "Hypothesis: [what you expect to happen]",64 "parameters": {65 "feature_flag_variants": [66 { "key": "control", "name": "Control", "split_percent": 50 },67 { "key": "test", "name": "Test", "split_percent": 50 }68 ],69 "rollout_percentage": 10070 }71}72```7374Two different percentages — do NOT mix them up:7576- `feature_flag_variants[].split_percent` — how users **inside** the experiment are split across variants (must sum to 100, recommended to have an even split).77- `parameters.rollout_percentage` — what fraction of **all** users enter the experiment at all (0-100, defaults to 100).7879Key details:8081- First variant must have key `"control"`. Minimum 2, maximum 20 variants.82- `rollout_percentage` defaults to 100 if omitted.83- Stats default to Bayesian. Only set `stats_config` if the user requests Frequentist.8485## After creation86871. **Always show the experiment URL.** The `experiment-create` response includes `_posthogUrl` — always display this link so the user can view and configure the experiment in the UI.88892. **Remind the user to implement the feature flag in code.** Link to the experiment page and say "implement the flag as shown here" — the experiment detail page shows implementation snippets for the user's SDK.90913. **Guide through metrics** if not yet configured — load the `configuring-experiment-analytics` skill.92934. **Launch** when ready — use the `experiment-launch` tool.94
Full transparency — inspect the skill content before installing.