
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.
- Installs
- 4.2K
- Last 24h
- —
- Trending rank
- —
- Security
- Pass
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/launchdarkly/ai-tooling --skill launchdarkly-flag-discovery- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads launchdarkly-flag-discovery automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
Security audits
Independent scans of the skill's instructions and bundled files.
SKILL.md
The instructions your agent reads when the skill is triggered.
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, tagsget-flag: get full configuration for a single flag in a specific environmentget-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 stalenessget-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:
- Identify the project. Confirm the
projectKeywith the user. If they haven't specified one, ask. - 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-flagsscoped to a critical environment (default toproduction). - 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 periodlaunched_no_changes: fully rolled out, no recent changes
- Default
inactiveDaysis 30. Increase for conservative cleanup (60, 90) or decrease for aggressive cleanup (7, 14). - Default
includeOnlyistemporary. Set toallto include permanent flags.
For a targeted investigation:
- Use
get-flag-healthfor 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-flagfor 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:
- Ready to remove: Inactive everywhere, temporary, no dependencies. Direct the user to the flag cleanup skill for code removal.
- Likely safe, needs verification: Launched (fully rolled out), no rule changes recently. The user should confirm the rollout is intentionally complete.
- Needs investigation: Active in some environments but not others, or has complex targeting. Don't recommend action without more context.
- 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 check-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
60000means 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
- Flag Health Signals: How to interpret lifecycle states, staleness, and health data
- Removal Readiness Checklist: Full safety assessment before recommending flag removal
FAQ
What does the launchdarkly-flag-discovery skill do?
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.
How do I install launchdarkly-flag-discovery?
Run npx skills add https://github.com/launchdarkly/ai-tooling --skill launchdarkly-flag-discovery in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/launchdarkly-flag-discovery/ (personal) or .claude/skills/launchdarkly-flag-discovery/ (project).
Which AI agents can use launchdarkly-flag-discovery?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is launchdarkly-flag-discovery safe to install?
Security partners have reviewed it: Gen Agent Trust Hub passed; Socket passed; Snyk passed. As with any skill, read the SKILL.md and bundled scripts before installing.
Who maintains launchdarkly-flag-discovery?
It is published by launchdarkly in launchdarkly/ai-tooling, and it is an official skill from the maker of the technology it covers. It has 4,174 recorded installs.
More from launchdarkly/ai-tooling
onboarding
launchdarkly/ai-tooling
Scripted onboarding for LaunchDarkly: quiet execution, fixed sequence, SDK install, first flag with a live reveal, MCP offered afterwards. Enforces step completion before advancing and redirects drift. Use when adding LaunchDarkly, setting up or integrating feature flags in a project, SDK integration, or 'onboard me'.
launchdarkly-flag-create
launchdarkly/ai-tooling
Create and configure LaunchDarkly feature flags in a way that fits the existing codebase. Use when the user wants to create a new flag, wrap code in a flag, add a feature toggle, or set up an experiment. Guides exploration of existing patterns before creating.
launchdarkly-flag-targeting
launchdarkly/ai-tooling
Control LaunchDarkly feature flag targeting including toggling flags on/off, percentage rollouts, targeting rules, individual targets, and copying flag configurations between environments. Use when the user wants to change who sees a flag, roll out to a percentage, add targeting rules, or promote config between environments.
launchdarkly-flag-cleanup
launchdarkly/ai-tooling
Safely remove a feature flag from code while preserving production behavior. Use when the user wants to remove a flag from code, delete flag references, or create a PR that hardcodes the winning variation after a rollout is complete.
launchdarkly-metric-choose
launchdarkly/ai-tooling
Choose the right metrics for a LaunchDarkly experiment, guarded rollout, or release policy. Use when the user wants to know which metrics to use, which is the primary metric for an experiment, what guardrails to add, or which events to monitor in a rollout. Surfaces what will auto-attach from existing release policies before making additional recommendations.
launchdarkly-metric-create
launchdarkly/ai-tooling
Create a LaunchDarkly metric that measures what matters for an experiment or rollout. Use when the user wants to create a metric, track an event, measure page views, button clicks, conversion, latency, error rate, or any custom numeric or binary outcome. Instruments the event first when needed (including SDK setup and .env), then creates and verifies the metric.
Popular security skills
azure-compliance
microsoft/azure-skills
Run Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.
minimal-run-and-audit
lllllllama/rigorpilot-skills
Rigor Run skill for README-first deep learning repo reproduction. Use when the task is specifically to capture or normalize evidence from the selected smoke test or documented inference or evaluation command and write standardized reprooutputs/ files, including patch notes when repository files changed. Do not use for training execution, initial repo intake, generic environment setup, paper lookup, target selection, hidden scientific-meaning changes, or end-to-end orchestration by itself.
seo-audit
coreyhaines31/marketingskills
When the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking," "SEO issues," "on-page SEO," "meta tags review," "SEO health check," "my traffic dropped," "lost rankings," "not showing up in Google," "site isn't ranking," "Google update hit me," "page speed," "core web vitals," "crawl errors," "indexing issues," "stuck on page 2," "striking distance keywords," "title tag rewrite," "low CTR," "local SEO," "Google Business Profile," or "map pack." Use this even if the user just says something vague like "my SEO is bad" or "help with SEO" — start with an audit. For building pages at scale to target keywords, see programmatic-seo. For adding structured data, see schema. For AI search optimization, see ai-seo.
firebase-security-rules-auditor
firebase/agent-skills
Audits Firebase (Firestore, Cloud Storage) security rules for vulnerabilities, privilege escalation, role bypasses, create vs update inconsistencies, resource exhaustion, type safety, size limits, and hasOnly ownership checks. Use when auditing/reviewing rules, running red-team rule assessments, or scoring against auditor checklists. Don't use for Firebase CLI (login, deploy), Auth, Crashlytics, Remote Config, or database queries.
audit
pbakaus/impeccable
Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.
competitors
coreyhaines31/marketingskills
When the user wants to create competitor comparison or alternative pages for SEO and buyer-facing use. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' 'competitive landing pages,' 'how do we compare to X,' 'competitor teardown,' 'audit our competitor pages,' 'are our comparison pages out of date,' or 'competitive asset audit.' Use this for any content that positions your product against competitors. Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. For auditing existing claims (not researching competitors from scratch, which is competitor-profiling; not technical SEO on these pages, which is seo-audit), use the asset audit here. For internal battle cards and sales-specific competitor docs, see sales-enablement.