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.

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 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