/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.
$ npx -y skills add posthog/posthog --skill auditing-experiments-flags --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/auditing-experiments-flags
Context preview
The summary Claude sees to decide when to auto-load this skill.
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.
SKILL.md
auditing-experiments-flags.SKILL.mdname: 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, output as a notebook artifact via `notebooks-create` for 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](./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
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, output as a notebook artifact via `notebooks-create` for 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](./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
:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Repo: posthog/posthog
Other skills on posthog.
- /analyzing-expensive-users
Analyze the most expensive users in AI observability and explain why they cost so much. Use when the user asks about top spenders, expensive users, per-user LLM cost, user-level cost drivers, or patterns behind high AI observability spend.
Open skill - /creating-online-evaluations
Author continuously-running online evaluations in PostHog AI observability, grounded in real failure modes you've identified. Use when the user wants evaluations that automatically score new generations or whole traces going forward — "create an eval to catch X", "continuously
Open skill - /exploring-ai-failures
Find where an AI/LLM application is failing in production and surface the failure patterns, working from real traces. Use when someone wants to understand what's going wrong with an AI feature, find and categorize failure modes, triage errors, or investigate quality issues
Open skill - /exploring-llm-clusters
Investigate AI observability clusters — understand usage patterns in AI/LLM traffic, compare cluster behavior, compute cost/latency metrics, and drill into individual traces within clusters.
Open skill - /exploring-llm-costs
Investigate LLM spend in PostHog — total cost over time, cost by model, provider, user, trace, or custom dimension, token and cache-hit economics, and cost regressions. Use when the user asks "how much are we spending on LLMs?", "which model / user / feature is most expensive?",
Open skill - /exploring-llm-evaluations
Investigate AI observability evaluations — `hog` (deterministic code-based), `llm_judge` (LLM-prompt-based), and `sentiment` (user-message sentiment). Find existing evaluations, inspect their configuration, run them against specific generations, query individual results, and
Open skill

