PostHog Feature Flags & Experiments
Overview
Feature flags gate whether a piece of code runs for a given user or
percentage of traffic. Early-access features are PostHog's primitive for
managing a beta opt-in program — customers who've asked to try something
before general availability. Experiments run a controlled comparison
between variants of a flag against a primary metric. For an MSP, the
recurring question this skill answers is "is this feature actually live
for this client" or "what is this experiment currently testing" — not
turning either on or off.
Anti-triggers
- Creating, updating, or deleting a feature flag, early-access feature,
or experiment — this skill and this plugin are read-only. See
GOVERNANCE.md, Tool permission tiers: feature-flag
mutations change what code path a live client's production application
executes, immediately and with no built-in dry run, which is exactly why
this plugin excludes them at v1. Make the change directly in the PostHog
UI, with the same care you'd give any production config change.
- Product usage or error-rate trends — use
insights-and-dashboards.
- Which users are in a targeting cohort — the cohort itself lives in
cohorts-and-events; this skill only reports what a flag or experiment
is configured to target.
Core Concepts
A feature flag has a key, a rollout condition (percentage, specific users,
or property-based targeting), and an enabled/disabled state per condition
group. Early-access features are a distinct PostHog primitive layered on
top of flags, purpose-built for beta programs — a user opts in, and that
opt-in maps to a flag being active for them. Experiments attach two or more
flag variants to a primary metric and report which variant is winning.
API Patterns
The confirmed read tool family for this domain:
early-access-feature-list — list early-access features and their status
early-access-feature-retrieve — retrieve a single early-access feature
Both are read-only; the corresponding write tools
(early-access-feature-create, early-access-feature-destroy,
early-access-feature-partial-update) and general feature-flag CRUD are
excluded from this plugin — see
GOVERNANCE.md. Experiment lookups (list/get) follow
the same read-only pattern. PostHog's own docs carry the exhaustive tool
catalog, including the broader feature-flag API this plugin does not
expose:
posthog.com/docs/model-context-protocol/tools.
Common Workflows
Confirming a feature is live before a client escalation
A client asks why a beta feature isn't showing up for one of their users:
early-access-feature-list to find the feature by name
early-access-feature-retrieve to check its current status and
targeting configuration
- Report what's configured — if the fix requires changing rollout
percentage or targeting, that's a write action outside this plugin's
surface; hand it to a human with the appropriate PostHog access
Reviewing active experiments ahead of a QBR
- List current experiments and their status
- Pull each experiment's configuration (variants, primary metric) via the
read tool
- Summarize what's actively being tested for the client-facing report —
experiment results themselves are analytics data, so cross-reference
with
insights-and-dashboards if the QBR needs the metric outcome, not
just the configuration
Gotchas
- Read-only surface, no exceptions. Even an emergency flag toggle
(killing a broken feature) is outside this plugin. Escalate to a human
with direct PostHog access rather than looking for a workaround tool.
- "Feature flags" and "early-access features" overlap in name, not in
tool surface. The confirmed read tools here are specifically the
early-access-feature family. PostHog's general feature-flag API has its
own tools, documented separately — don't assume a flag question is
automatically answerable through the early-access tools.
- A flag or experiment's targeting rules don't tell you who's actually in
them right now — that's a cohort or event-level question; see
cohorts-and-events.
Related Skills
1---2name: posthog-feature-flags-experiments3description: Read-only lookups of PostHog early-access feature flags and experiments — rollout status, targeting, and configuration. Does not create, update, or delete flags or experiments.4---56# PostHog Feature Flags & Experiments78## Overview910Feature flags gate whether a piece of code runs for a given user or11percentage of traffic. Early-access features are PostHog's primitive for12managing a beta opt-in program — customers who've asked to try something13before general availability. Experiments run a controlled comparison14between variants of a flag against a primary metric. For an MSP, the15recurring question this skill answers is "is this feature actually live16for this client" or "what is this experiment currently testing" — not17turning either on or off.1819## Anti-triggers2021- **Creating, updating, or deleting a feature flag, early-access feature,22 or experiment** — this skill and this plugin are read-only. See23 [GOVERNANCE.md](../../GOVERNANCE.md), *Tool permission tiers*: feature-flag24 mutations change what code path a live client's production application25 executes, immediately and with no built-in dry run, which is exactly why26 this plugin excludes them at v1. Make the change directly in the PostHog27 UI, with the same care you'd give any production config change.28- **Product usage or error-rate trends** — use `insights-and-dashboards`.29- **Which users are in a targeting cohort** — the cohort itself lives in30 `cohorts-and-events`; this skill only reports what a flag or experiment31 is configured to target.3233## Core Concepts3435A feature flag has a key, a rollout condition (percentage, specific users,36or property-based targeting), and an enabled/disabled state per condition37group. Early-access features are a distinct PostHog primitive layered on38top of flags, purpose-built for beta programs — a user opts in, and that39opt-in maps to a flag being active for them. Experiments attach two or more40flag variants to a primary metric and report which variant is winning.4142## API Patterns4344The confirmed read tool family for this domain:4546- `early-access-feature-list` — list early-access features and their status47- `early-access-feature-retrieve` — retrieve a single early-access feature4849Both are read-only; the corresponding write tools50(`early-access-feature-create`, `early-access-feature-destroy`,51`early-access-feature-partial-update`) and general feature-flag CRUD are52excluded from this plugin — see53[GOVERNANCE.md](../../GOVERNANCE.md). Experiment lookups (list/get) follow54the same read-only pattern. PostHog's own docs carry the exhaustive tool55catalog, including the broader feature-flag API this plugin does not56expose:57[posthog.com/docs/model-context-protocol/tools](https://posthog.com/docs/model-context-protocol/tools).5859## Common Workflows6061### Confirming a feature is live before a client escalation6263A client asks why a beta feature isn't showing up for one of their users:64651. `early-access-feature-list` to find the feature by name662. `early-access-feature-retrieve` to check its current status and67 targeting configuration683. Report what's configured — if the fix requires changing rollout69 percentage or targeting, that's a write action outside this plugin's70 surface; hand it to a human with the appropriate PostHog access7172### Reviewing active experiments ahead of a QBR73741. List current experiments and their status752. Pull each experiment's configuration (variants, primary metric) via the76 read tool773. Summarize what's actively being tested for the client-facing report —78 experiment results themselves are analytics data, so cross-reference79 with `insights-and-dashboards` if the QBR needs the metric outcome, not80 just the configuration8182## Gotchas8384- **Read-only surface, no exceptions.** Even an emergency flag toggle85 (killing a broken feature) is outside this plugin. Escalate to a human86 with direct PostHog access rather than looking for a workaround tool.87- **"Feature flags" and "early-access features" overlap in name, not in88 tool surface.** The confirmed read tools here are specifically the89 early-access-feature family. PostHog's general feature-flag API has its90 own tools, documented separately — don't assume a flag question is91 automatically answerable through the early-access tools.92- **A flag or experiment's targeting rules don't tell you who's actually in93 them right now** — that's a cohort or event-level question; see94 `cohorts-and-events`.9596## Related Skills9798- [Insights & Dashboards](../insights-and-dashboards/SKILL.md) — Metric outcomes, including experiment results99- [Cohorts & Events](../cohorts-and-events/SKILL.md) — Who is actually targeted100- [API Patterns](../api-patterns/SKILL.md) — Auth, scopes, and error handling