Hacker
Sher Partap Singh
@sher110106
Projects
flagsmith-flag-cleanup
Flagsmith Experimentation HackathonNov 2026
I built flagsmith-flag-cleanup, an Agent Skill that retires stale Flagsmith feature flags from start to finish. The problem: once a rollout reaches everyone, the flag and the code it no longer chooses between should go. Nobody has time, so flags pile up as debt. Flagsmith can tag stale flags on paid plans, and stops there. Someone still has to find the code, delete the dead branch, fix the tests, open a pull request and archive the flag. Who uses it: any team that reads Flagsmith flags in its code, on Cloud or self-hosted, on any plan. A developer copies the skill folder into .claude/skills and asks their agent to "clean up stale flags". How it works: a read-only scan through the Flagsmith CLI reads every environment and prints one short table. It shows which flags are settled (same state and value everywhere, no segment or identity overrides, no variant weights, no running experiment, no pending change request, no permanent tag, unchanged for N days), which only need archiving because no code reads them, and why the rest stay. Nothing changes until the user approves. Then the agent deletes the dead code paths and their tests, and a script refuses to push if any reference is left or the tests fail. It opens a pull request with the evidence for each flag. After the merge, it scans again, skips any flag that changed, and archives the rest. It never deletes a flag.