launchdarkly-flag-create
БесплатноБез исполняемых скриптовНе проверенCreate and configure LaunchDarkly feature flags in a way that fits the existing codebase. Use when the user wants to create a new flag, wrap code in a flag…
от launchdarkly★ 32 звезды на GitHubОб этом скилле
LaunchDarkly Flag Create & Configure
You're using a skill that will guide you through introducing a new feature flag into a codebase. Your job is to explore how flags are already used in this codebase, create the flag in LaunchDarkly in a way that fits, add the evaluation code matching existing patterns, and verify everything is wired up correctly.
Prerequisites
This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment.
Required MCP tools:
create-flag: create a new feature flag in a projectget-flags: verify the flag was created correctly
Optional MCP tools (enhance workflow):
get-flags: browse existing flags to understand naming conventions and tagsupdate-flag: update flag metadata (name, description, tags, temporary/permanent status)
Workflow
Step 1: Explore the Codebase
Before creating anything, understand how this codebase uses feature flags.
Find the SDK. Search for LaunchDarkly SDK imports or initialization:
- Look for
launchdarkly,ldclient,ld-client,LDClientin imports - Check
package.json,requirements.txt,go.mod,Gemfile, or equivalent for the SDK dependency - Identify which SDK is in use (server-side Node, React, Python, Go, Java, etc.)
- Look for
Find existing flag evaluations. Search for variation calls to understand the patterns this codebase uses:
- Direct SDK calls:
variation(),boolVariation(),useFlags(), etc. - Wrapper patterns: Does this codebase abstract flags behind a service or utility?
- Constant definitions: Are flag keys defined as constants somewhere?
- See SDK Evaluation Patterns for patterns by language
- Direct SDK calls:
Understand conventions. Look at existing flags to learn:
- Naming convention: Are keys
kebab-case,snake_case,camelCase? - Organization: Are flag keys co-located with features, or centralized in a constants file?
- Default values: What defaults do existing evaluations use?
- Context/user construction: How does this codebase build the user/context object passed to the SDK? This determines which context kinds and attributes any future targeting can use — and it differs by surface (server vs client vs anonymous). See Context Availability before planning a rule, individual target, or rollout.
- Naming convention: Are keys
Check LaunchDarkly project conventions. Optionally use
get-flagsto see existing flags:- What tags are commonly used?
- Are flags marked as temporary or permanent?
- What naming patterns exist in the project?
Step 2: Determine the Right Flag Type
Based on what the user needs, choose the appropriate flag configuration. See Flag Types and Patterns for the full guide.
Quick decision:
| User intent | Flag kind | Variations |
|---|---|---|
| "Toggle a feature on/off" | boolean |
true / false |
| "Gradually roll out a feature" | boolean |
true / false |
| "A/B test between options" | multivariate (string) |
User-defined values |
| "Configure a numeric threshold" | multivariate (number) |
User-defined values |
| "Serve different config objects" | multivariate (JSON) |
User-defined values |
Defaults to apply:
- Set
temporary: trueunless the user explicitly says this is a permanent/long-lived flag. Most flags are release flags that should eventually be cleaned up. - Generate a
keyfrom the name if not provided (e.g., "New Checkout Flow" ->new-checkout-flow), but match the codebase's naming convention if one exists. - Suggest relevant tags based on the feature area, team, or context the user mentions.
Step 3: Create the Flag in LaunchDarkly
Use create-flag with the configuration determined in Step 2.
After creation:
- The flag is created with targeting OFF in all environments.
- The flag serves the
offVariationto everyone until targeting is turned on. - Remind the user they'll need to use the flag targeting skill to toggle it on and optionally set up rollout rules.
Step 4: Add Flag Evaluation to Code
Now add the code to evaluate the flag, matching the patterns you found in Step 1.
- Use the same SDK patterns the codebase already uses. If there's a wrapper, use the wrapper. If there are constants, add the new key to the constants file.
- Use an appropriate default value. The default (fallback) value in code should be the "safe" behavior: typically the existing behavior before the flag. This ensures the feature stays off if the SDK can't reach LaunchDarkly.
- Add the conditional logic. Wrap the new behavior in a flag check.
- Handle both branches. Make sure the code path for each variation is clear and complete.
See SDK Evaluation Patterns for implementation examples by langu
Установить launchdarkly-flag-create в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл launchdarkly-flag-create?
Create and configure LaunchDarkly feature flags in a way that fits the existing codebase. Use when the user wants to create a new flag, wrap code in a flag, add a feature toggle, or set up an experiment. Guides exploration of existing patterns before creating.
Как установить скилл launchdarkly-flag-create?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл launchdarkly-flag-create запускает скрипты?
Нет, скилл состоит только из инструкций (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