Stale Feature Flag Cleanup

•
72
•

Identifies stale PostHog feature flags and safely refactors your codebase to remove obsolete flag checks.

Stale Feature Flag Cleanup automates the detection and safe removal of unused, abandoned, or fully rolled-out feature flags in PostHog projects. It evaluates usage-based and configuration-based staleness signals, checks dependencies against experiments and scheduled changes, and follows a strict code-first refactoring protocol. When granted repository access, the skill tests local code changes and prepares draft pull requests, ensuring old flag checks are eliminated before flags are retired in PostHog.

主要功能

01Audits flag dependencies against experiments, surveys, and scheduled changes
02Safely refactors codebase files to remove runtime flag evaluations
0372 GitHub stars
04Creates tailored handoff cleanup prompts when write access is not available
05Identifies usage-based and configuration-based stale feature flags via PostHog APIs
06Generates draft pull requests following repository branch and commit conventions

使用场景

01Safely removing dead code paths for 100% rolled-out features
02Conducting routine technical debt cleanup sprints for feature flags
03Auditing PostHog projects to identify obsolete flag definitions and dependencies