Labsco
posthog logo

auditing-experiments-flags

59

by posthog · part of posthog/ai-plugin

Audit PostHog experiments and feature flags for configuration issues, staleness, and best-practice violations. Read when the user asks to audit, health-check,…

🔥🔥🔥✓ VerifiedFreeQuick setup
🧩 One of 7 skills in the posthog/ai-plugin package — works on its own, and pairs well with its siblings.

This is the playbook your agent receives when the skill activates — you don't need to read it to use the skill, but it's here to audit before installing.

by posthog

Audit PostHog experiments and feature flags for configuration issues, staleness, and best-practice violations. Read when the user asks to audit, health-check,… npx skills add https://github.com/posthog/ai-plugin --skill auditing-experiments-flags Download ZIPGitHub59

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.

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