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

Launchdarkly Flag Targeting

  • 3k installs
  • 20 repo stars
  • Updated July 27, 2026
  • launchdarkly/agent-skills

launchdarkly-flag-targeting changes flag on/off state, rollouts, rules, and individual targets via LaunchDarkly MCP safely.

About

The launchdarkly-flag-targeting skill changes who sees which variation for existing LaunchDarkly flags. Evaluation order matters: OFF serves offVariation; individual targets win; custom rules evaluate top to bottom; default fallthrough applies last. Step one confirms environment, fetches get-flag state including on, fallthrough, rules, targets, and prerequisites. Step two maps user intent to toggle-flag, update-rollout with percentage weights summing to 100, update-targeting-rules, update-individual-targets, or copy-flag-config between environments. Step three runs the safety checklist: correct environment, approval-required responses, prerequisite flags, rule ordering impact, and audit comments especially in production. Step four applies mutations; human-friendly percentages like 80 mean 80 percent. Step five re-fetches and describes resulting behavior in plain language. When requiresApproval is true, create approval requests instead of bypassing, then apply after review. Launched flags remain ON; cleanup skill handles removal. Requires LaunchDarkly MCP with get-flag, toggle-flag, update-rollout, update-targeting-rules, and update-individual-targets.

  • Evaluation order: OFF, individual targets, rules top-down, then fallthrough default.
  • toggle-flag, update-rollout, rules, individual targets, or copy-flag-config tools.
  • Percentage rollout weights must sum to 100; pass 80 for 80 percent.
  • Production safety checklist with approval workflow when requiresApproval returns.
  • Always confirm environment; ambiguous turn it on requests need explicit env.

Launchdarkly Flag Targeting by the numbers

  • 2,971 all-time installs (skills.sh)
  • +190 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #13 of 257 Release Management skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

launchdarkly-flag-targeting capabilities & compatibility

Capabilities
pre change get flag state assessment · toggle, rollout, rule, and individual target mut · cross environment copy flag config promotion · approval required environment workflow handling · post change verification and plain language summ
Use cases
ci cd · orchestration · devops
From the docs

What launchdarkly-flag-targeting says it does

Always confirm which environment the user means. Default to asking rather than assuming.
SKILL.md
npx skills add https://github.com/launchdarkly/agent-skills --skill launchdarkly-flag-targeting

Add your badge

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

Listed on Skillselion
Installs3k
repo stars20
Security audit3 / 3 scanners passed
Last updatedJuly 27, 2026
Repositorylaunchdarkly/agent-skills

How do I roll out a feature flag to a percentage, beta segment, or another environment?

Control LaunchDarkly flag targeting with toggles, percentage rollouts, custom rules, individual targets, and cross-environment config copy via MCP.

Who is it for?

Changing LaunchDarkly targeting, rollouts, beta rules, or copying tested config between environments.

Skip if: Skip for creating new flags; use launchdarkly-flag-create first, or cleanup skill to remove launched flags.

When should I use this skill?

User wants to turn a flag on, roll out to percent, add beta rules, or copy staging targeting to prod.

What you get

Verified targeting state with documented who-sees-what after toggle, rollout, or rule changes.

  • updated targeting rules
  • rollout configuration
  • cross-environment flag copy

By the numbers

  • Version 1.0.0-experimental
  • Requires @launchdarkly/mcp-server MCP integration

Files

SKILL.mdMarkdownGitHub ↗

LaunchDarkly Flag Targeting & Rollout

You're using a skill that will guide you through changing who sees what for a feature flag. Your job is to understand the current state of the flag, figure out the right targeting approach for what the user wants, make the changes safely, and verify the resulting state.

Prerequisites

This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment.

Required MCP tools:

  • get-flag: understand current state before making changes
  • toggle-flag: turn targeting on or off for a flag in an environment
  • update-rollout: change the default rule (fallthrough) variation or percentage rollout
  • update-targeting-rules: add, remove, or modify custom targeting rules
  • update-individual-targets: add or remove specific users/contexts from individual targeting

Optional MCP tools:

  • copy-flag-config: copy targeting configuration from one environment to another
  • create-approval-request: create an approval request when direct changes are blocked
  • list-approval-requests: check on pending approval requests for a flag
  • apply-approval-request: apply an already-approved approval request

Core Concept: Evaluation Order

Before making any targeting changes, understand how LaunchDarkly evaluates flags. This determines what your changes actually do:

1. Flag is OFF -> Serve the offVariation to everyone. Nothing else matters. 2. Individual targets -> If the context matches a specific target list, serve that variation. Highest priority. 3. Custom rules -> Evaluate rules top-to-bottom. First matching rule wins. 4. Default rule (fallthrough) -> If nothing else matched, serve this variation or rollout.

This means: if you add a targeting rule but the flag is OFF, nobody sees the change. If you set a percentage rollout on the default rule but there's an individual target, that targeted user bypasses the rollout.

Workflow

Step 1: Understand Current State

Before changing anything, check what's already configured.

1. Confirm the environment. "Turn it on" without specifying an environment is ambiguous. Always confirm which environment the user means. Default to asking rather than assuming. 2. Fetch the flag. Use get-flag with the target environment to see:

  • on: Is targeting currently enabled?
  • fallthrough: What's the default rule? (variation or percentage rollout)
  • offVariation: What serves when the flag is off?
  • rules: Any custom targeting rules?
  • targets: Any individually targeted users/contexts?
  • prerequisites: Any flags this depends on?

3. Assess complexity. A flag with no rules and no individual targets is simple. A flag with multiple rules, targets, and prerequisites needs more care.

Step 2: Determine the Right Approach

Based on what the user wants and what you found, choose the right tool and strategy. See Targeting Patterns for the full reference.

Common scenarios:

User wantsToolNotes
"Turn it on"toggle-flag with on: trueSimplest change
"Turn it off"toggle-flag with on: falseServes offVariation to everyone
"Roll out to X%"update-rollout with rolloutType: "percentage"Weights must sum to 100
"Enable for beta users"update-targeting-rules: add a rule with clauseRules are ANDed within, ORed between
"Add specific users"update-individual-targetsHighest priority, overrides all rules
"Full rollout"update-rollout with rolloutType: "variation"Serve one variation to everyone
"Copy from staging"copy-flag-configPromote tested config to production

Step 3: Run the Safety Checklist

Before applying changes, especially in production, run through the Safety Checklist. The key checks:

1. Right environment? Double-check you're targeting the intended environment. 2. Approval required? Some environments require approval workflows. If any mutation tool returns requiresApproval: true:

  • Inform the user that this environment requires approvals.
  • Share the approvalUrl if provided.
  • Offer to create an approval request using create-approval-request with the same instructions (returned in the instructions field of the response).
  • Do NOT attempt to bypass approval or auto-approve.
  • See Approval Workflows for the full process.

3. Prerequisite flags? If this flag has prerequisites, they must be met before targeting works as expected. 4. Rule ordering impact? If adding rules, consider where they fall in evaluation order. Rules evaluate top-to-bottom, first match wins. 5. Include a comment. Always add an audit trail comment, especially for production changes.

Step 4: Apply Changes

Use the appropriate tool for the change. Key notes:

  • `toggle-flag`: Specify on: true or on: false, the env, and a comment.
  • `update-rollout`: Use rolloutType: "percentage" with human-friendly weights (e.g., 80 for 80%) that sum to 100, or rolloutType: "variation" with a variationIndex.
  • `update-targeting-rules`: Instructions support addRule, removeRule, updateRuleVariationOrRollout, addClauses, removeClauses, reorderRules.
  • `update-individual-targets`: Instructions support addTargets, removeTargets, addContextTargets, removeContextTargets, replaceTargets.

See Targeting Patterns for detailed instruction examples.

Step 5: Verify

After applying changes, confirm the result:

1. Fetch the updated flag. Use get-flag again to verify the new state. 2. Confirm what the user expects. Describe the resulting targeting in plain language:

  • "The flag is now ON in production, serving true to 25% of users and false to 75%."
  • "Beta users now see variation A. Everyone else gets the default (variation B)."

3. Check for side effects. If there are rules or individual targets, make sure the change interacts correctly with them.

Handling Approval-Required Environments

When any mutation tool returns requiresApproval: true, the direct change was blocked because the environment requires approvals. Follow the Approval Workflows reference to:

1. Create an approval request with create-approval-request using the instructions from the blocked response 2. Inform the user about the pending approval and share the approval request details 3. Check on approval status later with list-approval-requests if requested 4. Apply the request with apply-approval-request once a reviewer has approved it (reviewStatus is "approved") 5. Verify the result with get-flag after applying

Important Context

  • `update-rollout` uses human-friendly percentages. Pass 80 for 80%, not 80000. The tool handles the internal weight conversion.
  • Weights must sum to 100. For percentage rollouts, the weights across all variations must total exactly 100.
  • Rule ordering matters. Rules evaluate top-to-bottom. Reordering rules can change behavior without changing any individual rule.
  • Individual targets are highest priority. They override all rules and the default. Adding someone as an individual target means rules don't apply to them.
  • "Launched" flags are still ON. A flag with status "launched" is serving a single variation to everyone. If you want to remove the flag, use the cleanup skill, not targeting changes.

References

  • Targeting Patterns: Rollout strategies, rule construction, individual targeting, and cross-environment copying
  • Safety Checklist: Pre-change verification, approval workflows, environment awareness
  • Approval Workflows: Creating, checking, and applying approval requests

Related skills

Forks & variants (1)

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

How it compares

Use launchdarkly-flag-targeting for rollout and targeting changes on live flags; use launchdarkly-flag-create when adding new flags to application code.

FAQ

Why does my rule change have no effect?

If the flag is OFF, everyone gets offVariation; toggle targeting on or check evaluation order.

How do percentage rollouts work?

update-rollout with rolloutType percentage; weights are human-friendly and must total 100.

What if mutation returns requiresApproval?

Create an approval request with returned instructions; do not bypass or auto-approve production gates.

Is Launchdarkly Flag Targeting 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.