Index of every page on this site: llms.txt
All skills
launchdarkly avatar

/launchdarkly-flag-discovery

@f0ee110 official
Run it yourself

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.

Use this Skill: https://skilld.dev/gh/launchdarkly/ai-tooling/launchdarkly-flag-discovery

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈72 tokens for metadata: the name and description. ≈1.7k when used: this file. ≈2.5k more on demand in 4 files.

Description uses 3.6% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈287 characters, or 3.6%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

LaunchDarkly Flag Discovery

You're using a skill that will guide you through auditing and understanding the feature flag landscape in a LaunchDarkly project. Your job is to explore the project, assess the health of its flags, identify what needs attention, and provide actionable recommendations.

Prerequisites

This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment.

Required MCP tools:

  • get-flags: search and browse flags with filtering by state, type, tags; with flagKey, get full configuration for a single flag in a specific environment
  • get-flag-status-across-envs: check a flag's lifecycle status across all environments

Optional MCP tools (enhance depth):

  • search-stale-flags: find flags that are candidates for cleanup, sorted by staleness
  • get-flag-health: get combined health view for a single flag (merges status + config)
  • get-removal-readiness: detailed safety check for a specific flag

Workflow

Step 1: Understand the Project

Before diving into flag data, establish context:

  1. Identify the project. Confirm the projectKey with the user. If they haven't specified one, ask.
  2. Understand scope. Ask the user what they're trying to accomplish:
    • Broad audit? ("What's the state of our flags?")
    • Targeted investigation? ("Is this specific flag still needed?")
    • Cleanup planning? ("What flags can we remove?")

Step 2: Explore the Flag Landscape

Adapt your approach to the user's goal:

For a broad audit:

  • Use get-flags scoped to a critical environment (default to production).
  • Note the total count: this tells you the scale of the flag surface area.
  • Filter by state (live, deprecated, archived) to segment the landscape. Lifecycle status (new, active, launched, inactive) comes from get-flag-status-across-envs.
  • Filter by type (temporary vs permanent): temporary flags are the primary cleanup targets.

For cleanup planning:

  • Use search-stale-flags: this is the most efficient entry point. It returns a prioritized list of cleanup candidates sorted by staleness, categorized as:
    • never_requested: created but never evaluated (possibly abandoned)
    • inactive_30d: no SDK evaluations in the specified period
    • launched_no_changes: fully rolled out, no recent changes
  • Default inactiveDays is 30. Increase for conservative cleanup (60, 90) or decrease for aggressive cleanup (7, 14).
  • Default includeOnly is temporary. Set to all to include permanent flags.

For a targeted investigation:

  • Use get-flag-health for a single-flag deep dive. It merges status data with configuration context in one call, returning lifecycle state, last-requested timestamp, targeting summary, age, and whether it's temporary.
  • Or use get-flags for the full configuration including rules, targets, and fallthrough details.

Step 3: Assess Flag Health

For flags that need deeper investigation, assess health signals. See Flag Health Signals for the full interpretation guide.

Key signals to evaluate:

Signal What it tells you
Lifecycle state Where the flag is in its journey (new -> active -> launched -> inactive)
Last requested When an SDK last evaluated this flag: staleness indicator
Targeting complexity Number of rules and targets: removal complexity indicator
Cross-environment consistency Whether the flag behaves the same everywhere
Flag age + temporary status Old temporary flags are strong cleanup candidates

Use get-flag-status-across-envs to check if a flag is consistent across environments. A flag inactive in production but active in staging tells a different story than one inactive everywhere.

Step 4: Categorize and Prioritize

Group flags into actionable categories:

  1. Ready to remove: Inactive everywhere, temporary, no dependencies. Direct the user to the flag cleanup skill for code removal.
  2. Likely safe, needs verification: Launched (fully rolled out), no rule changes recently. The user should confirm the rollout is intentionally complete.
  3. Needs investigation: Active in some environments but not others, or has complex targeting. Don't recommend action without more context.
  4. Leave alone: Active flags doing their job, or permanent flags that are intentionally long-lived.

Step 5: Assess Removal Readiness (When Applicable)

If the user wants to know whether a specific flag can be removed, use get-removal-readiness. This tool orchestrates multiple API calls in parallel and returns a structured verdict:

  • safe: No blockers or warnings. Proceed with cleanup.
  • caution: Warnings exist (code references, expiring targets, permanent flag type). Present and let the user decide.
  • blocked: Hard blockers (dependent flags, active requests, targeting rules). Must resolve first.

See Removal Readiness Checklist for the full details on interpreting each signal.

Step 6: Present Findings

Structure your response based on what the user asked for:

For audits: Lead with a summary (total flags, breakdown by state and type), then highlight what needs attention, then provide specific recommendations.

For specific flags: Lead with the verdict (healthy / needs attention / ready to remove), then support it with the signals you found.

For cleanup planning: Lead with the count of cleanup candidates, prioritize by confidence (safest removals first), and link to the cleanup workflow for execution.

Important Context

  • "Launched" means fully rolled out: targeting is on, a single variation is served to everyone, and no changes have been made recently. It doesn't mean "recently deployed."
  • "Inactive" doesn't always mean safe to remove. The flag might be used in code that hasn't shipped yet, or referenced as a prerequisite by another flag.
  • Permanent flags can be inactive on purpose. Some flags are designed to be dormant until needed (kill switches, emergency toggles). Don't automatically flag these for cleanup.
  • Weights are scaled by 1000 in the API. A weight of 60000 means 60%. Always convert to human-readable percentages.
  • This skill is for discovery, not action. If the user wants to remove a flag from code, direct them to the flag cleanup skill. If they want to change targeting, direct them to the flag targeting skill.

References

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts14d3 checks · Risk SAFE
  • Gen Agent Trust Hub15d

    The skill is an administrative tool for auditing LaunchDarkly feature flags. It uses the official LaunchDarkly MCP server to retrieve flag inventory and health data. No malicious code or risky behaviors were detected.

  • Socket14d

    No alerts

  • Snyk15d

    Risk: LOW · No issues

Signed by skilld at f0ee110. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 weeks ago
compatibility
Requires the remotely hosted LaunchDarkly MCP server
metadata
{
  "author": "launchdarkly",
  "version": "1.0.0-experimental"
}
  • MCP
  • launchdarkly
  • feature-flags
  • flag-audit
  • flag-cleanup
  • flag-health
  • inventory

README badge

README badge for launchdarkly/ai-tooling/launchdarkly-flag-discovery

Audits LaunchDarkly feature flags to identify stale, launched, or inactive flags and assess removal readiness. Uses the LaunchDarkly MCP server to explore flag inventory, categorize cleanup candidates, and provide removal safety verdicts based on lifecycle state, staleness, and cross-environment consistency.

Generated from the current SKILL.md.

Does this skill remove flags from code or just identify candidates?
This skill only audits and identifies cleanup candidates. For actual code removal, use the launchdarkly-flag-cleanup skill.
What MCP server does this require?
The remotely hosted LaunchDarkly MCP server. Without it, the skill cannot access flag data.
Can I audit flags across multiple environments at once?
Yes. The skill can list flags in a specific environment and use get-flag-status-across-envs to check consistency across all environments.
What counts as a stale flag?
Flags with no SDK evaluations in the specified period (default 30 days), plus flags created but never evaluated and fully rolled-out flags with no recent changes. The find-stale-flags tool categorizes these separately.
How do I know if a flag is safe to remove?
Use check-removal-readiness for a specific flag. It returns a verdict (safe, caution, or blocked) based on dependencies, code references, and targeting rules.

Generated from the current SKILL.md. These answers refresh after source changes.