
First Flag
Wire your first LaunchDarkly boolean flag, verify OFF then ON, after the SDK is already connected in onboarding.
Overview
first-flag is an agent skill for the Build phase that creates your first LaunchDarkly boolean flag and proves OFF/ON evaluation end-to-end.
Install
npx skills add https://github.com/launchdarkly/agent-skills --skill first-flagWhat is this skill?
- End-to-end ritual: default off → verify OFF → toggle on → verify ON (Steps 3–5)
- Works via LaunchDarkly MCP, REST API, or ldcli when MCP conflicts with the user’s setup
- Optional launchdarkly-flag-create skill for flag creation and repo-matched evaluation code
- Credentials only via $LAUNCHDARKLY_ACCESS_TOKEN—never inline tokens in commands
- Full fallback playbook when the optional flag-create skill is missing
- Parent onboarding Step 6 (first flag)
- Mandatory Steps 3–5: default off → verify OFF → toggle on → verify ON
Adoption & trust: 1.2k installs on skills.sh; 16 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your SDK is connected but you have not yet created a flag or proven that toggling it actually changes what users see.
Who is it for?
Indie builders or small teams mid–LaunchDarkly onboarding who already applied SDK changes and want a repeatable first-flag proof.
Skip if: Teams with no LaunchDarkly project or SDK yet—complete parent Steps 5 (SDK) and credential setup first; skip if flags are already proven in production.
When should I use this skill?
SDK is connected (LaunchDarkly parent Step 5 done) and you need Step 6 first-flag creation plus OFF/ON verification.
What do I get? / Deliverables
You have a working boolean flag, evaluation in the repo, and documented verification with default off and toggled on—ready for broader rollout or further onboarding steps.
- First boolean feature flag in the LaunchDarkly project
- In-repo evaluation code matching the stack
- Verified OFF and ON behavior notes or test output
Recommended Skills
Journey fit
Step 6 of LaunchDarkly onboarding sits after SDK install—creating flags and in-app evaluation is integration work in the build phase. Feature-flag creation, evaluation snippets, and MCP/API/ldcli setup are third-party product integrations, not generic frontend or docs work.
How it compares
Onboarding workflow for first-flag proof, not a generic feature-flag design or experimentation methodology skill.
Common Questions / FAQ
Who is first-flag for?
Solo and indie developers using Claude Code, Cursor, or similar agents to complete LaunchDarkly’s first-flag onboarding after SDK install.
When should I use first-flag?
During Build integrations when Step 6 is due; after apply/SKILL changes; whenever you need MCP, API, or ldcli paths to create a flag and verify OFF then ON.
Is first-flag safe to install?
The skill mandates env-var tokens, not pasted secrets; review the Security Audits panel on this Prism page before granting network and API access to your agent.
SKILL.md
READMESKILL.md - First Flag
# Create first feature flag The SDK is connected. Now help the user create their first feature flag and see it work end-to-end. This skill is nested under [LaunchDarkly onboarding](../SKILL.md); the parent **Step 6** is **first flag**. **Prior:** [Apply code changes](../sdk-install/apply/SKILL.md). **Optional -- Flag Create skill already installed:** If the **`launchdarkly-flag-create`** skill from [github.com/launchdarkly/ai-tooling](https://github.com/launchdarkly/ai-tooling) is available in the session (install with `npx skills add launchdarkly/ai-tooling --skill launchdarkly-flag-create -y --agent <agent>`), you may use it for **creating the flag** and **choosing evaluation code** that matches the repo. You must still complete **default off -> verify OFF -> toggle on -> verify ON** (Steps 3-5 below). **Do not** require that skill: this page stays the full fallback when it is missing or MCP-only flows conflict with the user's setup. ## Security: Credential handling **Never substitute literal token values into commands.** Use environment variable references instead: - Shell commands: `$LAUNCHDARKLY_ACCESS_TOKEN` (expanded by the shell, not visible in `ps` output) - Set the variable in your session: `export LAUNCHDARKLY_ACCESS_TOKEN=<your-token>` This prevents tokens from appearing in process lists, shell history, and screen recordings. ## Step 0: Consult SDK flag-key guidance Before creating the flag or wiring evaluation code, check the [Flag key behavior by SDK](#flag-key-behavior-by-sdk) table below. Some SDKs transform flag keys before exposing them in application code (e.g. the React SDK camelCases kebab-case keys). The flag key you create in LaunchDarkly, the SDK/framework configuration, and the key you reference in code must all align. - **If the SDK transforms keys** (e.g. React `useFlags()` camelCases `my-first-flag` → `myFirstFlag`): generate evaluation code using the **transformed** key. The flag key in LaunchDarkly stays as-is (kebab-case is conventional). - **If the SDK preserves keys as-is** (most server-side SDKs): use the exact LaunchDarkly flag key string in code. - **If the SDK supports both modes** (e.g. React allows disabling camelCase via provider options): decide which mode the project uses (check existing code or provider config), then generate code that matches. ### Flag key behavior by SDK | SDK | Key transformation | Code key for `my-first-flag` | Notes | |-----|--------------------|------------------------------|-------| | React Web (`useFlags()`) | camelCase by default | `myFirstFlag` | `reactOptions: { useCamelCaseFlagKeys: false }` on the provider disables this | | React Native (`useFlags()`) | camelCase by default | `myFirstFlag` | Same `reactOptions` override available | | Vue (`useLDFlag()`) | None (pass original key) | `'my-first-flag'` | | | JavaScript Browser | None | `'my-first-flag'` | | | Node.js Server | None | `'my-first-flag'` | | | Python Server | None | `'my-first-flag'` | | | Go Server | None | `"my-first-flag"` | | | Java Server | None | `"my-first-flag"` | | | .NET Server | None | `"my-first-flag"` | | | Ruby Server | None | `'my-first-flag'` | | | Swift/iOS | None | `"my-first-flag"` | | | Android | None | `"my-first-flag"` | | | Flutter | None | `'my-first-flag'` | | When wiring the evaluation code in Step 2 below, use the **Code key** column value, not the raw LaunchDarkly key, whenever the SDK applies a transformation. ## Step 1: Create the flag **REST / curl auth:** Use `$LAUNCHDARKLY_ACCESS_TOKEN` as the `Authorization` header value (LaunchDarkly uses the raw token, no `Bearer` prefix). The shell expands th