/launchdarkly:launchdarkly-flag-targetingfrom launchdarkly
Controls LaunchDarkly feature flag targeting: toggling flags on/off, percentage rollouts, targeting rules, individual targets, and copying config between environments.
Ships in launchdarkly. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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.
This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment.
Required MCP tools:
get-flags: understand current state before making changestoggle-flag: turn targeting on or off for a flag in an environmentupdate-rollout: change the default rule (fallthrough) variation or percentage rolloutupdate-targeting-rules: add, remove, or modify custom targeting rulesupdate-flag-targeting: add or remove specific users/contexts from individual targetingOptional MCP tools:
copy-flag-config: copy targeting configuration from one environment to anothercreate-approval-request: create an approval request when direct changes are blockedget-approval-requests: check on pending approval requests for a flagapply-approval-request: apply an already-approved approval requestBefore making any targeting changes, understand how LaunchDarkly evaluates flags. This determines what your changes actually do:
offVariation to everyone. Nothing else matters.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.
Before changing anything, check what's already configured.
get-flags 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?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 wants | Tool | Notes |
|---|---|---|
| "Turn it on" | toggle-flag with on: true | Simplest change |
| "Turn it off" | toggle-flag with on: false | Serves 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 clause | Rules are ANDed within, ORed between |
| "Add specific users" | update-flag-targeting | Highest priority, overrides all rules |
Before writing a rule, individual target, or percentage rollout, confirm the context supports it. A rule that names a context kind or attribute the flag's evaluation doesn't carry silently never matches; individual targets match the context key, not an attribute like email; and a rollout can only bucket by a kind present where the flag is read. See Context Availability to pick a context that will actually fire.
| "Full rollout" | update-rollout with rolloutType: "variation" | Serve one variation to everyone |
| "Copy from staging" | copy-flag-config | Promote tested config to production |
Before applying changes, especially in production, run through the Safety Checklist. The key checks:
requiresApproval: true:
approvalRequest.url.create-approval-request with the same instructions (returned in the instructions field of the response).Use the appropriate tool for the change. Every tool below, and copy-flag-config, requires confirm: true; pass it only after the user has agreed to 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-flag-targeting: Instructions support addTargets, removeTargets, and replaceTargets, plus addPrerequisite and removePrerequisite. addTargets and removeTargets take an optional contextKind.See Targeting Patterns for detailed instruction examples.
After applying changes, confirm the result:
get-flags again to verify the new state.true to 25% of users and false to 75%."When any mutation tool returns requiresApproval: true, the direct change was blocked because the environment requires approvals. Follow the Approval Workflows reference to:
create-approval-request using the instructions from the blocked responseget-approval-requests if requestedapply-approval-request only when the user asks for it and a reviewer has approved it (reviewStatus is "approved")get-flags after applyingupdate-rollout uses human-friendly percentages. Pass 80 for 80%, not 80000. The tool handles the internal weight conversion.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub launchdarkly/ai-tooling --plugin launchdarkly56 skills in this plugin
/agent-graphsCreate and manage agent graphs — directed graphs of configs connected by edges with handoff logic. Use when building multi-agent workflows where configs route to each other./aiconfig-agent-graphsDEPRECATED redirect — this skill was renamed to agent-graphs. Do not use this skill; invoke agent-graphs instead. Kept only so old references to aiconfig-agent-graphs still point users to the new name./aiconfig-ai-metricsDEPRECATED redirect — this skill was renamed to built-in-metrics. Do not use this skill; invoke built-in-metrics instead. Kept only so old references to aiconfig-ai-metrics still point users to the new name./aiconfig-createDEPRECATED redirect — this skill was renamed to configs-create. Do not use this skill; invoke configs-create instead. Kept only so old references to aiconfig-create still point users to the new name./aiconfig-custom-metricsDEPRECATED redirect — this skill was renamed to custom-metrics. Do not use this skill; invoke custom-metrics instead. Kept only so old references to aiconfig-custom-metrics still point users to the new name./aiconfig-migrateDEPRECATED redirect — this skill was renamed to migrate. Do not use this skill; invoke migrate instead. Kept only so old references to aiconfig-migrate still point users to the new name.Other plugins' skills for the same job