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.

referencessdksnippetsreact-web-sdk.md

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

React (Web) — SDK detail

Initialization: Prefer asyncWithLDProvider so the tree mounts after the underlying JavaScript client is ready (avoids startup flag flicker). Pass timeout in seconds (docs recommend 1–5); it is forwarded to waitForInitialization on the JS client (Configuration options). withLDProvider is an alternative if you accept initializing after the first mount.

Credentials: Client-side ID from Project settings > Environments (not a server SDK key). Bundler env prefixes: Apply: environment configuration.

Includes: Copy-paste sample for a Vite-style client entry (e.g. main.tsx). Requires React 16.8+ (asyncWithLDProvider uses hooks).

import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import { asyncWithLDProvider } from 'launchdarkly-react-client-sdk';

function App() {
  return <div>Let your feature flags fly!</div>;
}

// A "context" is a data object representing users, devices, organizations, and other entities.
const context = {
  kind: 'user',
  key: 'EXAMPLE_CONTEXT_KEY',
  email: 'user@example.com',
};

const clientSideID = import.meta.env.VITE_LAUNCHDARKLY_CLIENT_SIDE_ID?.trim();
if (!clientSideID) {
  throw new Error(
    'LaunchDarkly: missing client-side ID. Set VITE_LAUNCHDARKLY_CLIENT_SIDE_ID (Vite), REACT_APP_LAUNCHDARKLY_CLIENT_SIDE_ID (CRA), or NEXT_PUBLIC_LAUNCHDARKLY_CLIENT_SIDE_ID (Next.js client).',
  );
}

void (async () => {
  const LDProvider = await asyncWithLDProvider({
    clientSideID,
    context,
    timeout: 5,
  });

  const rootEl = document.getElementById('root');
  if (!rootEl) {
    throw new Error('LaunchDarkly bootstrap: #root element not found');
  }

  createRoot(rootEl).render(
    <StrictMode>
      <LDProvider>
        <App />
      </LDProvider>
    </StrictMode>,
  );
})();

For Create React App, read the ID from process.env.REACT_APP_LAUNCHDARKLY_CLIENT_SIDE_ID instead of import.meta.env.VITE_…. For Next.js client bundles, use process.env.NEXT_PUBLIC_LAUNCHDARKLY_CLIENT_SIDE_ID in a client entry ('use client' as required).

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