
Launchdarkly Flag Discovery
Audit LaunchDarkly flags for stale launches, flag debt, and safe removal candidates using the hosted LaunchDarkly MCP server.
Overview
launchdarkly-flag-discovery is an agent skill for the Operate phase that audits LaunchDarkly feature flags and recommends cleanup and removal readiness.
Install
npx skills add https://github.com/launchdarkly/agent-skills --skill launchdarkly-flag-discoveryWhat is this skill?
- Guided workflow to explore a LaunchDarkly project and assess flag health
- Requires list-flags, get-flag, and get-flag-status-across-envs MCP tools
- Optional find-stale-flags, get-flag-health, and check-removal-readiness for deeper audits
- Targets flag debt, stale flags, cleanup candidates, and inventory questions from SKILL frontmatter
- 3 required MCP tools (list-flags, get-flag, get-flag-status-across-envs)
- 3 optional MCP tools for staleness and removal readiness
- Version 1.0.0-experimental in skill metadata
Adoption & trust: 1.6k installs on skills.sh; 16 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You cannot tell which feature flags are still active, stale, or safe to remove across environments.
Who is it for?
Small SaaS teams using LaunchDarkly who need periodic flag inventory and debt reduction without manual console clicking.
Skip if: Projects not on LaunchDarkly or environments where the LaunchDarkly MCP server is not configured.
When should I use this skill?
User asks about flag debt, stale flags, cleanup candidates, flag health, or wants to understand their LaunchDarkly flag inventory.
What do I get? / Deliverables
You get an audited flag landscape with health signals and actionable cleanup recommendations grounded in LaunchDarkly MCP data.
- Flag landscape summary
- Stale and cleanup candidate list
- Removal-readiness oriented recommendations
Recommended Skills
Journey fit
Operate fits ongoing production hygiene: inventorying flags, staleness, and cleanup readiness after features ship. Iterate matches continuous refinement—retiring launched flags and reducing configuration debt without breaking environments.
How it compares
Structured flag-health audit via MCP, not a generic code search for environment variables.
Common Questions / FAQ
Who is launchdarkly-flag-discovery for?
Engineers and tech leads on LaunchDarkly who own release toggles and recurring flag cleanup.
When should I use launchdarkly-flag-discovery?
During Operate when reviewing flag debt, stale launched flags, cleanup candidates, or overall flag inventory health.
Is launchdarkly-flag-discovery safe to install?
It needs LaunchDarkly API access via MCP; review the Security Audits panel on this page and scope tokens to read-only audit where possible.
SKILL.md
READMESKILL.md - Launchdarkly Flag Discovery
# 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:** - `list-flags`: search and browse flags with filtering by state, type, tags - `get-flag`: 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):** - `find-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) - `check-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 `list-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` (active, inactive, launched, new) to segment the landscape. - Filter by `type` (temporary vs permanent): temporary flags are the primary cleanup targets. **For cleanup planning:** - Use `find-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-flag` 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](references/flag-health-signals.md) 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 `