
Auditing Experiments and Feature Flags
FreeEnsure your experiments and flags are correctly configured.
Free Β· Opens the source repo
What Auditing Experiments and Feature Flags does
The Auditing Experiments and Feature Flags skill is designed to help developers and teams maintain the integrity of their experiments and feature flags within PostHog. This skill provides a structured approach to auditing, allowing users to identify configuration issues, staleness, and violations of best practices. By leveraging built-in tools such as experiment-get, experiment-list, feature-flag-get-definition, and feature-flag-get-all, users can perform thorough checks without needing to write SQL queries, making the process more accessible and efficient.
Users can engage with the skill in various ways, depending on their needs. For quick checks, it allows users to fetch specific experiments or flags and apply relevant checks, reporting findings in a clear markdown format. For broader audits, users can scope their checks to all experiments or flags within a domain, or even conduct a comprehensive audit that combines both. This flexibility ensures that users can adapt their approach based on the scale of their review.
The output from the audits is well-structured, categorizing findings by severity and providing actionable remediation steps. This is particularly useful for teams looking to maintain high standards in their experimentation processes. Additionally, the skill accounts for scenarios where data may be unavailable, ensuring that users are informed about any limitations in their audit results.
Overall, this skill is ideal for developers and product teams who need to regularly assess the health of their experiments and feature flags, ensuring they align with best practices and operational standards. By integrating this skill into their workflow, teams can enhance their decision-making processes and improve the performance of their product experiments.
When to use it
Use this skill when you need to audit or review experiments and feature flags for potential issues or best-practice violations.
When not to use it
Avoid this skill if you require real-time data analysis or advanced statistical insights, as it focuses on configuration checks rather than data interpretation.
What you can build with it
Quick Experiment Check
Run a quick audit on a specific experiment to identify any immediate configuration issues.
Domain-Wide Flag Audit
Audit all feature flags within a specific domain to ensure compliance with best practices.
Comprehensive Audit
Conduct a full audit of both experiments and flags to identify recurring patterns and issues.
How to install Auditing Experiments and Feature Flags
View source1. Install with the skills CLI
npx skills add posthog/posthog/auditing-experiments-flags --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by posthogAuditing 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:
- 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, output as a notebook artifact via
notebooks-createfor easier navigation. Otherwise report inline.
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
Frequently asked questions about Auditing Experiments and Feature Flags
Similar skills
WinMD API Search
Easily find and explore Windows desktop APIs.
WebMCPify
Transform any web app into an agent-ready platform.
Phoenix Tracing
Instrument LLM applications with OpenInference tracing.
Foundry Hosted Agent CopilotKit
Guidance for developing agentic web apps on Azure.
Power Automate Foundation
Connect AI agents to Power Automate seamlessly.
Power Automate Flow Builder
Efficiently build and deploy Power Automate flows programmatically.
