sdk-install
launchdarkly/ai-tooling
Install and initialize the correct LaunchDarkly SDK by detecting stack, planning integration, and applying code changes.
What is sdk-install?
This skill automates LaunchDarkly SDK setup during onboarding by running three nested workflows in sequence: detect your project's language and framework, generate an integration plan, and apply the necessary code changes. Use it when onboarding a new project to LaunchDarkly feature flags.
- Detects project language, package manager, monorepo structure, and existing LaunchDarkly usage
- Generates an SDK integration plan tailored to your stack (server-side, client-side, or mobile)
- Installs the appropriate LaunchDarkly SDK package(s) and initializes them in your codebase
- Handles dual-SDK scenarios (e.g., Next.js server + client) by installing and configuring both
- Manages environment variables and secrets with user consent, avoiding hardcoded keys
- Validates integration with a compile check after applying changes
How to install sdk-install
npx skills add https://github.com/launchdarkly/ai-tooling --skill sdk-install- Project context from parent onboarding Step 1 (Explore the Project)
- SDK key, client-side ID, or mobile key (required only when reaching the Apply step, not for Detect or Plan alone)
- Supported language/framework in the project (Node.js, Python, Java, Go, Ruby, etc.)
How to use sdk-install
- 1.Run the Detect nested skill to analyze your project's language, framework, package manager, and existing LaunchDarkly usage
- 2.Review the integration plan generated by the Plan nested skill, which recommends SDK type and files to modify
- 3.Provide SDK credentials (key/client-side ID/mobile key) when prompted during the Apply step
- 4.Allow the skill to install the LaunchDarkly SDK package(s) and initialize them in your codebase
- 5.Verify the compile check passes after code changes are applied
- 6.Continue with parent onboarding Step 4 to create your first feature flag
Use cases
- Onboarding a new project to LaunchDarkly by automatically selecting and installing the correct SDK variant
- Setting up feature flags in a monorepo by detecting the target package and integrating within its subtree
- Configuring dual-SDK environments (frontend + backend) in frameworks like Next.js or similar
- Migrating an existing project to LaunchDarkly by detecting current setup and planning the integration path
- Ensuring SDK credentials are properly wired through environment variables without hardcoding secrets
- Developers onboarding projects to LaunchDarkly
- Teams managing monorepos or multi-environment applications
- Engineers setting up feature flag infrastructure for the first time
- DevOps or platform engineers automating SDK deployment across projects
sdk-install FAQ
No. Credentials are only required when you reach the Apply step (the third nested skill). Detect and Plan can run without them.
The skill detects this and generates a dual-SDK plan, installing and initializing both the server-side and client-side SDKs with appropriate environment variable configuration.
Yes. The skill detects monorepo structure and integrates the LaunchDarkly SDK into the specific package you selected during parent onboarding.
No. The skill manages SDK credentials through environment variables (e.g., LAUNCHDARKLY_SDK_KEY) and adds .env.example entries; it never hardcodes keys.
The Detect step identifies existing SDK usage. If already initialized, the parent onboarding may skip this skill entirely, or the skill will plan around the existing setup.
Full instructions (SKILL.md)
Source of truth, from launchdarkly/ai-tooling.
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, not for Detect / Plan 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 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 (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).
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 Step 2.
Workflow — run these nested skills in order
Execute all three unless the detect 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 | Language, package manager, monorepo target, entrypoint, existing LD usage |
| 2 | Generate integration plan | SDK choice, files to change, env plan -- presented to user (non-blocking; see plan SKILL.md D6) |
| 3 | Apply code changes | Install package(s), .env / secrets with consent, init code, compile check (both tracks when dual-SDK plan) |
Shared references for all steps: SDK recipes, SDK snippets.
After Step 3 completes
Continue with the parent skill:
- 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.exampleentries 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).
Edge cases
- Multiple environments (e.g. Next.js server + client) or user asked for frontend + backend: Use a dual-SDK plan and apply 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.
- Unsupported or uncommon stack: Use SDK recipes and the full SDK catalog.
References
- Detect repository stack
- Generate integration plan
- Apply code changes
- SDK recipes
- SDK snippets
- LaunchDarkly onboarding (parent)
Related skills
More from launchdarkly/ai-tooling and the wider catalog.

snippets
Create and manage reusable prompt snippets to keep instructions, personas, and guardrails consistent across multiple AI configs.

tools
Define and attach function-calling tools to your AI agents through LaunchDarkly config variations.

agent-graphs
Create and manage directed graphs of agent configs with handoff logic for multi-agent workflows.

aiconfig-agent-graphs
Deprecated redirect to agent-graphs skill — use agent-graphs instead.

python-code-quality
Python code quality with ruff and ty. Use when the user mentions ruff, ty, linting, formatting, type checking, or Python code style.

wps-excel
Natural language Excel assistant for formula writing, data cleaning, and chart creation.