/flag-hygiene:flag-hygienefrom flag-hygiene
Audits a whole codebase for feature flag debt (stale, orphaned, duplicate, ownerless, nested flags), builds a flag registry, and proposes a prioritized removal list. Use for "flag debt", "stale flags", "flag audit", "flag inventory", "which flags can we remove", or a flag cleanup across LaunchDarkly, Unleash, flagd or home-grown flags. Not for adding or removing one flag (feature-flags), rollout plans (rollout-plan) or deprecating an API (modernize).
Ships in flag-hygiene. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Audit every flag in the codebase, record each in one registry, and hand removals to the feature-flags skill. Read-only by default: the output is a report and a registry diff.
?; never guess.Find the tool first (manifests, imports, config files, env names; see the feature-flags skill's platform notes). Then collect every flag from all sources:
.env templates.Search recipe is in references/search-recipe.md.
For each flag, check:
Build or update the registry in the format in references/registry-template.md: key, type, owner, created, expiry, purpose, default, location. Reuse an existing registry file and its format. Show the registry as a diff: rows added, changed and removed, with unknown fields marked ? for the user to fill.
Rank candidates: (1) orphaned and dead flags with no behavior change, (2) always-on or always-off flags with confirmed state, (3) expired temporary flags, (4) nested flags that block simplification. Within a tier, prefer small blast radius and flags that nest others. Each entry names the key, the keep-path (on or off), the evidence, the risk and the owner to confirm. Hand each one to the feature-flags skill for the actual removal, one flag per change.
Use references/report-template.md. Keep it to findings, the registry diff, the ranked removal list and open questions for the user. Call out what was not checked (unreachable platform, other repos, flags built from string concatenation).
Suggest, without adding, a CI check for unregistered or expired flags, an expiry field required at creation, and a periodic audit date.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub adminhead/claude-plugins --plugin flag-hygiene