
Launchdarkly Flag Create
Introduce a new LaunchDarkly feature flag by mirroring existing SDK patterns in the repo and creating the flag via MCP.
Install
npx skills add https://github.com/launchdarkly/agent-skills --skill launchdarkly-flag-createWhat is this skill?
- Explores existing LaunchDarkly SDK usage and naming conventions before creating anything
- Uses MCP `create-flag` and `get-flag` with optional `list-flags` and `update-flag-settings`
- Guides evaluation code that matches codebase patterns for wrap/experiment/toggle requests
- Requires remotely hosted LaunchDarkly MCP server configuration
- Verification step confirms flag and wiring after changes
Adoption & trust: 1.5k installs on skills.sh; 16 GitHub stars; 3/3 security scanners passed (skills.sh audits).
Recommended Skills
Entra App Registrationmicrosoft/azure-skills
Azure Aigatewaymicrosoft/azure-skills
Lark Openapi Explorerlarksuite/cli
Supabasesupabase/agent-skills
Firebase Auth Basicsfirebase/agent-skills
Firebase Data Connectfirebase/agent-skills
Journey fit
Primary fit
Flag creation and evaluation code land while you are building product behavior, before you rely on toggles in production ship and operate loops. The workflow centers on LaunchDarkly SDK integration and MCP-backed flag configuration, not standalone UI or docs work.
Common Questions / FAQ
Is Launchdarkly Flag Create safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Launchdarkly Flag Create
# LaunchDarkly Flag Create & Configure You're using a skill that will guide you through introducing a new feature flag into a codebase. Your job is to explore how flags are already used in this codebase, create the flag in LaunchDarkly in a way that fits, add the evaluation code matching existing patterns, and verify everything is wired up correctly. ## Prerequisites This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment. **Required MCP tools:** - `create-flag`: create a new feature flag in a project - `get-flag`: verify the flag was created correctly **Optional MCP tools (enhance workflow):** - `list-flags`: browse existing flags to understand naming conventions and tags - `update-flag-settings`: update flag metadata (name, description, tags, temporary/permanent status) ## Workflow ### Step 1: Explore the Codebase Before creating anything, understand how this codebase uses feature flags. 1. **Find the SDK.** Search for LaunchDarkly SDK imports or initialization: - Look for `launchdarkly`, `ldclient`, `ld-client`, `LDClient` in imports - Check `package.json`, `requirements.txt`, `go.mod`, `Gemfile`, or equivalent for the SDK dependency - Identify which SDK is in use (server-side Node, React, Python, Go, Java, etc.) 2. **Find existing flag evaluations.** Search for variation calls to understand the patterns this codebase uses: - Direct SDK calls: `variation()`, `boolVariation()`, `useFlags()`, etc. - Wrapper patterns: Does this codebase abstract flags behind a service or utility? - Constant definitions: Are flag keys defined as constants somewhere? - See [SDK Evaluation Patterns](references/sdk-evaluation-patterns.md) for patterns by language 3. **Understand conventions.** Look at existing flags to learn: - **Naming convention**: Are keys `kebab-case`, `snake_case`, `camelCase`? - **Organization**: Are flag keys co-located with features, or centralized in a constants file? - **Default values**: What defaults do existing evaluations use? - **Context/user construction**: How does this codebase build the user/context object passed to the SDK? 4. **Check LaunchDarkly project conventions.** Optionally use `list-flags` to see existing flags: - What tags are commonly used? - Are flags marked as temporary or permanent? - What naming patterns exist in the project? ### Step 2: Determine the Right Flag Type Based on what the user needs, choose the appropriate flag configuration. See [Flag Types and Patterns](references/flag-types.md) for the full guide. **Quick decision:** | User intent | Flag kind | Variations | |-------------|-----------|------------| | "Toggle a feature on/off" | `boolean` | `true` / `false` | | "Gradually roll out a feature" | `boolean` | `true` / `false` | | "A/B test between options" | `multivariate` (string) | User-defined values | | "Configure a numeric threshold" | `multivariate` (number) | User-defined values | | "Serve different config objects" | `multivariate` (JSON) | User-defined values | **Defaults to apply:** - Set `temporary: true` unless the user explicitly says this is a permanent/long-lived flag. Most flags are release flags that should eventually be cleaned up. - Generate a `key` from the name if not provided (e.g., "New Checkout Flow" -> `new-checkout-flow`), but match the codebase's naming convention if one exists. - Suggest relevant tags based on the feature area, team, or context the user mentions. ### Step 3: Create the Flag in Laun