launchdarkly-flag-cleanup

Automate safe LaunchDarkly flag removal with MCP checks and PR-ready cleanup plans.

25|8|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/launchdarkly/agent-skills --skill launchdarkly-flag-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: launchdarkly-flag-cleanup
Source: https://github.com/launchdarkly/agent-skills/tree/main/skills/feature-flags/launchdarkly-flag-cleanup
Command: npx skills add https://github.com/launchdarkly/agent-skills --skill launchdarkly-flag-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill guides you through safely removing a feature flag from a codebase while preserving production behavior. It ensures you understand how the flag is used, determines the correct forward value via LaunchDarkly MCP, and keeps changes auditable.

Core Features & Use Cases

  • Safety-first flag removal: preserves current production behavior while removing the flag from code.
  • Forward-value planning: queries the LD MCP to determine the correct constant or branch to hardcode.
  • PR-ready cleanup: produces a clean, well-documented set of changes and an actionable PR description.

Quick Start

Ask your agent to remove the flag safely from the codebase while preserving behavior.

Frequently Asked Questions about launchdarkly-flag-cleanup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely remove a feature flag from my codebase without breaking production?

Safe feature flag removal requires determining the correct forward value to hardcode and auditing code references across environments. This ensures you preserve current production behavior while cleanly deleting the flag from your code.

What is the best way to plan a feature flag cleanup for a pull request?

The best way to plan feature flag cleanup for a pull request is to automate the generation of a PR-ready template. This enforces safety checks and documents the constant value replacement to keep changes auditable.

How does a LaunchDarkly MCP server check if a feature flag is ready for removal?

A LaunchDarkly MCP server checks feature flag removal readiness by assessing the flag's forward value and evaluating its usage across environments. This determines the correct constant to hardcode and guides the safe change process.

Can I automate hardcoding the forward value when removing LaunchDarkly flags?

Yes, you can automate hardcoding the forward value during LaunchDarkly flag removal. The process queries the MCP to determine the correct production value and generates a cleanup plan that replaces the flag references with that constant.

What are the limitations of automating feature flag code removal?

Limitations of automating feature flag code removal include the need to verify safety checks across all environments and accurately determine the forward value. Incorrect value assessment can disrupt preserved production behavior during the cleanup process.