Index of every page on this site: llms.txt
All skills
launchdarkly avatar

/onboarding

@f0ee110 official
Run it yourself

Scripted onboarding for LaunchDarkly: quiet execution, fixed sequence, SDK install, first flag with a live reveal, MCP offered afterwards. Enforces step completion before advancing and redirects drift. Use when adding LaunchDarkly, setting up or integrating feature flags in a project, SDK integration, or 'onboard me'.

Use this Skill: https://skilld.dev/gh/launchdarkly/ai-tooling/onboarding

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencessdkobservability-plugin.md

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

Observability plugin

Load this file whenever the user mentions observability, session replay, error monitoring, logs, tracing, or "the observability plugin", at any point. A typical request, appended to the onboarding prompt:

Also add the LaunchDarkly observability plugin for this stack to that client's plugins option, reusing its key. For a browser app, that's @launchdarkly/observability and @launchdarkly/session-replay with privacySetting "strict".

The request can arrive at any point:

  • In the first message or during setup: treat it as part of the SDK install. The plugin is added in the same pass as the SDK, not offered as a later step.
  • Client already initialized, onboarding still in progress (the SDK install finished earlier in this run, or the project had LaunchDarkly before onboarding): add the plugin to that existing init without redoing detect, plan, or the SDK install, and without asking for a key. Then continue onboarding as usual, including the first flag if it does not exist yet.
  • Follow-up after onboarding finished (the first flag exists), such as "Can you also add the observability plugin?": add the plugin to the existing init, confirm in one line, and stop. Do not restart onboarding, ask for a key, or create another first flag.

Rules

  1. It is a plugin on the client you already set up, not a second client. Construct the plugin and add it as an element of the LaunchDarkly client's plugins option, in the same init code the SDK install wrote (or the existing init, if LaunchDarkly was already integrated).
  2. Reuse the client's credential. The plugin uses the same client-side ID, SDK key, or mobile key as the client. Do not add a second env var, a second key, or a second credential prompt. Where a plugin constructor takes the key as an argument (Android), pass the same variable the client reads.
  3. The feature-management SDK comes first. If the project has no LaunchDarkly client yet, run the normal detect, plan, and apply flow first, then add the plugin to the init you just wrote.
  4. Scope is the dependency and the plugins entry. Pass only the constructor arguments the plugin requires (such as the key on Android, per rule 2). Do not add custom spans, log forwarding, network recording, error boundaries, sampling, or service names the user did not ask for.
  5. Session replay privacy. If the user names a privacy level, set exactly that. If session replay is requested and no level is named, use the strictest setting: privacySetting: 'strict' in the browser, all four mask options on React Native (see the table). On iOS and Android, keep the package defaults unless the user names a level.
  6. Observability packages are in-scope LaunchDarkly installs when the user asked for them. They do not need the extra approval that non-LaunchDarkly dependency changes need. If the installed SDK version is below the plugin's minimum (see the table), bumping within the same major version is fine. A major-version jump or a move to a different package name needs approval first: ask with the structured question tool, naming the version problem in one line (for example "launchdarkly-js-client-sdk 2.x can't load plugins; adding them means moving to @launchdarkly/js-client-sdk 4.x."). See Apply code changes.
  7. Do not pin plugin versions. Let the package manager resolve the current release, except where the ecosystem requires a version (Gradle, CocoaPods); use the latest published release there.
  8. Session replay goes after observability in the plugins list on every platform that has both.
  9. Read the package README before writing init code. The per-package READMEs in launchdarkly/observability-sdk (under sdk/@launchdarkly/<package>/) and the observability docs are authoritative. Take the plugin wiring from them and the client initializer from the recipe for the project's actual SDK. README examples can lag the SDKs, so do not copy a client initializer from a plugin README.

Packages and wiring

Match the row to the SDK the project actually uses (from SDK recipes). The Wiring column shows only where the plugins go; keep the rest of the existing init unchanged.

Browser

Browser apps get two packages: @launchdarkly/observability (errors, logs, traces) and @launchdarkly/session-replay (session replay). Both are default exports. There is no separate React package.

npm install @launchdarkly/observability @launchdarkly/session-replay
import Observability from '@launchdarkly/observability';
import SessionReplay from '@launchdarkly/session-replay';

const plugins = [
  new Observability(),
  new SessionReplay({ privacySetting: 'strict' }),
];

Add only the plugin(s) the user asked for. "Observability" alone means Observability; "session replay" means both, since replay builds on observability. Use privacySetting: 'strict' unless the user named another level (rule 5).

SDK in the project Where plugins goes
React, launchdarkly-react-client-sdk (v3) asyncWithLDProvider({ clientSideID, context, options: { plugins } }), same for withLDProvider
React, @launchdarkly/react-sdk (v4) createLDReactProvider(clientSideID, context, { ldOptions: { plugins } }). Under ldOptions, not at the top level of the third argument.
JavaScript, @launchdarkly/js-client-sdk (v4) createClient(clientSideID, context, { plugins })
Vue, launchdarkly-vue-client-sdk app.use(LDPlugin, { clientSideID, context, options: { plugins } })
Angular, Svelte, Preact, other browser frameworks Same as JavaScript (@launchdarkly/js-client-sdk)

If the project is on an older browser SDK that does not accept plugins (for example launchdarkly-js-client-sdk 2.x, TypeScript rejects the option, or the SDK's changelog does not list plugin support), do not upgrade on your own. Ask first, per rule 6, and keep the existing SDK if the user declines. Then continue onboarding with feature flags.

Next.js

Wire each client the onboarding installed:

  • Client components: the React client SDK, with the browser packages above.
  • Server (Route Handlers, Server Components): the Node server SDK, with @launchdarkly/observability-node (next section).

@launchdarkly/observability-next is a separate standalone package that initializes from a key without a LaunchDarkly client. It does not attach to a client's plugins option, so do not use it to satisfy a request to add the plugin to the client.

Server and mobile

Stack Package Install Wiring Minimum SDK
Node.js (server) @launchdarkly/observability-node npm install @launchdarkly/observability-node import { Observability } from '@launchdarkly/observability-node', then init(sdkKey, { plugins: [new Observability()] }) Current @launchdarkly/node-server-sdk
React Native @launchdarkly/observability-react-native npm install @launchdarkly/observability-react-native import { Observability } from '@launchdarkly/observability-react-native', then new ReactNativeLDClient(mobileKey, AutoEnvAttributes.Enabled, { plugins: [new Observability()] }) @launchdarkly/react-native-client-sdk v10
React Native session replay @launchdarkly/session-replay-react-native npm install @launchdarkly/session-replay-react-native import { createSessionReplayPlugin } from '@launchdarkly/session-replay-react-native', then add createSessionReplayPlugin() after Observability in plugins. With no privacy level named, or for "strict", pass { maskTextInputs: true, maskLabels: true, maskImages: true, maskWebViews: true }. Native module: run npx pod-install on bare React Native. React Native 0.75+
Python launchdarkly-observability pip install launchdarkly-observability from ldobserve import ObservabilityPlugin, then Config(sdk_key, plugins=[ObservabilityPlugin()]) launchdarkly-server-sdk 9.12+
Ruby launchdarkly-observability add gem 'launchdarkly-observability' to the Gemfile, then bundle install require 'launchdarkly_observability', then LaunchDarkly::Config.new(plugins: [LaunchDarklyObservability::Plugin.new]) launchdarkly-server-sdk 8.11+
Go github.com/launchdarkly/observability-sdk/go go get github.com/launchdarkly/observability-sdk/go ld.MakeCustomClient(sdkKey, ld.Config{Plugins: []ldplugins.Plugin{ldobserve.NewObservabilityPlugin()}}, timeout) with ldobserve as the import alias go-server-sdk/v7 with ldplugins
.NET (server) LaunchDarkly.Observability dotnet add package LaunchDarkly.Observability Configuration.Builder(sdkKey).Plugins(new PluginConfigurationBuilder().Add(ObservabilityPlugin.Builder(builder.Services).Build())). Build the LdClient before builder.Build(). LaunchDarkly.ServerSdk 8.10+
iOS swift-launchdarkly-observability (SPM), or pods LaunchDarklyObservability / LaunchDarklySessionReplay SPM: add https://github.com/launchdarkly/swift-launchdarkly-observability and the LaunchDarklyObservability product (plus LaunchDarklySessionReplay for replay) import LaunchDarklyObservability, then config.plugins = [Observability(options: .init())]; for replay also import LaunchDarklySessionReplay and append SessionReplay(options: .init()) iOS SDK 9.14+
Android com.launchdarkly:launchdarkly-observability-android add implementation("com.launchdarkly:launchdarkly-observability-android:<latest>") next to the client SDK .plugins(Components.plugins().setPlugins(listOf(Observability(application, mobileKey)))) on LDConfig.Builder; for replay append SessionReplay() (com.launchdarkly.observability.replay.plugin.SessionReplay) Android client SDK 5.9+

Confirm the iOS and .NET constructor options against the package README before writing them. Both packages are pre-1.0 and their option shapes change between releases.

Stacks without a plugin

Java, PHP, Rust, Erlang/Elixir, Haskell, Lua, C/C++, Apex, Electron, Node.js (client), Roku, .NET (client), Flutter, and the edge SDKs have no observability plugin covered here. Check the observability docs once. If nothing is listed for the stack, tell the user in one line that the observability plugin is not available for it yet, then continue onboarding with feature flags. Do not substitute OpenTelemetry setup or a different package.

Verify

The plugin is done when:

  • The package(s) appear in the dependency manifest and lockfile.
  • The plugins entry is in the same init call the client uses, with no new credential.
  • The project builds (same compile check as Apply code changes).

Mention it in the completion summary in one line (for example "Observability and session replay are on, with strict privacy."). Do not offer observability again in the wrap-up choice.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 alert5d4 checks · Risk SAFE
  • Gen Agent Trust Hub5d

    This skill facilitates the onboarding process for LaunchDarkly in a software project. It performs repository scans, installs necessary SDKs, and configures environment variables. While it involves package installation and shell command execution, these are directed at official LaunchDarkly resources. A low-severity finding is noted regarding the indirect prompt injection surface inherent in scanning project files.

  • Socket6d

    No alerts

  • Snyk5d

    Risk: CRITICAL · 1 issue

  • ZeroLeaks7mo

    Scan incomplete

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

Last checked against GitHub yesterday.

Activeupdated 2 weeks ago
metadata
{
  "author": "launchdarkly",
  "version": "0.4.0"
}
Other metadata
compatibility
Requires an MCP-capable coding agent and `npx` on PATH for optional skill installs. SDK keys, client-side IDs, and mobile keys are only needed when the SDK key step runs.
  • MCP
  • TypeScript
  • launchdarkly
  • feature-flags
  • sdk
  • onboarding
  • integration
  • javascript

README badge

README badge for launchdarkly/ai-tooling/onboarding

Orchestrates LaunchDarkly SDK setup in an existing codebase: creates a resumable onboarding log, explores the repo to detect the language and framework, installs companion flag-management skills, configures the LaunchDarkly MCP server, installs and initializes the SDK, and scaffolds a first feature flag. Designed for projects adding LaunchDarkly from scratch or integrating feature flags into an existing codebase.

Generated from the current SKILL.md.

Does this skill require a LaunchDarkly account upfront?
No. Steps 0–3 (log, explore, detect, install skills) run without an account. Account status is confirmed naturally during Step 4 via MCP OAuth, or surfaced at Step 5 if you need to provide SDK keys manually.
What coding agent platforms does this work with?
It requires an MCP-capable coding agent (like Cursor or Claude Code). Task tracking uses your agent's native tool if available (TodoWrite in Cursor, TaskCreate in Claude Code), or falls back to an in-chat checklist.
Do I need SDK keys or API tokens before starting?
No. The skill defers credential collection until the step that actually uses them — MCP uses OAuth (Step 4), and the SDK install collects keys only when wiring environment variables (Step 5).
Can I pause and resume onboarding later?
Yes. Step 0 writes a living onboarding log file (LAUNCHDARKLY_ONBOARDING.md) that tracks progress, so a new session or another agent can pick up where you left off.
What if I do not have the MCP server configured?
The skill falls back to ldcli or REST API for SDK discovery and flag creation, though MCP is preferred. Onboarding remains completable without it.

Generated from the current SKILL.md. These answers refresh after source changes.