New advertisers: 50% off your first month with code FIRSTMONTHSee slots
launchdarkly avatar

Launchdarkly Flag Cleanup

Safe removal of a LaunchDarkly feature flag from code, hardcoding the forward value after a completed rollout.

skills.sh installs
2.5K
GitHub stars
32
last updated
Jul 14, 2026
View on GitHub

What it does

  • Covers the full cleanup flow: codebase reference search, readiness check, forward value selection, code removal, PR creation, and verification
  • Uses get-removal-readiness for a safe, caution, or blocked verdict, and get-flags to compare critical environments before choosing the forward value
  • Enforces a hard stop when environments disagree on state or variation, and waits for user confirmation before any code changes
  • Designed for teams that want to retire completed flags and archive them in LaunchDarkly after the code change

Install

$ npx -y skills add launchdarkly/ai-tooling --skill launchdarkly-flag-cleanup -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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 removal
  • delete-flag: permanently delete the flag (irreversible, prefer archive)

Core Principles

Details

Repository
github.com/launchdarkly/ai-tooling
Categories
Code Review & Quality, DevOps & Cloud
First seen
May 16, 2026

More from launchdarkly/ai-tooling

All 40

Similar to Launchdarkly Flag Cleanup

More Code Review & Quality