signals-scout-feature-flags

Detects feature flag evaluation cliffs, ghost flags, distribution shifts, and flag debt in PostHog.

713|118|Updated Aug 11, 2020
One-click install
npx skills add https://github.com/PostHog/posthog-foss --skill signals-scout-feature-flags
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: signals-scout-feature-flags
Source: https://github.com/PostHog/posthog-foss/tree/main/products/signals/skills/signals-scout-feature-flags
Command: npx skills add https://github.com/PostHog/posthog-foss --skill signals-scout-feature-flags

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Feature flags drift out of sync with the code that evaluates them: deploys remove flag checks silently, deleted flags keep getting called by shipped code, and stale flags accumulate as technical debt. This Skill audits the gap between flag configuration and real $feature_flag_called traffic so teams catch broken rollouts and clean up dead flags before they cause user-facing issues.

Core Features & Use Cases

  • Evaluation cliff detection: Identifies active flags whose call volume collapsed against their baseline, distinguishing deliberate code removal from silent SDK or capture breakage.
  • Ghost flag detection: Finds shipped code evaluating flag keys that were deleted or never existed, where SDKs silently return false and users get the fallback path.
  • Response-distribution shift analysis: Compares variant response mixes over time to catch condition drift not explained by flag edits, including cohort-driven changes.
  • Flag-debt hygiene reports: Bundles stale flags, fully-rolled-out flags still checked in hot paths, and deactivated flags with heavy call volume into prioritized cleanup recommendations.
  • Use Case: A team deactivates a checkout flag but the code check stays live at 40k calls/day; the scout files a report quantifying the dead check and routes it to the flag owner.

Quick Start

Ask the agent to audit this project's feature flags for evaluation cliffs, ghost flags, and stale flag debt using the last 14 days of traffic.

Frequently Asked Questions about signals-scout-feature-flags

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect feature flags that stopped being evaluated?

Compare each active flag's calls in the last 24 hours against its 14-day baseline from $feature_flag_called events. A drop below roughly 5% of baseline on a flag with at least 500 calls per day indicates an evaluation cliff worth investigating.

What is a ghost feature flag and how do I find one?

A ghost flag is a flag key evaluated in code with no matching live flag, so the SDK silently returns false. Find them by anti-joining distinct $feature_flag event keys against system.feature_flags where deleted equals 0, then filtering for sustained volume above 100 calls per day.

Does deactivating a feature flag stop $feature_flag_called events?

No. Client SDKs fire $feature_flag_called whenever code evaluates the flag regardless of its state, so a deactivated flag with heavy call volume means the dead check is still shipped in code and should be cleaned up.

Why does a flag's response distribution shift without any flag edit?

Unexplained shifts usually come from condition drift: a release condition targets a person or group property whose real-world values changed, or a referenced cohort was edited. Check cohort activity logs and the flag's filter definitions before treating it as a finding.

When should low flag call volume not be reported as a problem?

Skip flags created less than 7 days ago, flags below roughly 500 calls per day baseline, and projects using server-side local evaluation where $feature_flag_called is never sent. Absence of call events does not prove a flag is unused.