cleaning-up-stale-feature-flags
Installation
SKILL.md
Cleaning up stale feature flags
This skill guides you through finding feature flags that are no longer serving a purpose and safely removing them.
When to use this skill
- The user asks to clean up, audit, or review their feature flags
- The user wants to find flags that are stale, unused, or fully rolled out
- The user asks "which feature flags can I remove?" or similar
- The user wants to reduce tech debt from old feature flags
What makes a flag stale
A feature flag is considered stale when it's no longer doing useful work. PostHog tracks this with two signals:
- Usage-based staleness: The flag has
last_called_atdata, but hasn't been evaluated in 30+ days. This is the strongest signal — the SDKs are no longer checking this flag. - Configuration-based staleness: The flag has no usage data (
last_called_atis null), is 30+ days old, and is 100% rolled out (boolean at 100% with no property filters, or a multivariate flag with one variant at 100%). A fully rolled out flag with no conditions is equivalent to a hardcoded value — it can be replaced by removing the flag check from code.
Disabled flags (active: false) are not considered stale — they were intentionally turned off and may be kept for reactivation.
Related skills