Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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 name
  • get-projects (with projectKey): enumerate the project's environments to determine which are critical
  • get-flag-status-across-envs: quick snapshot of a flag's state across environments (a fast way to spot cross-environment differences before pulling each get-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 true but Federal serves false), 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

  1. Get the flag key. If the user described the flag by name, use get-flags to resolve the key. Confirm before proceeding.
  2. 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-projects with the project key to enumerate what exists if the set is unclear. Do not assume a single production.

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 single variation (an index), that's the resolved value. If it's a percentage rollout, there is no single default value, so stop and handle as an edge case.
  • variations: map fallthrough.variation (the index) to variations[index].value. This resolved value is that environment's expected default.
  • offVariation and 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
Полный SKILL.md на GitHub

Установить launchdarkly-flag-drift в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

README.mdmarketplace.jsonreferences/pr-template.mdreferences/sdk-default-patterns.md

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), без исполняемых скриптов.

Похожие скиллы

Сравнить launchdarkly-flag-drift с