Back to Skills

launchdarkly-flag-discovery

Audit your LaunchDarkly feature flags to understand the landscape, find stale or launched flags, and assess removal readiness. Use when the user asks about flag debt, stale flags, cleanup candidates, flag health, or wants to understand their flag inventory.

17stars5forksUpdated 6/24/2026

Security Assessment

Medium Risk(50/100)

Detected risks:

Persistence([README.md] LaunchD, [README.md] launchd, [references/flag-health-signals.md] LaunchD)
Security Score50/100

About launchdarkly-flag-discovery

A guided workflow for auditing a LaunchDarkly project's feature flags to understand the landscape, find stale or launched flags, and assess removal readiness. It is intended for questions about flag debt, stale flags, cleanup candidates, flag health, or flag inventory, and is explicitly for discovery rather than action: removing a flag from code is directed to the flag cleanup skill, and changing targeting to the flag targeting skill. It requires the remotely hosted LaunchDarkly MCP server, using the required tools list-flags, get-flag, and get-flag-status-across-envs, with optional tools find-stale-flags, get-flag-health, and check-removal-readiness that add depth.

The workflow first establishes context by confirming the projectKey and the user's goal (a broad audit, a targeted investigation, or cleanup planning), then explores the landscape accordingly. A broad audit scopes list-flags to a critical environment (defaulting to production), notes the total count, and segments by state (active, inactive, launched, new) and by type (temporary versus permanent). Cleanup planning uses find-stale-flags as the most efficient entry point, returning a prioritized list categorized as never_requested, inactive_30d, or launched_no_changes, with a configurable inactiveDays (default 30) and an includeOnly setting (default temporary). Targeted investigation uses get-flag-health for a single-flag deep dive or get-flag for full configuration. Health is then assessed across signals such as lifecycle state, last-requested timestamp, targeting complexity, cross-environment consistency, and flag age combined with temporary status.

Flags are grouped into actionable categories: ready to remove, likely safe but needing verification, needs investigation, and leave alone. When the user wants to know whether a specific flag can be removed, check-removal-readiness orchestrates parallel API calls and returns a verdict of safe, caution, or blocked. Findings are presented in a structure tailored to the request, leading with a summary for audits, a verdict for specific flags, and a candidate count for cleanup planning. The skill emphasizes important nuances, including that "launched" means fully rolled out rather than recently deployed, that inactive does not always mean safe to remove, that permanent flags such as kill switches can be inactive on purpose, and that API weights are scaled by 1000 so a weight of 60000 means 60 percent.

FAQ

What is this skill for?

Auditing a LaunchDarkly project's flags to understand the landscape, find stale or launched flags, and assess removal readiness. It is for discovery only and directs code removal to the flag cleanup skill and targeting changes to the flag targeting skill.

What tools does it require?

The remotely hosted LaunchDarkly MCP server with required tools list-flags, get-flag, and get-flag-status-across-envs, plus optional find-stale-flags, get-flag-health, and check-removal-readiness for added depth.

How does it find cleanup candidates?

Using find-stale-flags as the most efficient entry point, which returns a prioritized list categorized as never_requested, inactive_30d, or launched_no_changes, with a configurable inactiveDays (default 30) and includeOnly (default temporary).

Does inactive always mean a flag is safe to remove?

No. An inactive flag might be used in code that has not shipped yet or referenced as a prerequisite by another flag, and permanent flags such as kill switches can be inactive on purpose.

How are rollout weights interpreted?

Weights in the API are scaled by 1000, so a weight of 60000 means 60 percent, and the skill always converts them to human-readable percentages.

All Files

5 files
marketplace.json0.6 KB
View
README.md1.7 KB
View
references/flag-health-signals.md3.4 KB
View
references/removal-readiness-checklist.md4.1 KB
View
SKILL.md7.1 KB
View

Install launchdarkly-flag-discovery

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill