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.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionlaunchdarkly-flag-cleanupExecute the skills CLI command in your project's root directory to begin installation:
Fetches launchdarkly-flag-cleanup from launchdarkly/agent-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate launchdarkly-flag-cleanup. Access via /launchdarkly-flag-cleanup in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
0
total installs
0
this week
5
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
5
stars
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.
This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment.
Required MCP tools:
check-removal-readiness — detailed safety check (orchestrates flag config, cross-env status, dependencies, code references, and expiring targets in parallel)get-flag — fetch flag configuration for a specific environmentOptional MCP tools:
archive-flag — archive the flag in LaunchDarkly after code removaldelete-flag — permanently delete the flag (irreversible, prefer archive)Before touching LaunchDarkly or removing code, understand how this flag is used in the codebase.
Find all references to the flag key. Search for the flag key string (e.g., new-checkout-flow) across the codebase. Check for:
variation(), boolVariation(), useFlags(), etc.)Understand the branching. For each reference, identify:
true (or variation A)?false (or variation B)?Note the scope. How many files, components, or modules does this flag touch? A flag used in one if block is simpler than one threaded through multiple layers.
Use check-removal-readiness to get a detailed safety assessment. This single tool call orchestrates multiple checks in parallel:
The tool returns a readiness verdict:
safe — No blockers or warnings. Proceed with removal.
caution — No hard blockers but warnings exist (e.g., code references in other repos, expiring targets scheduled, flag marked as permanent). Present warnings and let the user decide.
blocked — Hard blockers prevent safe removal (e.g., dependent flags, actively receiving requests, targeting is on with active rules). Present blockers — the user must resolve them first.
Use get-flag to fetch the flag configuration in each critical environment. The forward value is the variation that replaces the flag in code.
| Scenario | Forward Value |
|---|---|
| All critical envs ON, same fallthrough, no rules/targets | Use fallthrough.variation |
| All critical envs OFF, same offVariation | Use offVariation |
| Critical envs differ in ON/OFF state | NOT SAFE — stop and inform the user |
| Critical envs serve different variations | NOT SAFE — stop and inform the user |
Before modifying any code, present a summary to the user and wait for confirmation:
check-removal-readiness (safe, caution, or blocked) and any warnings.Do not proceed with code changes until the user explicitly confirms.
Now execute the removal using what you learned in Step 1.
Replace flag evaluations with the forward value.
Clean up dead code.
Don't over-clean.
Example transformation (boolean flag, forward value = true):
// Before
const showNewCheckout = await ldClient.variation('new-checkout-flow', user, false);
if (showNewCheckout) {
return renderNewCheckout();
} else {
return renderOldCheckout();
}
// After
return renderNewCheckout();
Use the template in references/pr-template.md for a structured PR description. The PR should clearly communicate:
check-removal-readiness)Before considering the job done:
| Situation | Action |
|---|---|
| Flag not found in LaunchDarkly | Inform user, check for typos in the key |
| Flag already archived | Ask if code cleanup is still needed (flag is gone from LD but code may still reference it) |
| Multiple SDK patterns in codebase | Search all patterns: variation(), boolVariation(), variationDetail(), allFlags(), useFlags(), plus any wrappers |
Dynamic flag keys (flag-${id}) |
Warn that automated removal may be incomplete — manual review required |
| Different default values in code vs LD | Flag as inconsistency in the PR description |
| Orphaned exports/files remain after removal | Run unused-export checks and remove dead files |
Once the PR is merged and deployed:
archive-flag. Archival is reversible; deletion is not. Always archive first.check-removal-readiness reported code references in other repositories.Make data-driven prioritization decisions faster
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Prerequisites
Time Estimate
30-60 minutes to see productivity improvements
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
mattpocock/skills
parcadei/continuous-claude-v3
cursor/plugins
ailabs-393/ai-labs-claude-skills
pproenca/dot-skills
mattpocock/skills
Registry listing for launchdarkly-flag-cleanup matched our evaluation — installs cleanly and behaves as described in the markdown.
Registry listing for launchdarkly-flag-cleanup matched our evaluation — installs cleanly and behaves as described in the markdown.
launchdarkly-flag-cleanup reduced setup friction for our internal harness; good balance of opinion and flexibility.
Keeps context tight: launchdarkly-flag-cleanup is the kind of skill you can hand to a new teammate without a long onboarding doc.
Useful defaults in launchdarkly-flag-cleanup — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
launchdarkly-flag-cleanup is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Useful defaults in launchdarkly-flag-cleanup — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
I recommend launchdarkly-flag-cleanup for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
Useful defaults in launchdarkly-flag-cleanup — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
launchdarkly-flag-cleanup is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
showing 1-10 of 53