- Home
- Skills
- Code Quality & Review
- Feature Flag Setup and Stale Flag Cleanup with OpenFeature
Works with the AI Agents you already use
Feature Flag Setup and Stale Flag Cleanup with OpenFeature
Find and safely remove stale feature flags, fix unsafe defaults and orphan flags, and set up OpenFeature or your vendor SDK with owners and expiry. CLEAN / FLAG DEBT / RISKY.
$5
Feature Flag Setup and Stale Flag Cleanup with OpenFeature
Example session with this skill installed
We have ~120 LaunchDarkly flags in a React + Node monorepo. Half are probably dead. Clean up what's safe and tell me what's risky. I can give you a flag export.
- Read your context and instructions
- Compiled the feature flag setup
Feature flags: monorepo — VERDICT: RISKY
Flags found: 97 in code, 121 in LaunchDarkly · Provider: LaunchDarkly SDKs (no OpenFeature)
Summary
| Status | Count | Action |
|---|---|---|
| Done (ON) | 31 | remove, keep ON branch |
| Done (OFF) | 9 | remove with ON branch |
| Orphan in service | 24 | archive after confirming other apps |
| Orphan in code | 3 | fix now |
| Permanent / kill switch | 11 | keep, document |
| Active | 34 | keep, add owner + expiry |
| Unknown | 9 | your decision |
Risky
| Flag | Issue | Fix |
|---|---|---|
new-pricing-page | missing in the production environment, so the code default true applies whenever the flag cannot be resolved | default false, add to prod as off |
disable-payments (kill switch) | evaluated before client init: always returns default | wait for client ready; add a test |
api-v2-routes | key spelled api_v2_routes in Node | align keys |
Removed in this session (12 PRs)
12 Done (ON) release flags removed: 84 files, 2,310 lines deleted. Lint, typecheck and 1,486 tests pass. Each PR lists the flag's values per environment and the date it reached 100%.
Next steps for you
Archive those 12 flags in LaunchDarkly after deploy. The mobile app reads 4 of the remaining Done flags and v5.2 is still 18% of users, so keep them until it drops below your cut-off.
Connects securely to your tools. The creator never sees your data.
About this skill
Feature flags make releases safer, until there are 200 of them and nobody knows which ones still matter. Then they hide dead code, double the test matrix, and occasionally change production by accident when a flag missing in one environment falls back to an unsafe default.
This skill gives your coding agent a cleanup procedure and a reference file on OpenFeature and the main flag vendors. It:
- Builds a full inventory from both sides: every flag referenced in code (including dynamic keys, front end, mobile and config) and every flag in the flag service, with values per environment and last evaluation
- Classifies each flag: done ON, done OFF, orphan in service, orphan in code (the dangerous one), permanent kill switch, active, or unknown
- Checks setup quality: safe defaults, evaluation context, one wrapper per flag, provider readiness at startup, naming and ownership, tests for both branches, vendor lock-in
- Removes stale flags safely: one flag per commit, kept branch only, dead code and tests deleted, zero references confirmed, PR description with rollout evidence
- Tells you when to archive each flag in the service (only after code is deployed everywhere)
- Adds light prevention: owners, expiry dates, a CI check or monthly report
- Returns a verdict: CLEAN, FLAG DEBT or RISKY
Works with: OpenFeature, LaunchDarkly, Unleash, Flagsmith, GrowthBook, PostHog, ConfigCat, Statsig, Split, flagd and home-grown env-var flags.
Safety: never changes values, targeting or rollouts in your flag service, and never archives a flag before its code is gone, including from mobile versions still in use.
Honesty note: flags with conflicting values or no owner are marked unknown and left for you to decide.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.
Cannot archive flags in the service UI directly. Requires manual verification for mobile apps with long-lived versions. Verdicts depend on provided evaluation data and code access.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 28 days ago
- Software
- Flag serviceorflag export
Read access to the flag service is enough.
Permissions
No special permissions declared or detected