Labsco
launchdarkly logo

apply

19

by launchdarkly · part of launchdarkly/ai-tooling

Apply LaunchDarkly SDK onboarding: install dependency (or dual-SDK pair), configure env and secrets with consent, add init at entrypoint(s), verify compile.…

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

Apply LaunchDarkly SDK onboarding: install dependency (or dual-SDK pair), configure env and secrets with consent, add init at entrypoint(s), verify compile.…

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

Apply LaunchDarkly SDK onboarding: install dependency (or dual-SDK pair), configure env and secrets with consent, add init at entrypoint(s), verify compile.… npx skills add https://github.com/launchdarkly/agent-skills --skill apply Download ZIPGitHub19

Step 3: Add SDK initialization code

Initialization shape depends on which SDK was chosen during detection and planning. This skill does not include copy-paste samples per SDK -- using the wrong snippet (e.g. React Web when the recipe is Node server) will mislead you.

Source of truth (use in order, repeat per track when dual-SDK):

  • SDK recipes -- the row for this track's SDK: install is Step 1 above; for init, follow the SDK detail / doc links listed there.

  • SDK detail files under snippets/ (when linked from the recipe) -- curated links and, for many SDKs, a full onboarding sample aligned with that SDK.

  • LaunchDarkly's official docs for that SDK (URLs from the recipe or detail file) -- use their entrypoint and async patterns (e.g. React Web: React Web SDK).

Wire credentials using Step 2: server SDKs use LAUNCHDARKLY_SDK_KEY; client/browser SDKs use the client-side ID with the bundler-prefixed env names from Step 2 where applicable.

Add imports and init to the application entrypoint for that track (or the target package's entrypoint in a monorepo -- see Detect repository stack). Dual SDK: server init goes in the server entrypoint from the plan; client/provider init goes in the client entrypoint -- never a single shared block that pretends to cover both unless the official docs for that stack explicitly prescribe one pattern for both.

Key principles

  • Import at the top of the file with other imports

  • Initialize early in the application lifecycle for that runtime (Node server vs browser)

  • Wait for initialization before evaluating flags when the SDK supports it

  • Handle errors -- log failures but don't crash the application

  • Match existing code style -- same patterns (async/await, callbacks, modules CommonJS vs ESM) as the rest of the codebase

  • Use the right pattern per surface -- server-side init from the server recipe in server code; client/provider init from the client recipe in client code. Do not reuse one snippet for both tracks or skip the second track's init when the plan is dual-SDK.

Step 4: Verify the code compiles

After making changes:

  • Run the project's build or compile step

  • Run the linter if one is configured

  • Fix any import errors or type issues without upgrading unrelated dependencies unless the user approved that scope ( Permission before changing other dependencies )

Do not proceed to the next step if the code doesn't compile.

Upon completion: Start the application