sdk-install — скилл для Claude Code: установка LaunchDarkly SDK
Ставит и инициализирует нужный LaunchDarkly SDK в проекте: сначала определяет стек, потом строит план, потом правит код.
npx skills add launchdarkly/ai-tooling --skill sdk-install -a claude-codeЧто делает sdk-install
Скилл разбит на три вложенных шага, которые выполняются строго по порядку: detect находит язык, пакетный менеджер, цель в монорепозитории, точку входа и следы уже подключённого LaunchDarkly, plan выбирает SDK и список файлов под правку, apply ставит пакеты, прописывает переменные окружения и код инициализации, затем прогоняет проверку сборки. Между шагами есть точки, где скилл останавливается и ждёт ответа — например, перед правкой файлов.
Ключи не спрашивают на этапе detect и plan. SDK key, client-side ID или mobile key нужны только на apply, когда дело доходит до переменных окружения, и хардкодить их нельзя. Если в проекте уже настроен MCP, статус аккаунта определяется через OAuth.
Проект должен быть на поддерживаемом языке или фреймворке — иначе рецепт придётся искать в каталоге SDK. Для фронтенда и бэкенда сразу (типичный случай Next.js) скилл делает dual-SDK план и обязан довести до конца оба пакета и обе инициализации: если во втором SDK нет записи в lockfile и правки в точке входа, работа не закончена. В монорепозитории он остаётся внутри выбранного пакета.
Какие задачи решает
- подключить LaunchDarkly SDK к незнакомому проекту
- определить язык и пакетный менеджер перед установкой
- развести ключи по переменным окружения вместо хардкода
- собрать план правок и показать его до изменений
- поставить SDK сразу для серверной и клиентской части
Примеры запросов агенту
- подключи LaunchDarkly SDK к этому проекту
- поставь SDK для фронтенда и бэкенда сразу
- проверь, что установка SDK прошла и код компилируется
Как установить sdk-install
1Через Skills CLI (Vercel)
npx skills add launchdarkly/ai-tooling --skill sdk-install -a claude-code2Вручную: положить файлы
~/.claude/skills/sdk-install/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/sdk-install/
1Через Skills CLI (Vercel)
npx skills add launchdarkly/ai-tooling --skill sdk-install -a codex2Вручную: положить файлы
.agents/skills/sdk-install/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add launchdarkly/ai-tooling --skill sdk-install -a cursor2Вручную: положить файлы
.cursor/skills/sdk-install/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install launchdarkly/ai-tooling sdk-install2Вручную: положить файлы
.github/skills/sdk-install/SKILL.md1Через Skills CLI (Vercel)
npx skills add launchdarkly/ai-tooling --skill sdk-install -a gemini-cli2Командой платформы
gemini skills install https://github.com/launchdarkly/ai-tooling --path skills/onboarding/sdk-installВручную: положить файлы
.devin/skills/sdk-install/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add launchdarkly/ai-tooling --skill sdk-install -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о sdk-install
Как установить sdk-install в Claude?
Выполните npx skills add launchdarkly/ai-tooling --skill sdk-install -a claude-code. После этого скилл лежит в ~/.claude/skills/sdk-install/SKILL.md.
Что делает sdk-install?
Проводит установку LaunchDarkly SDK по трём шагам: detect, plan, apply. На выходе — установленный пакет, переменные окружения и код инициализации с проверкой сборки.
Нужны ли ключи LaunchDarkly сразу?
Нет. На шагах detect и plan они не требуются, ключ или client-side ID понадобятся только на apply, когда скилл прописывает переменные окружения.
Исходный текст
SKILL.md · Apache-2.0
--- name: sdk-install description: "Install and initialize the correct LaunchDarkly SDK during onboarding by running nested skills in order: detect, plan, apply. Parent onboarding Step 4 is first flag." license: Apache-2.0 compatibility: Requires a supported language/framework in the project. SDK credentials are required by [Apply](apply/SKILL.md), not for [Detect](detect/SKILL.md) / [Plan](plan/SKILL.md) alone (see parent onboarding **Prerequisites**). metadata: author: launchdarkly version: "0.2.0" --- # LaunchDarkly SDK Install (onboarding) Installs and initializes the right LaunchDarkly SDK for the user’s project by following **three nested skills in order**. **Do not** skip ahead to feature flags here—the parent [LaunchDarkly onboarding](../SKILL.md) continues with **Step 4: First flag**. ## Prerequisites - Project context from parent **Step 1: Explore the Project** (reuse it; only re-run deep detection if something is unclear) - **SDK key / client-side ID / mobile key:** Needed when you reach [Apply code changes](apply/SKILL.md) (env wiring). **Do not** ask the user for these during detect or plan solely because you opened this skill—follow parent onboarding: account status is inferred via MCP OAuth when MCP is already configured, or surfaced at D7 in apply; key material is collected at apply (see parent [Prerequisites](../SKILL.md#prerequisites)). ## Key types (summary) | SDK Type | Variable (logical) | Source in LaunchDarkly | |-------------|---------------------------|-------------------------------| | Server-side | `LAUNCHDARKLY_SDK_KEY` | Environments → SDK key | | Client-side | Client-side ID (bundler-prefixed env names) | Environments → Client-side ID | | Mobile | `LAUNCHDARKLY_MOBILE_KEY` | Environments → Mobile key | **Never hardcode keys.** Full env rules, consent, and bundler tables: [Apply code changes](apply/SKILL.md) Step 2. ## Workflow — run these nested skills in order Execute **all three** unless the [detect decision tree](detect/SKILL.md#decision-tree) short-circuits (e.g. skip to apply only). Each nested skill may contain decision points — some **blocking** (marked `D<N> -- BLOCKING`, where you must call your structured question tool and wait for the user's response before continuing) and some **non-blocking** (where you present information and continue unless the user objects). Do NOT batch tool calls across blocking boundaries. | Order | Nested skill | Role | |-------|----------------|------| | 1 | [Detect repository stack](detect/SKILL.md) | Language, package manager, monorepo target, entrypoint, existing LD usage | | 2 | [Generate integration plan](plan/SKILL.md) | SDK choice, files to change, env plan -- presented to user (non-blocking; see plan SKILL.md D6) | | 3 | [Apply code changes](apply/SKILL.md) | Install package(s), `.env` / secrets with consent, init code, compile check (**both** tracks when [dual-SDK plan](plan/SKILL.md#dual-sdk-integrations)) | Shared references for all steps: [SDK recipes](../references/sdk/recipes.md), [SDK snippets](../references/sdk/snippets/). ### After Step 3 completes Continue with the parent skill: - **Step 4:** [First flag](../SKILL.md#step-4-first-flag) Do not add standalone “sample flag” evaluation in this skill unless the user explicitly needs a throwaway check; the parent flow creates the first flag in order. ## Guidelines - Match existing codebase conventions for imports, config, and style. - Prefer TypeScript in TypeScript projects. - If the project uses a shared config layer, initialize LaunchDarkly there. - Add `.env.example` entries when the project uses dotenv. - **Dependency scope:** Add only LaunchDarkly SDK package(s) from the recipe unless the user **explicitly approves** upgrading or adding other packages ([Apply — Permission before changing other dependencies](apply/SKILL.md#permission-before-changing-other-dependencies)). ## Edge cases - **Multiple environments (e.g. Next.js server + client) or user asked for frontend + backend:** Use a **dual-SDK** [plan](plan/SKILL.md#dual-sdk-integrations) and [apply](apply/SKILL.md) **both** packages and **both** inits—never summarize the second SDK as done without lockfile + entrypoint evidence. - **Monorepo:** Integrate the package the user chose in parent onboarding; stay within that subtree. - **SDK already installed and initialized:** Parent may skip this handoff—see parent **Edge Cases** and [detect decision tree](detect/SKILL.md#decision-tree). - **Unsupported or uncommon stack:** Use [SDK recipes](../references/sdk/recipes.md) and the [full SDK catalog](https://launchdarkly.com/docs/sdk). ## References - [Detect repository stack](detect/SKILL.md) - [Generate integration plan](plan/SKILL.md) - [Apply code changes](apply/SKILL.md) - [SDK recipes](../references/sdk/recipes.md) - [SDK snippets](../references/sdk/snippets/) - [LaunchDarkly onboarding (parent)](../SKILL.md)
© launchdarkly · Apache-2.0 · launchdarkly/ai-tooling