sdk-install
launchdarkly/agent-skills
Install and initialize the correct LaunchDarkly SDK by running detect, plan, and apply in sequence.
What is sdk-install?
This skill automates LaunchDarkly SDK installation and initialization during onboarding by orchestrating three nested skills in order: detect (identify project stack), plan (choose SDK and generate integration steps), and apply (install packages and wire credentials). Use it as part of the parent LaunchDarkly onboarding workflow after project exploration.
- Detects project language, package manager, monorepo structure, and existing LaunchDarkly usage
- Generates an integration plan showing SDK choice, files to modify, and environment variable strategy
- Installs the correct SDK package(s) and initializes them with proper configuration
- Handles dual-SDK scenarios (e.g., Next.js server + client or frontend + backend)
- Manages environment variable setup with user consent, avoiding hardcoded credentials
How to install sdk-install
npx skills add https://github.com/launchdarkly/agent-skills --skill sdk-install- Project context from parent onboarding Step 1 (Explore the Project)
- SDK key, client-side ID, or mobile key (collected during Apply step, not required for Detect or Plan alone)
- Supported language and framework in the project
How to use sdk-install
- 1.Run the Detect nested skill to analyze your project's language, package manager, and existing setup
- 2.Review the integration plan generated by the Plan nested skill, which shows SDK choice and files to modify
- 3.Execute the Apply nested skill to install packages, configure environment variables, and initialize the SDK
- 4.Verify the SDK is installed in your lockfile and initialization code is present in your entrypoint
- 5.Continue with parent onboarding Step 6 to create your first feature flag
Use cases
- Onboarding a new project to LaunchDarkly by automatically selecting and installing the appropriate SDK
- Setting up both server-side and client-side SDKs in full-stack applications
- Integrating LaunchDarkly into monorepo projects by targeting the correct package subdirectory
- Detecting existing LaunchDarkly usage and deciding whether to skip or upgrade the SDK
- Configuring environment variables and secrets securely without exposing keys in code
- Developers onboarding new projects to LaunchDarkly
- Teams managing full-stack or monorepo applications
- Users who want automated SDK detection and installation without manual configuration
sdk-install FAQ
No. SDK credentials are only needed when you reach the Apply step. Detect and Plan work with just project context. The parent onboarding collects credentials via OAuth or at the Apply decision point.
The skill detects this and generates a dual-SDK plan, installing and initializing both the server-side and client-side SDKs with appropriate configuration for each environment.
No. Always run all three nested skills in order unless the Detect decision tree explicitly short-circuits (e.g., SDK already installed). Skipping steps may miss critical configuration.
The Detect skill will identify existing usage. Depending on the version and setup, the parent onboarding may skip this skill entirely or the Apply step may upgrade the SDK.
No. The skill only adds LaunchDarkly SDK package(s) unless you explicitly approve upgrading or adding other packages.
Full instructions (SKILL.md)
Source of truth, from launchdarkly/agent-skills.
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 6 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 6: First feature flag using Create first feature 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 (Step 4) 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 6: Create first feature 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/agent-skills and the wider catalog.

snippets
Create and manage prompt snippets — reusable text blocks referenced inside config variation prompts. Keeps common instructions, personas, and guardrails consistent across multiple configs.

tools
Give your agents capabilities through tools (function calling). Helps you identify what your agent needs to do, create tool definitions, and attach them to config variations.

agent-graphs
Create and manage agent graphs — directed graphs of configs connected by edges with handoff logic. Use when building multi-agent workflows where configs route to each other.

aiconfig-agent-graphs
Deprecated 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
WPS 表格智能助手,通过自然语言操控 Excel,解决公式编写、数据清洗、图表创建等痛点问题