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

/launchdarkly-flag-cleanup

@f0ee110 official
Run it yourself

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.

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

Nothing lands on disk. Nothing to clean up.

Fork this Skill

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

README.md

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

LaunchDarkly Flag Cleanup Skill

An Agent Skill for safely automating feature flag cleanup workflows using LaunchDarkly as the source of truth.

Overview

This skill teaches agents how to:

  • Determine if a feature flag is ready for removal
  • Calculate the correct forward value to preserve production behavior
  • Safely remove flag references from code
  • Create well-documented pull requests

Installation (Local)

For now, install by placing this skill directory where your agent client loads skills.

Examples:

  • Generic: copy skills/feature-flags/launchdarkly-flag-cleanup/ into your client's skills path

Prerequisites

This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment. The remote server provides higher-level, agent-optimized tools that orchestrate multiple API calls and return pruned, actionable responses.

Refer to your LaunchDarkly account settings for instructions on connecting to the remotely hosted MCP server.

Usage

Once installed, the skill activates automatically when you ask about flag cleanup:

Remove the `new-checkout-flow` feature flag
Is the `dark-mode` flag ready to be cleaned up?
Clean up stale feature flags in this codebase

Structure

launchdarkly-flag-cleanup/
├── SKILL.md
├── marketplace.json
├── README.md
└── references/
    ├── pr-template.md
    └── sdk-patterns.md

Related

License

Apache-2.0

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 provides a well-structured and safe workflow for automating feature flag cleanup using LaunchDarkly. It includes multiple safety checks, requires human confirmation before modifications, and follows developer best practices.

  • 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"
}

README badge

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

Safely removes a feature flag from code while preserving production behavior by querying LaunchDarkly to determine the correct forward value, finding all flag references, and replacing conditional branches with hardcoded variations. Targets teams using LaunchDarkly's MCP server and requires the remotely hosted LaunchDarkly service for the `check-removal-readiness` and `get-flag` tools.

Generated from the current SKILL.md.

Does this skill work with any LaunchDarkly SDK or only specific ones?
The skill handles multiple SDK patterns (variation(), boolVariation(), useFlags(), etc.) across different languages and frameworks. See the SDK Patterns reference for the full list of supported patterns.
What happens if the flag is configured differently across environments?
If critical environments differ in ON/OFF state or serve different variations, the skill will not proceed with removal. You must resolve the inconsistency in LaunchDarkly first.
Can this skill delete the flag from LaunchDarkly after code removal?
The skill can archive the flag (reversible) using archive-flag, or permanently delete it using delete-flag. Archival is preferred because deletion is irreversible.
What if code references the flag with a dynamic key like flag-${id}?
Automated removal may be incomplete with dynamic flag keys. The skill will flag this as needing manual review.
Does this skill require internet connectivity to LaunchDarkly?
Yes. The skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment to query flag state and perform removal readiness checks.

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