Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
launchdarkly avatar

Launchdarkly Flag Create

  • 3k installs
  • 23 repo stars
  • Updated August 5, 2026
  • launchdarkly/agent-skills

launchdarkly-flag-create explores codebase flag patterns, creates flags via MCP, and adds safe evaluation code.

About

The launchdarkly-flag-create skill introduces new feature flags that match how the codebase already evaluates flags. Step one explores SDK imports, wrapper utilities, constant key files, variation call patterns, and context construction before creating anything. Step two picks boolean or multivariate flag kinds from user intent: toggles and rollouts use boolean true/false; A/B tests and config objects use multivariate string, number, or JSON variations. Defaults mark flags temporary unless the user says permanent, generate keys from names in the project's naming style, and suggest tags from feature context. Step three calls create-flag via the LaunchDarkly MCP server; new flags start with targeting OFF in all environments serving offVariation. Step four adds evaluation code using the same wrapper and default-fallback patterns, wrapping new behavior with safe existing-behavior defaults when the SDK is unreachable. Step five verifies compile/lint, get-flag confirmation, and both on/off code paths. Requires LaunchDarkly MCP with create-flag and get-flag. Flag keys are immutable; use the flag-targeting skill to enable rollouts after creation.

  • Explore existing SDK patterns, wrappers, and flag key constants before creating.
  • Boolean for toggles/rollouts; multivariate for A/B tests and config objects.
  • create-flag via MCP; flags start OFF with targeting disabled in all environments.
  • Code default must be safe existing behavior when LaunchDarkly is unreachable.
  • Immutable flag keys; use flag-targeting skill to turn targeting on after creation.

Launchdarkly Flag Create by the numbers

  • 3,046 all-time installs (skills.sh)
  • +72 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #12 of 248 Release Management skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

launchdarkly-flag-create capabilities & compatibility

Capabilities
codebase sdk and convention discovery · flag type and variation selection · mcp create flag provisioning · safe default evaluation code insertion · post create verification with get flag
Use cases
ci cd · orchestration · api development
From the docs

What launchdarkly-flag-create says it does

Before creating anything, understand how this codebase uses feature flags.
SKILL.md
npx skills add https://github.com/launchdarkly/agent-skills --skill launchdarkly-flag-create

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3k
repo stars23
Security audit3 / 3 scanners passed
Last updatedAugust 5, 2026
Repositorylaunchdarkly/agent-skills

How do I add a new LaunchDarkly feature flag that matches our existing SDK conventions?

Create LaunchDarkly feature flags matching existing SDK patterns, add evaluation code with safe defaults, and verify wiring via MCP tools.

Who is it for?

Introducing boolean or multivariate flags with LaunchDarkly MCP and matching local SDK patterns.

Skip if: Skip for changing who sees a flag; use launchdarkly-flag-targeting for rollouts and rules.

When should I use this skill?

User wants a new flag, feature toggle, experiment setup, or wrap code in a LaunchDarkly check.

What you get

Created flag in LaunchDarkly plus evaluation code with safe defaults and verified on/off paths.

  • configured feature flag
  • codebase flag wrapper
  • experiment setup

By the numbers

  • Version 1.0.0-experimental
  • Requires LaunchDarkly MCP server integration

Files

SKILL.mdMarkdownGitHub ↗

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 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 for the full guide.

Quick decision:

User intentFlag kindVariations
"Toggle a feature on/off"booleantrue / false
"Gradually roll out a feature"booleantrue / 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 LaunchDarkly

Use create-flag with the configuration determined in Step 2.

After creation:

  • The flag is created with targeting OFF in all environments.
  • The flag serves the offVariation to everyone until targeting is turned on.
  • Remind the user they'll need to use the flag targeting skill to toggle it on and optionally set up rollout rules.

Step 4: Add Flag Evaluation to Code

Now add the code to evaluate the flag, matching the patterns you found in Step 1.

1. Use the same SDK patterns the codebase already uses. If there's a wrapper, use the wrapper. If there are constants, add the new key to the constants file. 2. Use an appropriate default value. The default (fallback) value in code should be the "safe" behavior: typically the existing behavior before the flag. This ensures the feature stays off if the SDK can't reach LaunchDarkly. 3. Add the conditional logic. Wrap the new behavior in a flag check. 4. Handle both branches. Make sure the code path for each variation is clear and complete.

See SDK Evaluation Patterns for implementation examples by language and framework.

Step 5: Verify

Confirm the flag is properly set up:

1. Code compiles/passes linting. Run the project's build or lint step. 2. Flag exists in LaunchDarkly. Use get-flag to confirm it was created with the right configuration. 3. Both code paths work. The flag-off path preserves existing behavior; the flag-on path enables the new feature. 4. Default value is safe. If LaunchDarkly is unreachable, the code falls back to the default: make sure that's the existing/safe behavior.

Updating Flag Settings

If the user wants to change flag metadata (not targeting), use update-flag-settings. Supported changes:

ChangeInstruction
Rename{kind: "updateName", value: "New Name"}
Update description{kind: "updateDescription", value: "New description"}
Add tags{kind: "addTags", values: ["tag1", "tag2"]}
Remove tags{kind: "removeTags", values: ["old-tag"]}
Mark as temporary{kind: "markTemporary"}
Mark as permanent{kind: "markPermanent"}

Multiple instructions can be batched in a single call. These changes are project-wide, not environment-specific.

Important: Metadata updates (above) are separate from targeting changes (toggle, rollout, rules). If the user wants to change who sees what, direct them to the flag targeting skill.

Important Context

  • Flag keys are immutable. Once created, a flag's key cannot be changed. Choose carefully.
  • Flags start OFF. Creation never enables a flag. This is a safety feature.
  • The default value in code is your safety net. It's what gets served when the SDK can't connect to LaunchDarkly. Always use the "safe" / existing behavior as the default.
  • Follow existing codebase conventions. The most common mistake is introducing a flag pattern that doesn't match what the team already does. Step 1 exists to prevent this.

References

  • Flag Types and Patterns: Boolean vs multivariate, naming conventions, configuration best practices
  • SDK Evaluation Patterns: How to evaluate flags in each SDK, including common wrapper patterns

Related skills

Forks & variants (1)

Launchdarkly Flag Create has 1 known copy in the catalog totaling 537 installs. They canonicalize to this original listing.

How it compares

Use launchdarkly-flag-create for new flag introduction with codebase pattern discovery; use launchdarkly-flag-targeting for rollout and targeting changes on existing flags.

FAQ

Are new flags enabled immediately?

No. Creation leaves targeting OFF; everyone gets offVariation until the targeting skill turns it on.

What default should code use?

The safe existing behavior before the flag, so unreachable SDK serves the current production path.

Which MCP tools are required?

Remotely hosted LaunchDarkly MCP with create-flag and get-flag at minimum.

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.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.