All skills
launchdarkly avatar

/launchdarkly-flag-discovery

@be58859 official

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/agent-skills/launchdarkly-flag-discovery

This session only. Nothing lands on disk.

referencesflag-health-signals.md

≈873 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Flag Health Signals

How to interpret the data you get back from LaunchDarkly when assessing flag health.

Lifecycle States

Every flag in every environment has a lifecycle state. Here's what each one means and what action it implies:

State Meaning Action
new Flag was recently created, hasn't received meaningful traffic Leave alone: still being set up
active Flag is receiving SDK evaluations and serving variations Healthy, doing its job
launched Flag is on, serving a single variation to everyone, no recent changes Candidate for cleanup: rollout is complete
inactive Flag hasn't received SDK evaluations in a while Strong candidate for cleanup

Staleness Signals

Signal How to check Interpretation
Last requested date status.lastRequested on the flag How recently an SDK evaluated this flag. Older = more stale.
Inactive duration Compare lastRequested to today 30+ days: likely stale. 7-30 days: might be infrequent. <7 days: probably active.
Never requested lastRequested is null Flag was created but never evaluated by any SDK. Possibly abandoned during development.
Flag age Compare creationDate to today Old temporary flags that are inactive are strong cleanup candidates.

Targeting Complexity

The more complex a flag's targeting, the more carefully you need to assess it:

Indicator What to check Implications
Rules count Number of targeting rules More rules = more contexts depending on this flag = higher removal risk
Individual targets Users/contexts individually targeted Someone specifically configured these: check before removing
Prerequisites Other flags that depend on this flag Hard blocker: cannot remove without updating dependent flags
Percentage rollout Fallthrough uses weighted variations Flag is mid-rollout: not ready for removal

Cross-Environment Signals

Use get-flag-status-across-envs to build a complete picture:

Pattern Interpretation
Inactive everywhere Safe to consider for removal
Launched everywhere Rollout complete: candidate for code cleanup
Active in production, inactive in staging Normal: production is the source of truth
Inactive in production, active in staging Unusual: might be pre-release, or staging is stale
Mixed states across environments Needs investigation: don't recommend action without understanding why

Decision Matrix

Combine signals to reach a recommendation:

Temporary? State Age Dependencies Recommendation
Yes Inactive 30+ days Any None Strong cleanup candidate
Yes Launched Any None Ready to hardcode and remove
Yes Never requested, 7+ days old Any None Likely abandoned: verify and remove
Yes Active Any Any Leave alone: actively used
No Inactive 30+ days Any None Ask the user: permanent flags may be intentionally dormant
No Launched Any None Ask the user: may want to keep as permanent config
Any Any Any Has dependents Cannot remove: update dependents first
Any Active in some envs Any Any Needs investigation: understand why states differ

Source: SKILL.md on GitHub

1 warning16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill provides workflow guidance and documentation for auditing LaunchDarkly feature flags via an MCP server. It contains no executable code or malicious patterns.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    5/5 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

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

Last checked against GitHub 3 days ago.

Activeupdated 6 months 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/agent-skills/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.