Terminal
Terminal/Skill
Guides Mixpanel feature flags through creating, ramping, killing, debugging, archiving and restoring, and routes A/B tests to experiments.
By Mixpanel
Works with
npx skills add mixpanel/ai-plugins --skill manage-feature-flagsEngine required — resolve an engine per
ENGINE.md: one named in the conversation or loaded instructions is mandatory (not set up → offer/mixpanel:installfor it); otherwise use the Mixpanel MCP server, or offer/mixpanel:installif it's unavailable.
Coach the user through Mixpanel feature-flag work end-to-end: routing the request to the right flag-shaped product, ramping safely, killing fast when something goes wrong, and cleaning up when iteration is done.
The single most important idea: a flag's on/off state and its rollout percentage are different levers. The on/off state is the kill switch (instant). The rollout percentage is the throttle (gradient). Most flag bugs come from confusing the two; use the right lever for each step.
Trigger when the user asks anything about creating, configuring, ramping, killing, archiving, debugging, or cleaning up Mixpanel feature flags. Common phrasings:
<feature>"Do not trigger for experiment design ("how should I size this A/B test?", "what's my MDE?"), launch, mid-flight monitoring, or results interpretation ("should we ship this experiment?", "what does this SRM failure mean?") — all of those belong to the manage-experiment skill.
1% → 10% → 50% → 100%).distinct_id).restore, but destructive on a live flag — archiving a flag that still has live traffic strips its rollout state.| File | Purpose |
|---|---|
| references/routing-and-setup.md | Picking Feature Gate vs Dynamic Config vs Experiment. Variant rules. The control-on-OFF rule for Feature Gates. Naming and key hygiene. |
| references/staged-rollout.md | Standard / slow / fast ramp cadences. Kill-switch trigger conditions. The mid-stage ship / hold / roll-back decision. |
| references/lifecycle-and-state-machine.md | The disabled ↔ enabled → archived state machine. The three flag-update call shapes and which silently drop fields. |
| references/hygiene-and-cleanup.md | Pre-creation duplicate check. The cleanup playbook for stale flags. Naming hygiene. The "100% forever" anti-pattern. |
| references/sdk-and-exposure.md | SDK call shapes. Exposure-event semantics. The "no exposures after enable" diagnostic checklist. |
| references/experiment-linked-flags.md | How to spot an experiment-linked flag, what transitions overwrite, and when to route to the manage-experiment skill. |
Run in order. Each step's output is the next step's input. Skip the steps that don't apply to the user's request (e.g. a "kill the flag" turn only needs steps 1, 6, and 8).
Identifying flags the user mentions. Users refer to flags by display name ("the checkout flag"), not by UUID. When the user names a flag, search by key first (exact match), then by case-insensitive name. If more than one matches, list them with name + key and ask which one. Never ask the user for a UUID.
Before doing anything, decide which flag-shaped product the user actually wants:
| User intent | Use | Skill / path |
|---|---|---|
| Toggle a feature on/off for some users (kill switch, gradual rollout, geo-gate, internal-only enable) | Create a Feature Gate | This skill, step 3 |
| Serve different configuration values per user (copy variations, theme keys, structured payloads) — no measurement | Create a Dynamic Config | This skill, step 3 |
| Compare variants and measure which performs better — hypothesis, primary metric, statistical significance | Create an experiment | manage-experiment skill |
Three rules that catch the most common mis-routes:
manage-experiment.If the request is ambiguous (e.g. "create a feature flag for the new checkout flow"), ask one clarifying question: "Do you want a Feature Gate (on/off toggle), a Dynamic Config (different configuration values per user), or an Experiment (compare variants and measure a metric)?" One disambiguation, then proceed.
When the user asks to set up a flag for a feature, always list the project's existing flags first with a partial-name or partial-key match seeded from the feature name. Surface anything you find:
Skipping this check leads to flag debt: orphaned flags, ambiguous evaluation, codepaths gated by stale or duplicate flags. Full playbook in hygiene-and-cleanup.md.
Apply the routing decision from step 1. See routing-and-setup.md for variant shapes, the control-on-OFF rule for Feature Gates, the auto-key generator, and naming hygiene. Two rules worth surfacing now:
new_checkout_button_visible outlives q2_checkout_redesign_test.When the user has given a hypothesis-shaped reason for the flag, populate the description with it — it's the only context a post-launch maintainer will have when they encounter the flag for the first time.
Every newly created flag starts disabled. Enabling is a separate, deliberate step (step 4).
A newly created flag is off until you enable it. Enabling does not start the rollout — the rollout percentage is a separate knob (step 5).
"I bumped the rollout to 50% but no one sees the new behavior" is, almost always, a still-disabled flag. Read the flag's current state when debugging zero exposures.
A newly-enabled flag starts at 0% rollout — you'll always need to bump it manually. A recommended cadence that works for most flags is 1% → 10% → 50% → 100% with at least 24h between stages — calibrate to product risk and the monitoring you actually have. Higher-stakes flags want a slower cadence with denser steps; lower-stakes flags can move faster only if monitoring will catch a regression in minutes, not hours.
Cadence variants and the rationale for each are in staged-rollout.md.
When something looks wrong, disable the flag. Disable serves control to everyone, instantly, and preserves the rollout configuration so you can re-enable to the same percentage once the issue is fixed.
Zeroing the rollout percentage is the wrong lever — it's slower to take effect (the SDK has to re-evaluate the percentage), and it destroys the rollout-stage information. Trigger conditions for a kill, and what doesn't justify a kill, are in staged-rollout.md.
Around 50% rollout, three honest choices:
Don't conflate "no clear win" with "should ship anyway." A small positive effect at 50% is the same small positive effect at 100%, and the maintenance cost of the flag is now the dominant question.
Every flag should reach one of three explicit terminal states: a permanent operational flag (leave enabled at 100%, documented so the next maintainer knows it's deliberate), shipped-and-retired, or reverted-and-retired. The fourth state — drifting at "enabled, 100%" with no documentation — is flag debt; don't leave a flag there. The triage for which to pick, and the SDK-cleanup sequencing for the retired states, is in hygiene-and-cleanup.md.
Archive is destructive on a live flag — the SDK starts serving control to everyone and the rollout configuration is lost. Before archiving, confirm with the user that traffic is off and SDK call sites have been removed. The state machine requires disabling first; full lifecycle in lifecycle-and-state-machine.md.
| User question | Where to look |
|---|---|
| "How do I pick a flag type?" / "Custom variants?" / "Naming and keying?" | references/routing-and-setup.md |
| "Staged rollout cadence?" / "When to kill?" | references/staged-rollout.md |
| "Archive vs delete?" / "How do I clean up stale flags?" / "What's our flag debt?" | references/hygiene-and-cleanup.md |
| "How do I call this from the SDK?" / "Why are exposures zero?" / "Sticky bucketing?" | references/sdk-and-exposure.md |
| "What does restore do?" / "Why did my archive call drop my rename?" | references/lifecycle-and-state-machine.md |
| "Why can't I edit this flag's variants?" / "Why did my flag config get overwritten?" | references/experiment-linked-flags.md |