Skills
Skill 22 of 56
Guide for setting up LaunchDarkly projects in your codebase.
5 minutes · 1,014 words · 21 sections
Install
npx skills add launchdarkly/ai-tooling --skill projectsnpx skills add launchdarkly/ai-tooling/plugin marketplace add launchdarkly/ai-toolingThe first command installs just this skill, by the name in its SKILL.md; the second installs the whole repository.
You’re using a skill that will guide you through setting up LaunchDarkly project management in a codebase. Your job is to explore the codebase to understand the stack and patterns, assess what approach makes sense, choose the right implementation path from the references, execute the setup, and verify it works.
projects:write permission, only if you’re building code that creates projects (scripts, IaC, admin tools)When you create or inspect a project yourself, use the LaunchDarkly MCP server tools: create-project and get-projects (with projectKey for one project and its environments). They authenticate via OAuth and need no token.
To get the server-side SDK key the app needs, call get-sdk-key with projectKey and environmentKey. get-environment returns only the client-side ID and mobile key. Do not search environment variables, .env files, or agent/MCP config files for credentials.
The reference guides call the REST API because they build code that runs without the agent.
Projects are LaunchDarkly’s top-level organizational containers that hold:
Think of projects as separate applications, services, or teams that need their own isolated set of configurations.
Before implementing anything, understand the existing architecture:
Identify the tech stack:
Check environment management:
Look for patterns:
Understand the use case:
Based on your exploration, determine the right approach:
| Scenario | Recommended Path |
|---|---|
| New project, no LaunchDarkly integration | Quick Setup - Create the project with create-project, then save its SDK keys |
| Existing LaunchDarkly usage | Add to Existing - Create new project or use existing |
| Multiple services/microservices | Multi-Project - Create projects per service |
| Multi-region or multi-tenant | Project Cloning - Clone template project |
| Infrastructure-as-Code (IaC) setup | Automated Setup - Script-based creation |
| Need project management tooling | CLI/Admin Tools - Build project management utilities |
Select the reference guide that matches your stack and use case:
By Language/Stack:
By Use Case:
Follow the chosen reference guide to implement project management. Key considerations:
API Authentication:
Project Naming:
SDK Key Management:
LD_SDK_KEY. The Python and Node.js AI SDKs read that variable and initialize on the first AI call. They don’t read LAUNCHDARKLY_SDK_KEY.Error Handling:
After creating the project, verify it works:
Fetch to confirm it exists. Call the get-projects MCP tool and check that the project has its environments. Code without MCP access can call the REST API instead:
curl -X GET "https://app.launchdarkly.com/api/v2/projects/{projectKey}?expand=environments" \
-H "Authorization: {api_token}"Do not pipe the response straight into a .environments.items[]-style jq filter. The shape of environments varies by expand parameter — sometimes it’s {items: [...]}, sometimes a bare array — and a hand-rolled filter will fail with Cannot index array with string "items". Run jq -e . first to inspect the actual shape, or use jq '.environments | if type == "object" then .items else . end' to handle both.
Test SDK integration:
Put the key in .env as LD_SDK_KEY, then initialize the AI SDK from the project directory. Python needs pip install launchdarkly-server-sdk launchdarkly-ai-server python-dotenv:
import asyncio
from dotenv import load_dotenv
from launchdarkly_ai_server import init_client, get_client, shutdown
load_dotenv()
async def main():
await init_client()
print("SDK initialized:", get_client().is_initialized())
# shutdown() flushes pending events before closing the connection.
await shutdown()
asyncio.run(main())Node.js needs npm install @launchdarkly/ai-node dotenv:
import 'dotenv/config';
import { initClient, shutdown } from '@launchdarkly/ai-node';
// Resolves once connected; throws LDTimeoutError if the key is invalid
await initClient();
console.log('SDK initialized: true');
await shutdown();A valid key prints SDK initialized: True (Python) or true (Node.js). With an invalid key, Python logs HTTP error 401 (invalid SDK key) and prints False, and Node.js throws LDTimeoutError after 10 seconds. With no key, both raise an error that asks for LD_SDK_KEY.
Report results:
Project keys must follow these rules:
✓ Good examples:
- "support-ai"
- "chat-bot-v2"
- "internal-tools"
✗ Bad examples:
- "Support_AI" # No uppercase or underscores
- "123-project" # Must start with letter
- "my.project" # No dots allowedNaming Recommendations:
platform-ai → Platform Team Agent
customer-ai → Customer Success Team Agent
internal-ai → Internal Tools Team Agentmobile-ai → Mobile App configs
web-ai → Web App configs
api-ai → API Service configsai-us → US Region
ai-eu → Europe Region
ai-apac → Asia-Pacific Region| Situation | Action |
|---|---|
| Project already exists | Check if it’s the right one; use it or create with different key |
| Need multiple projects | Create separately for each service/region/team |
| Shared configs across services | Use same project, separate by SDK context |
| Token lacks permissions | Request projects:write or use MCP server |
| Project name conflict | Keys must be unique, names can be similar |
After setting up projects:
configs-create skillsdk-install skillconfigs-targeting skillconfigs-create - Create configs in projectssdk-install - Integrate SDK in your applicationconfigs-targeting - Configure config targetingconfigs-variations - Manage config variationsGuide for setting up LaunchDarkly projects in your codebase. Helps you assess your stack, choose the right approach, and integrate project management that makes sense for your architecture.
The verbatim description from this skill’s front matter — the string an agent matches on to decide whether to load it.
skills/agentcontrol/projects/SKILL.mdmain, last pushed 7 November 2026.SKILL.md, not by matching a directory convention. 10 distinct layouts observed: skills/agentcontrol/*/SKILL.md, skills/aws-devops-agent/*/SKILL.md, skills/experiments/*/SKILL.md, skills/feature-flags/*/SKILL.md, skills/metrics/*/SKILL.md, skills/observability/*/SKILL.md, skills/onboarding/*/SKILL.md, skills/onboarding/sdk-install/*/SKILL.md, skills/*/SKILL.md, skills/release-autopilot/*/SKILL.md.h1 and no skipped levels:.claude-plugin/marketplace.json by LaunchDarkly, declaring 1 plugin. It is read for editorial metadata only — never as the skill index, which is always the repository tree./launchdarkly/ai-tooling.md, and each skill at its own .md URL.10 files · 94 KB
Everything this skill ships beside its prose. All of it is set here, as subchapters of skill 22.
Documentation the agent loads on demand, rather than up front.
Everything else published alongside the skill.