Skip to content

: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.

chore(feature-flags): make the cleanup skill findable for the words agents use (#109776)

James Gillb74400b57323
diff --git a/products/feature_flags/skills/cleaning-up-stale-feature-flags/SKILL.md b/products/feature_flags/skills/cleaning-up-stale-feature-flags/SKILL.md
index 22a077994766..fc11e8ed9974 100644
--- a/products/feature_flags/skills/cleaning-up-stale-feature-flags/SKILL.md
+++ b/products/feature_flags/skills/cleaning-up-stale-feature-flags/SKILL.md
@@ -1,6 +1,6 @@
---
name: cleaning-up-stale-feature-flags
-description: 'Identify stale feature flags in a PostHog project and clean up the code that checks them. Use when the user wants to find, audit, or remove unused, fully rolled out, or abandoned feature flags. When the agent can read and edit a repository it performs the code cleanup itself: tested local changes, and one draft PR per flag when the user authorizes publishing. Agents without repository access generate a tailored cleanup prompt instead. Covers staleness detection, dependency checking, retained-path rules, and the code-first ordering. This skill does not archive or otherwise change a flag in PostHog.'
+description: 'Identify stale feature flags in a PostHog project and clean up the code that checks them. Use when the user wants to find, audit, or remove unused, fully rolled out, or abandoned feature flags, run a feature flag hygiene review or a weekly cleanup, reduce feature flag tech debt, or asks "which flags can I remove?". When the agent can read and edit a repository it performs the code cleanup itself: tested local changes, and one draft PR per flag when the user authorizes publishing. Agents without repository access generate a tailored cleanup prompt instead. Covers staleness detection, dependency checking, retained-path rules, and the code-first ordering. This skill does not archive or otherwise change a flag in PostHog.'
---
# Cleaning up stale feature flags
@@ -14,6 +14,8 @@ The ordering is fixed: clean up the code, wait for that cleanup to deploy, and o
- 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
+- The user asks for a feature flag hygiene review
+- The user runs a weekly or recurring flag cleanup
Do not activate for an unrelated coding task that merely mentions a feature flag.
Cleaning up a flag is its own job, requested by the user.