Skip to content
Development
Skill

/auditing-experiments-flags

Audit PostHog experiments and feature flags for configuration issues, staleness, and best-practice violations. Read when the user asks to audit, health-check, or review experiments or feature flags, check flag hygiene, or verify experiment setup.

From plugin
ai-plugin
95180 skills1 agent3 commands3 hooks
+1

Claude Code

$ npx -y skills add PostHog/ai-plugin --skill auditing-experiments-flags --agent claude-code

SKILL.md

auditing-experiments-flags.SKILL.md
name: auditing-experiments-flags
description: 'Audit PostHog experiments and feature flags for configuration issues, staleness, and best-practice violations. Read when the user asks to audit, health-check, or review experiments or feature flags, check flag hygiene, or verify experiment setup.'

Auditing experiments and feature flags

This skill teaches you how to run configuration audits on experiments and feature flags. All checks use the experiment and feature flag read tools (`experiment-get`, `experiment-list`, `feature-flag-get-definition`, `feature-flag-get-all`) โ€” no SQL queries are needed for Phase 1 checks.

Usage modes

Quick check (single entity)

When the user asks about a specific experiment or flag:

1. Fetch the entity via `experiment-get` (experiment ID) or `feature-flag-get-definition` (numeric flag ID). 2. Apply the relevant checks from [experiment checks](./references/experiment-checks.md) or [flag checks](./references/flag-checks.md). 3. Report findings inline as markdown, grouped by severity (CRITICAL first, then WARNING, then INFO). 4. Include entity links as `[Experiment: name](/experiments/id)` or `[Flag: key](/feature_flags/id)`.

Scoped audit (one domain)

When the user asks to audit all experiments or all flags:

1. Bulk-fetch via `experiment-list` or `feature-flag-get-all`. 2. Run all checks for that domain against each entity. 3. Group findings by severity, then by entity. 4. Report as inline markdown.

Full audit (comprehensive)

When the user asks for a comprehensive audit of both experiments and flags:

1. Fetch all experiments via `experiment-list` and all flags via `feature-flag-get-all`. 2. Run all experiment checks and all flag checks. 3. Apply [recurring patterns](./references/synthesis-patterns.md) to identify patterns across multiple findings. 4. If there are more than 5 entities with findings, write them to a notebook for easier navigation. Otherwise report inline. Create the notebook from the project's own notebook tools. Run `search notebooks?-` to load them and read the titles.

Output format

For each finding, include:

  • **Severity badge**: `๐Ÿ”ด CRITICAL`, `๐ŸŸก WARNING`, or `๐Ÿ”ต INFO`
  • **Check name**: Which check produced this finding
  • **Entity link**: Markdown link to the entity
  • **What's wrong**: One-sentence description
  • **Action**: What to do about it (see [remediation actions](./references/remediation-actions.md))

Example:

> ๐ŸŸก **WARNING** โ€” Flag integration ยท [Experiment: checkout-redesign](/experiments/42) > The linked feature flag is inactive (paused). Traffic is not being split. > **Action**: Re-enable the flag or end the experiment.

Handling unavailable data

Some checks require activity logs (`feature-flags-activity-retrieve` for flags), which may not be available in every session. If activity log data is unavailable:

  • Skip `checkActivityHistory` (experiment check) entirely.
  • Skip the "toggle instability" and "never activated" sub-checks in flag lifecycle checks.
  • In your report, note which checks were skipped and why:

> _Skipped: Activity history checks (activity logs not available via current tools)_

Partial failures

If a fetch call fails for some entities:

  • Continue with the entities you could fetch.
  • Report which entities could not be assessed and why.
  • Do not silently omit entities from the audit.

Reference files

  • [Experiment checks](./references/experiment-checks.md) โ€” experiment configuration checks
  • [Flag checks](./references/flag-checks.md) โ€” feature flag checks
  • [Finding types](./references/finding-taxonomy.md) โ€” severity and category definitions
  • [Recurring patterns](./references/synthesis-patterns.md) โ€” patterns across multiple findings
  • [Remediation actions](./references/remediation-actions.md) โ€” what to do about each finding
Read more
@posthog
Ships withai-plugin

Official PostHog plugin for AI clients. Access PostHog products directly from your AI coding tool.

95180 skills1 agent1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
95
Star history of PostHog/ai-plugin on GitHub, a chart by star-history.com

Other skills on ai-plugin.

analyzing-ai-citations

analyzing-ai-citations

Answer AI citation and answer engine optimization (AEO) questions in PostHog: whether AI answer engines (ChatGPT, Claude, and anโ€ฆ

@posthog@posthogInstall Skill
analyzing-expensive-users

analyzing-expensive-usโ€ฆ

Analyze the most expensive users in AI observability and explain why they cost so much. Use when the user asks about topโ€ฆ

@posthog@posthogInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, orโ€ฆ

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android โ€” semantic ARIA roles and labels,โ€ฆ

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commitsโ€ฆ

react1d252k
@facebook@facebookInstall Skill

Questions about auditing-experiments-flags.

Which coding agents can use auditing-experiments-flags?
auditing-experiments-flags installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.