Labsco
launchdarkly logo

sdk-install

19

by launchdarkly · part of launchdarkly/ai-tooling

Install and initialize the correct LaunchDarkly SDK during onboarding by running nested skills in order: detect, plan, apply. Parent onboarding Step 6 is first…

🔥🔥🔥✓ VerifiedAccount requiredAdvanced setup
🧩 One of 7 skills in the launchdarkly/ai-tooling package — works on its own, and pairs well with its siblings.

Install and initialize the correct LaunchDarkly SDK during onboarding by running nested skills in order: detect, plan, apply. Parent onboarding Step 6 is first…

Inspect the full instructions your agent will receiveExpand

This is the exact playbook injected into your agent when the skill activates — shown here so you can audit it before installing. You don't need to read it to use the skill.

by launchdarkly

Install and initialize the correct LaunchDarkly SDK during onboarding by running nested skills in order: detect, plan, apply. Parent onboarding Step 6 is first… npx skills add https://github.com/launchdarkly/agent-skills --skill sdk-install Download ZIPGitHub19

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:

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).

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