All skills
launchdarkly avatar

/launchdarkly-flag-targeting

@3039201 official

Control LaunchDarkly feature flag targeting including toggling flags on/off, percentage rollouts, targeting rules, individual targets, and copying flag configurations between environments. Use when the user wants to change who sees a flag, roll out to a percentage, add targeting rules, or promote config between environments.

Use this Skill: https://skilld.dev/gh/launchdarkly/agent-skills/launchdarkly-flag-targeting

This session only. Nothing lands on disk.

referencessafety-checklist.md

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

Targeting Safety Checklist

Run through this checklist before applying any targeting changes, especially in production.

Before Every Change

1. Right Environment?

  • Confirmed the environment with the user (don't assume "production")
  • If the user said "turn it on" without specifying, ask which environment

2. Right Flag?

  • Confirmed the flag key matches what the user intends
  • If the flag key could be ambiguous, verify with get-flag

3. Understand Current State

  • Fetched the flag's current configuration in the target environment
  • Noted the current on state, rules, and targets
  • Identified any prerequisites that must be met

4. Approval Required?

Some environments require approval for changes.

  • If any mutation tool returns requiresApproval: true, inform the user
  • Provide the approval URL if one was returned
  • Offer to create an approval request with create-approval-request using the returned instructions
  • Include a clear description of the intended change in the approval request
  • Do NOT attempt to bypass approval or auto-approve
  • If checking on a previous request, use list-approval-requests
  • Only apply a request (apply-approval-request) if reviewStatus is "approved"

See Approval Workflows for the complete reference.

5. Audit Trail

  • Added a comment to the change explaining what and why
  • This is especially important for production changes

For Percentage Rollouts

  • Weights sum to exactly 100% (100000 in the API)
  • The rollout is on the default rule (fallthrough) unless intentionally on a specific rule
  • Individual targets and higher-priority rules aren't silently overriding the rollout for some users
  • Consider starting small (1-5%) for high-risk features

For Targeting Rules

  • New rules are placed at the correct position in evaluation order
  • Clauses correctly express the targeting intent (AND within a rule, OR between rules)
  • The negate field is set correctly (default false)
  • The context kind matches what the codebase sends (e.g., user, device, organization)
  • Attribute names match exactly what the SDK sends (case-sensitive)

For Individual Targets

  • The values match exactly what the SDK sends as the user/context key
  • Individual targets are intended to override rules (they always win)
  • Using replaceTargets intentionally: it replaces ALL targets, not just adds

For Cross-Environment Copies

  • Source environment is the one you tested in
  • Target environment is correct
  • You've selected the right included actions (don't accidentally copy ON state to production if you only meant to copy rules)
  • Target environment's approval requirements are considered

Production-Specific Checks

For any change to a production environment:

  • Change has been tested in a lower environment first (staging, dev)
  • Rollback plan is clear (what to do if something goes wrong)
  • Comment explains the change for audit trail
  • If doing a percentage rollout, start with a small percentage first

After the Change

  • Verified the new state with get-flag
  • Described the resulting targeting to the user in plain language
  • Confirmed the change achieves what the user asked for

Source: SKILL.md on GitHub

1 warning16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill is safe and authored by the official vendor. It facilitates feature flag management through LaunchDarkly's remote MCP server. It implements strong safety controls, including mandatory human approval workflows for production environments and clear safety checklists. A minor risk of indirect prompt injection exists, as the agent processes flag metadata (like descriptions) which could contain malicious instructions from the LaunchDarkly platform.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    4/5 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 3039201. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 2 months ago
compatibility
Requires the remotely hosted LaunchDarkly MCP server
metadata
{
  "author": "launchdarkly",
  "version": "1.1.0-experimental"
}
  • launchdarkly
  • feature-flags
  • targeting
  • rollouts
  • rules
  • mcp-server
  • approval-workflows

README badge

README badge for launchdarkly/agent-skills/launchdarkly-flag-targeting

Manages LaunchDarkly feature flag targeting including toggling flags on/off, setting percentage rollouts, adding targeting rules, and copying configurations between environments. Use when you need to control flag visibility, stage a rollout, add audience rules, or promote flag settings from one environment to another.

Generated from the current SKILL.md.

Does this skill work without the LaunchDarkly MCP server?
No. This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment to use any of the targeting tools.
Can I copy flag configuration between environments?
Yes. The optional `copy-flag-config` tool lets you promote targeting configuration from one environment (like staging) to another (like production).
What happens if I toggle a flag on when it has targeting rules configured?
The flag will begin evaluating its targeting rules and individual targets. If nothing matches, it falls back to the default rule (fallthrough) variation or percentage rollout.
Do I need approval to make flag changes?
Some environments require approval workflows. If a change is blocked, the skill will create an approval request and prompt you to share it for review before the change can be applied.
What takes priority: individual targets, rules, or the default rollout?
Individual targets are highest priority and override all rules. Custom targeting rules are evaluated next, top-to-bottom. The default rule (fallthrough) applies only if nothing else matches.

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