All skills

Scripted, branded onboarding for LaunchDarkly. Fixed sequence with LaunchDarkly voice and tone. Enforces step completion before advancing. Redirects drift. Use when the user wants to set up LaunchDarkly from scratch or asks to start onboarding.

Use this Skill: https://skilld.dev/gh/launchdarkly/experimental-agent-skills/onboardingv2

This session only. Nothing lands on disk.

referencessdksnippetsnode-server-sdk.md

≈723 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Node.js (Server) — SDK detail

Includes: Patterns below follow the Get started, Initialize the client, Evaluate a context, and Promises and async sections of the Node.js server-side SDK reference. Use one initialization strategy (waitForInitialization or the ready event—not both at once unless you know why). Aligns with Create First Feature Flag (evaluation uses context + default).

Singleton client

LDClient must be a singleton per LaunchDarkly environment—do not create a new client per request. Use your real SDK key from env vars, not a literal in source.

import { init } from '@launchdarkly/node-server-sdk';

const client = init(process.env.LAUNCHDARKLY_SDK_KEY);

Wait for initialization (startup)

Run this once during process startup—for example before your HTTP server accepts connections, inside whatever async bootstrap your framework provides. The public docs use { timeout: 10 } (seconds); adjust as needed.

Promise style (from Promises and async):

client
  .waitForInitialization({ timeout: 5 })
  .then(() => {
    // Initialization complete — safe to evaluate flags and/or start serving traffic.
  })
  .catch((err) => {
    // Timeout or initialization failed
  });

Async/await (same topic—must live inside an async function your app already uses for startup):

try {
  await client.waitForInitialization({ timeout: 5 });
  // Initialization complete
} catch (err) {
  // Timeout or initialization failed
}

Alternative: the docs also document a ready event and callback-style client.variation(..., (err, value) => { ... }) under Evaluate a context—use that form if it fits your codebase better.

Evaluate a flag (when handling work)

The docs state that in production you should invoke variation as needed (not only once at import). Use await inside an async route handler, service method, job, etc.

const context = {
  kind: 'user',
  key: 'example-user-key',
  name: 'Example User',
};

const showFeature = await client.variation('example-flag-key', context, false);

For a boolean flag you may use boolVariation if you prefer; the official getting-started examples use variation with a boolean default.

Source: SKILL.md on GitHub

2 warnings1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    This skill provides a structured onboarding experience for LaunchDarkly, automating project detection, SDK installation, and MCP configuration. It adheres to security best practices by using OAuth for authentication, requiring user consent for secret management, and ensuring credentials are stored in git-ignored environment files.

  • Socket1mo

    1 alert: gptAnomaly

  • Snyk1mo

    Risk: MEDIUM · 1 issue

Signed by skilld at 39ec721. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Activeupdated 2 months ago
metadata
{
  "author": "launchdarkly",
  "version": "0.1.0"
}
Other metadata
compatibility
Requires npx and an MCP-compatible coding agent (Cursor, Claude Code, Windsurf, GitHub Copilot, etc.)

README badge

README badge for launchdarkly/experimental-agent-skills/onboardingv2