All skills
launchdarkly avatar

/onboarding

@45fcc25 official

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/agent-skills/onboarding

This session only. Nothing lands on disk.

referencessdksnippetsios-client-sdk.md

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

Swift / iOS — SDK detail

Why this differs from the home onboarding page: Set up iOS SDK uses a "YOUR_MOBILE_KEY" literal and a linear script. This skill keeps the same LDConfig / LDContextBuilder / LDClient.start…startWaitSeconds flow as Initialize the client, but resolves the mobile key from Xcode scheme env or Info.plist so archives are not missing the key. Substituting LDConfig(mobileKey: "YOUR_MOBILE_KEY", …) matches the docs verbatim when you only need a quick local paste.

Install the SDK: LaunchDarkly documents Swift Package Manager, CocoaPods, and Carthage (Install the SDK). Pin versions from the SDK releases page; the examples below follow the onboarding install style.

Swift Package Manager (Package.swift excerpt):

// ...
dependencies: [
    .package(url: "https://github.com/launchdarkly/ios-client-sdk.git", .upToNextMajor("9.15.0")),
    // Optional observability — iOS SDK v9.14+; see reference Install the SDK
    // .package(url: "https://github.com/launchdarkly/swift-launchdarkly-observability.git", .upToNextMajor("1.0.0")),
],
targets: [
    .target(
        name: "YOUR_TARGET",
        dependencies: ["LaunchDarkly"]
    ),
]
// ...

CocoaPods (Podfile):

use_frameworks!
target 'YourTargetName' do
  pod 'LaunchDarkly', '~> 9.15'
  # Optional — LaunchDarklyObservability, iOS SDK v9.14+
  # pod 'LaunchDarklyObservability', '~> 1.0'
end

Carthage (Cartfile):

github "launchdarkly/ios-client-sdk" ~> 9.15

Import (Import the SDK):

import LaunchDarkly
// Optional observability — iOS SDK v9.14+
// import LaunchDarklyObservability

Mobile key: Never ship a real key in source. ProcessInfo.processInfo.environment is set from the Xcode scheme for local runs; TestFlight / App Store builds need Info.plist (e.g. LaunchDarklyMobileKey) or xcconfig. Logical name: Apply: environment configuration.

Includes: Call configureLaunchDarkly() from application(_:didFinishLaunchingWithOptions:) (UIKit) or your SwiftUI startup path.

import LaunchDarkly

func configureLaunchDarkly() {
    let mobileKey: String?
    if let v = ProcessInfo.processInfo.environment["LAUNCHDARKLY_MOBILE_KEY"], !v.isEmpty {
        mobileKey = v
    } else if let v = Bundle.main.object(forInfoDictionaryKey: "LaunchDarklyMobileKey") as? String, !v.isEmpty {
        mobileKey = v
    } else {
        mobileKey = nil
    }

    guard let mobileKey else {
        print("LaunchDarkly: missing mobile key (scheme LAUNCHDARKLY_MOBILE_KEY for Xcode runs, or Info.plist LaunchDarklyMobileKey for archives).")
        return
    }

    let config = LDConfig(mobileKey: mobileKey, autoEnvAttributes: .enabled)
    // Optional observability — iOS SDK v9.14+; add package/pod and set config.plugins per
    // https://launchdarkly.com/docs/sdk/client-side/ios#initialize-the-client

    let contextBuilder = LDContextBuilder(key: "EXAMPLE_CONTEXT_KEY")
    guard case .success(let context) = contextBuilder.build() else {
        print("LaunchDarkly: could not build context")
        return
    }

    LDClient.start(config: config, context: context, startWaitSeconds: 5) { timedOut in
        if timedOut {
            print("SDK didn't initialize in 5 seconds. SDK is still running and trying to get latest flags.")
        } else {
            print("SDK successfully initialized with the latest flags")
            if let client = LDClient.get() {
                // For onboarding only — events are flushed automatically in normal use.
                client.flush()
            }
        }
    }

    print("SDK started.")
}

Source: SKILL.md on GitHub

2 warnings16d4 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill provides a guided, multi-step onboarding workflow to integrate LaunchDarkly SDKs into a project. It strictly enforces safe defaults such as isolated git branches, avoiding hardcoded secrets by guiding users on environment variable setup with explicit consent, and leverages standard tools or hosted Model Context Protocol (MCP) integrations with no hazardous behaviors identified.

  • Socket16d

    1 alert: gptAnomaly

  • Snyk16d

    Risk: LOW · No issues

  • ZeroLeaks5mo

    Scan incomplete

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

Last checked against GitHub 2 days ago.

Activeupdated last month
metadata
{
  "author": "launchdarkly",
  "version": "0.3.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/agent-skills/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.