Auditing experiments and feature flags
SkillDev toolsThis skill lets an AI agent audit PostHog experiments and feature flags for configuration issues, staleness, and best-practice violations. It uses the experiment and feature flag read tools to run predefined checks, such as paused flags, missing traffic splits, and stale setups. Findings are reported inline as markdown grouped by severity, or written into a notebook when many entities have issues.
Then ask your AI: use the Auditing experiments and feature flags skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; Ahel provides instructions and does not run this skill.
No other account needed.
Have an AI agent that can use the PostHog experiment and feature flag read tools.
What your AI can do with it
- Audit a single experiment or flag with experiment-get or feature-flag-get-definition
- Bulk-audit all experiments via experiment-list or all flags via feature-flag-get-all
- Run predefined checks for paused flags, missing traffic splits, and staleness
- Report findings inline as markdown grouped by severity: CRITICAL, WARNING, INFO
- Write findings to a notebook when more than 5 entities have issues
- Apply recurring patterns to identify patterns across multiple findings
Getting started
- Have an AI agent that can use the PostHog experiment and feature flag read tools.
- Make sure the agent can call experiment-get, experiment-list, feature-flag-get-definition, and feature-flag-get-all.
- Ask the agent to audit a specific experiment or flag, or to audit all experiments or all flags.
- Review the findings reported inline as markdown, grouped by severity.
- If more than 5 entities have findings, check the notebook the agent creates for easier navigation.
What this skill tells your AI
The instructions your AI receives, as published by posthog/posthog in products/posthog_ai/skills/auditing-experiments-flags/SKILL.md and read by Ahel’s review.
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:
- Fetch the entity via
experiment-get(experiment ID) orfeature-flag-get-definition(numeric flag ID). - Apply the relevant checks from experiment checks or flag checks.
- Report findings inline as markdown, grouped by severity (CRITICAL first, then WARNING, then INFO).
- 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:
- Bulk-fetch via
experiment-listorfeature-flag-get-all. - Run all checks for that domain against each entity.
- Group findings by severity, then by entity.
- Report as inline markdown.
Full audit (comprehensive)
When the user asks for a comprehensive audit of both experiments and flags:
- Fetch all experiments via
experiment-listand all flags viafeature-flag-get-all. - Run all experiment checks and all flag checks.
- Apply recurring patterns to identify patterns across multiple findings.
- 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)
Example:
🟡 WARNING — Flag integration · Experiment: checkout-redesign 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 — experiment configuration checks
- Flag checks — feature flag checks
- Finding types — severity and category definitions
- Recurring patterns — patterns across multiple findings
- Remediation actions — what to do about each finding
Signals
- GitHub stars
- 40k
- Forks
- 3k
- Last commit
- Oct 2026
Questions
- What does this skill audit?
- It audits PostHog experiments and feature flags for configuration issues, staleness, and best-practice violations, using predefined checks such as paused flags, missing traffic splits, and stale setups.
- Does it need SQL queries?
- No. All Phase 1 checks use the experiment and feature flag read tools: experiment-get, experiment-list, feature-flag-get-definition, and feature-flag-get-all.
Advanced
- Item type
- skill
- Key
auditing-experiments-flags-posthog- Source
- github.com/posthog/posthog