launchdarkly-flag-drift
БесплатноБез исполняемых скриптовНе проверенDetect and reconcile drift between a feature flag's in-code SDK fallback default and its LaunchDarkly default rule (fallthrough). Use when a flag's default…
от launchdarkly★ 32 звезды на GitHubОб этом скилле
LaunchDarkly Flag Drift Detection
You're using a skill that will guide you through checking whether a feature flag's in-code SDK fallback default has drifted from its LaunchDarkly default rule (fallthrough), and reconciling the code if it has. Your job is to determine the flag's current default rule value from LaunchDarkly, locate the default argument passed to every SDK evaluation in code, compare them, and, only when they differ, update the in-code default so it matches. You never remove the flag or change its evaluation logic.
Prerequisites
This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment.
Required MCP tools:
get-flags: fetch the flag's configuration in a specific environment (fallthrough, variations, offVariation). Fallthrough is environment-specific, so call this once per critical environment.
Optional MCP tools:
get-flags: find the flag key if the user only described the flag by nameget-projects(with projectKey): enumerate the project's environments to determine which are criticalget-flag-status-across-envs: quick snapshot of a flag's state across environments (a fast way to spot cross-environment differences before pulling eachget-flags)
Core Concept: The SDK Fallback Default Is Not the Off Variation
Every SDK evaluation call takes a fallback default: the value returned when LaunchDarkly is unreachable, the client is uninitialized, or the flag is unavailable. This is a code-side safety value, distinct from the flag's offVariation (served when the flag is toggled off) and from its fallthrough (the default rule served when no targeting rule matches).
This skill treats one specific invariant as "correct": the in-code fallback default should match the current default rule (fallthrough) value. When they diverge, that's drift. Reconciling it keeps the value returned during an outage consistent with what most users would otherwise receive.
Core Concept: One In-Code Default, Many Environments
The in-code fallback default is a single value compiled into the deployed code. The flag's fallthrough, however, is configured per environment and can differ between them (e.g. production, eu-production, and federal may each serve a different default rule). So the fallthrough must be resolved in every critical environment the code runs against, not just one.
- When the critical environments agree on the fallthrough, that shared value is the expected default. Reconcile as normal.
- When they disagree (e.g. EU serves
truebut Federal servesfalse), a single in-code default cannot match all of them. That divergence is itself a finding: surface it and confirm which environment is authoritative for this build rather than silently reconciling to one. See Edge Cases.
Checking only one environment is the most common way this skill produces a wrong or misleading result, so always establish the full set of critical environments first.
Some teams intentionally keep the fallback as a conservative/off value instead. Treat a mismatch as a finding to surface, not always an automatic edit. See Edge Cases.
Workflow
Step 1: Identify the Flag and the Critical Environments
- Get the flag key. If the user described the flag by name, use
get-flagsto resolve the key. Confirm before proceeding. - Establish the critical environments. The fallthrough is environment-specific, and the same in-code default has to stand in for every environment the deployed code serves. Determine that full set before comparing:
- If one build serves multiple production-grade environments (e.g.
production,eu-production,federal), all of them are critical. - If the build is scoped to one environment (a region- or tenant-specific deployment, e.g. a Federal-only build), that single environment is the only critical one.
- Look for signals in the repo (deploy config, environment names in CI, SDK key wiring) and confirm with the user. Use
get-projectswith the project key to enumerate what exists if the set is unclear. Do not assume a singleproduction.
- If one build serves multiple production-grade environments (e.g.
Step 2: Determine the Expected Default from LaunchDarkly
Call get-flags once per critical environment. For each environment, read:
fallthrough: the default rule. If it points to a singlevariation(an index), that's the resolved value. If it's a percentagerollout, there is no single default value, so stop and handle as an edge case.variations: mapfallthrough.variation(the index) tovariations[index].value. This resolved value is that environment's expected default.offVariationand flag type: useful context for the comparison and for spotting type mismatches.
Then reconcile across environments:
| Across critical environments | Expected default |
|---|---|
| All resolve to the same value | That shared value is the expec |
Установить launchdarkly-flag-drift в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл launchdarkly-flag-drift?
Detect and reconcile drift between a feature flag's in-code SDK fallback default and its LaunchDarkly default rule (fallthrough). Use when a flag's default rule changed, when the user asks to detect flag drift, check whether a hardcoded default still matches LaunchDarkly, sync an in-code default, or open a PR reconciling a fallback value, without removing the flag or its evaluation.
Как установить скилл launchdarkly-flag-drift?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл launchdarkly-flag-drift запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic