SkillOpen
flag-cleanup
Run the quarterly feature-flag cleanup workflow on the current repo
Front matter
name: flag-cleanup
description: Run the quarterly feature-flag cleanup workflow on the current repo/flag-cleanup
Run the full feature-flag cleanup workflow:
- Scan for stale flags (older than 90 days, used in ≤2 places)
- For each candidate, identify the introducing PR/issue and current owner
- Generate a removal plan grouped by owner
- Run kill-switch audit against the flag-doc registry
- Output a markdown report ready to share with the team
Usage
/flag-cleanup
/flag-cleanup --max-age-days 60
/flag-cleanup --flag-doc runbooks/flags.mdImplementation
This command dispatches to the feature-flags-architect skill:
SKILL=engineering/feature-flags-architect/skills/feature-flags-architect
# Step 1: scan for debt
python "$SKILL/scripts/flag_debt_scanner.py" --repo . --max-age-days "${MAX_AGE_DAYS:-90}" --format json > .flag-debt.json
# Step 2: audit kill switches
python "$SKILL/scripts/kill_switch_audit.py" --repo . --flag-doc "${FLAG_DOC:-docs/feature-flags.md}" --format json > .kill-switch-audit.json
# Step 3: synthesize a markdown report
# (Claude reads both JSON files, groups by owner, drafts the cleanup plan)Output
A markdown report with:
- Stale flag candidates grouped by owner, with introducing commit links
- Undocumented flags that fail the kill-switch audit
- Incomplete documentation (missing fields per flag)
- Suggested removal PRs — one per owner
Pre-conditions
- Run from a git repository with the source code committed
- A flag-doc registry exists (default:
docs/feature-flags.md) - The
feature-flags-architectskill is installed
Post-conditions
.flag-debt.jsonand.kill-switch-audit.jsonwritten to repo root (ignored via.gitignore)- Markdown report streamed to terminal
- Recommended next step printed (which removal PR to start with)
Source: https://github.com/alirezarezvani/claude-skills/blob/main/.gemini/skills/flag-cleanup/SKILL.md
Author: alirezarezvani, Alireza Rezvani skills and agents. License: MIT.
Shown here with formatting for the web. Keep the author and license notice when you reuse it.
Related entries
There are more like this in the members library
The Codex library holds 7,009 entries. Members can search all of them by meaning and read every one in full.