
Launchdarkly Flag Cleanup
Removes feature flags from your codebase after a rollout is complete, hardcoding the winning variation while preserving production behavior. Queries LaunchDarkly's API to determine the correct forward value across environments, searches for all references including SDK calls and wrappers, then strips out the dead branch and cleans up orphaned imports and files. The removal readiness check is solid, orchestrating parallel safety checks for dependencies, targeting rules, and cross-environment status before you touch anything. Generates a detailed PR with the rationale and assessment results. It won't let you accidentally break prod by guessing the wrong variation, which is the main thing you want from a tool like this.
- skills.sh installs
- 2.5K
- GitHub stars
- 19
- last updated
- Jul 14, 2026
Install
$ npx -y skills add launchdarkly/agent-skills --skill launchdarkly-flag-cleanup --agent claude-codeInstalls into .claude/skills of the current project.
Files
LaunchDarkly Flag Cleanup
You're using a skill that will guide you through safely removing a feature flag from a codebase while preserving production behavior. Your job is to explore the codebase to understand how the flag is used, query LaunchDarkly to determine the correct forward value, remove the flag code cleanly, and verify the result.
If you haven't already identified which flag to clean up, use the flag discovery skill first to audit the landscape and find candidates.
Prerequisites
This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment.
Required MCP tools:
get-removal-readiness: detailed safety check (orchestrates flag config, cross-env status, dependencies, code references, and expiring targets in parallel)get-flags: fetch flag configuration for a specific environment
Optional MCP tools:
archive-flag: archive the flag in LaunchDarkly after code removaldelete-flag: permanently delete the flag (irreversible, prefer archive)
Core Principles
Sponsors
Details
- Repository
- github.com/launchdarkly/agent-skills
- Category
- AI & Agent Building
- First seen
- May 16, 2026
More from launchdarkly/agent-skills
All 41- Launchdarkly Flag Create2.5K
- Launchdarkly Flag Discovery2.5K
- Launchdarkly Flag Targeting2.5K
- Aiconfig Create2.3K
- Aiconfig Projects2.3K
- Aiconfig Tools2.3K
- Aiconfig Update2.3K
- Aiconfig Variations2.3K
- Launchdarkly Metric Choose2.3K
- Launchdarkly Metric Create2.3K
- Launchdarkly Metric Instrument2.3K
- Aiconfig Online Evals2.2K
- Aiconfig Targeting2.2K
- Aiconfig Ai Metrics2K
- Aiconfig Custom Metrics2K
- Aiconfig Migrate2K
- Apply2K
- Detect2K
- First Flag2K
- Launchdarkly Experiment Setup2K
- Launchdarkly Guarded Rollout2K
- Mcp Configure2K
- Plan2K
- Sdk Install2K