projects — Claude Code skill: what it does, how to install
Guides AI agents through setting up LaunchDarkly projects: inspects your stack and provisions environments via MCP or API.
npx skills add launchdarkly/ai-tooling --skill projects -a claude-codeWhat projects does
This skill guides your agent through configuring LaunchDarkly projects across your codebase. The agent inspects your repository to detect the stack and checks how configuration files are structured. It then selects an implementation path, such as a quick single-service setup or template cloning.
For authentication, the workflow prioritizes the LaunchDarkly MCP server via OAuth. If MCP tools are unavailable, it falls back to a REST API token with projects:write scope. The skill explicitly forbids scanning .env files or system environment variables for secrets, requiring the agent to request the token directly in the chat session.
Once LaunchDarkly provisions the container with default Production and Test environments, the agent verifies the result. It checks the project via MCP or API calls and tests SDK initialization with an explicit flush() call. Without an active MCP server or an API token with write permissions, project creation fails.
What it helps with
- set up isolated LaunchDarkly project containers for services
- extract and map environment SDK keys to local configurations
- plan project structures for multi-service or multi-region setups
- verify SDK client initialization and event flushing in code
Example prompts for the agent
- Inspect this repo and set up a new LaunchDarkly project using the MCP server
- Configure LaunchDarkly project keys and environments for our microservices
- Test our LaunchDarkly SDK connection and verify the environment keys
How to install projects
1Skills CLI (Vercel)
npx skills add launchdarkly/ai-tooling --skill projects -a claude-code2Manually: put the files in place
~/.claude/skills/projects/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/projects/
1Skills CLI (Vercel)
npx skills add launchdarkly/ai-tooling --skill projects -a codex2Manually: put the files in place
.agents/skills/projects/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add launchdarkly/ai-tooling --skill projects -a cursor2Manually: put the files in place
.cursor/skills/projects/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install launchdarkly/ai-tooling projects2Manually: put the files in place
.github/skills/projects/SKILL.md1Skills CLI (Vercel)
npx skills add launchdarkly/ai-tooling --skill projects -a gemini-cli2Platform CLI
gemini skills install https://github.com/launchdarkly/ai-tooling --path skills/agentcontrol/projectsManually: put the files in place
.devin/skills/projects/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add launchdarkly/ai-tooling --skill projects -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about projects
How to install projects in Claude Code?
Run npx skills add launchdarkly/ai-tooling --skill projects -a claude-code in your terminal or save the file to ~/.claude/skills/projects/SKILL.md.
What does the projects skill do?
It provides step-by-step guidance for agents to explore the codebase, select the right project architecture, create LaunchDarkly containers, and verify SDK keys.
What credentials does the skill require?
You need either a configured LaunchDarkly MCP server or an API access token with projects:write permissions. The agent does not read credentials from .env files and will prompt for the token if MCP is not available.
Source text
SKILL.md · Apache-2.0
---
name: projects
description: Guide 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.
compatibility: Requires LaunchDarkly API access token with projects:write permission or LaunchDarkly MCP server.
metadata:
author: launchdarkly
version: "0.4.0"
---
# LaunchDarkly Projects Setup
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.
## Prerequisites
**Choose one:**
- LaunchDarkly API access token with `projects:write` permission
- LaunchDarkly MCP server configured in your environment
## Core Principles
1. **Understand First**: Explore the codebase to understand the stack and patterns.
2. **Choose the Right Fit**: Select an approach that matches your architecture.
3. **Follow Conventions**: Respect existing code style and structure.
4. **Verify Integration**: Confirm the setup works: the agent performs checks and reports results.
## API Access
Prefer the LaunchDarkly MCP server tools: they authenticate via OAuth and need no token. If a step has no MCP equivalent and you must call the REST API directly, ask the user to paste an API access token for this session and substitute it for `{api_token}` in the examples below. Do not search environment variables, `.env` files, or agent/MCP config files for credentials.
See [Quick Start](references/quick-start.md) for API usage patterns.
## What Are Projects?
Projects are LaunchDarkly's top-level organizational containers that hold:
- All your configs
- Feature flags and segments
- Multiple environments (Production and Test created by default)
Think of projects as separate applications, services, or teams that need their own isolated set of configurations.
## Project Setup Workflow
### Step 1: Explore the Codebase
Before implementing anything, understand the existing architecture:
1. **Identify the tech stack:**
- What language(s)? (Python, Node.js, Go, Java, etc.)
- What framework(s)? (FastAPI, Express, Spring Boot, etc.)
- Is there an existing LaunchDarkly integration?
2. **Check environment management:**
- How are environment variables stored? (.env files, secrets manager, config files)
- Where is configuration loaded? (startup scripts, config modules)
- Are there existing LaunchDarkly SDK keys?
3. **Look for patterns:**
- Are there existing API clients or service modules?
- How is external API integration typically done?
- Is there a CLI, scripts directory, or admin tooling?
4. **Understand the use case:**
- Is this a new project being set up?
- Adding to an existing LaunchDarkly integration?
- Part of a multi-service architecture?
- Need for project cloning across regions/teams?
### Step 2: Assess the Situation
Based on your exploration, determine the right approach:
| Scenario | Recommended Path |
|----------|------------------|
| New project, no LaunchDarkly integration | **Quick Setup** - Create project and save 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 |
### Step 3: Choose Your Implementation Path
Select the reference guide that matches your stack and use case:
**By Language/Stack:**
- [Python Implementation](references/python-setup.md) - For Python applications (FastAPI, Django, Flask)
- [Node.js/TypeScript Implementation](references/nodejs-setup.md) - For Node.js/Express/NestJS applications
- [Go Implementation](references/go-setup.md) - For Go services
- [Multi-Language Setup](references/multi-language-setup.md) - For polyglot architectures
**By Use Case:**
- [Quick Start](references/quick-start.md) - Create first project and get SDK keys
- [Environment Configuration](references/env-config.md) - Save SDK keys to .env, secrets, or config
- [Project Cloning](references/project-cloning.md) - Clone projects for regions/teams
- [IaC/Automation](references/iac-automation.md) - Terraform, scripts, CI/CD integration
- [Admin Tooling](references/admin-tooling.md) - Build CLI or admin utilities
### Step 4: Implement the Integration
Follow the chosen reference guide to implement project management. Key considerations:
1. **API Authentication:**
- Store API token securely
- Follow existing secrets management patterns
- Never commit tokens to version control
2. **Project Naming:**
- Use consistent, descriptive names
- Follow existing naming conventions
- Project keys: lowercase, hyphens, start with letter
3. **SDK Key Management:**
- Extract and store SDK keys for each environment
- Use the same pattern as other secrets in your codebase
- Consider separate keys for test/staging/production
4. **Error Handling:**
- Handle existing projects gracefully (409 conflict)
- Provide clear error messages
- Don't fail silently
### Step 5: Verify the Setup
After creating the project, verify it works:
1. **Fetch to confirm it exists.** Prefer the MCP `get-project` tool over raw `curl` — it returns a typed object you can inspect directly. If you must call the REST API:
```bash
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.
2. **Test SDK integration:**
Run a quick verification to ensure the SDK key works:
```python
import ldclient
from ldclient.config import Config
ldclient.set_config(Config("{sdk_key}"))
# SDK initializes successfully
# Always flush events before closing — trailing events are at risk of being
# lost otherwise, in short-lived scripts and long-running services alike.
ldclient.get().flush()
ldclient.get().close()
```
3. **Report results:**
- ✓ Project exists and has environments
- ✓ SDK keys are present and valid
- ✓ SDK can initialize (or flag any issues)
## Project Key Best Practices
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 allowed
```
**Naming Recommendations:**
- Keep keys short but descriptive
- Use team/service/purpose as naming scheme
- Be consistent across your organization
## Common Organization Patterns
### By Team
```
platform-ai → Platform Team Agent
customer-ai → Customer Success Team Agent
internal-ai → Internal Tools Team Agent
```
### By Application/Service
```
mobile-ai → Mobile App configs
web-ai → Web App configs
api-ai → API Service configs
```
### By Region/Deployment
```
ai-us → US Region
ai-eu → Europe Region
ai-apac → Asia-Pacific Region
```
## Edge Cases
| 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 |
## What NOT to Do
- Don't create projects without understanding the use case first
- Don't commit API tokens or SDK keys to version control
- Don't use production SDK keys in test/development environments
- Don't create duplicate projects unnecessarily
- Don't skip the exploration phase
## Next Steps
After setting up projects:
1. **Create configs** - Use the `configs-create` skill
2. **Set up SDK Integration** - Use the `sdk` skill
3. **Configure Targeting** - Use the `configs-targeting` skill
## Related Skills
- `configs-create` - Create configs in projects
- `sdk` - Integrate SDK in your application
- `configs-targeting` - Configure config targeting
- `configs-variations` - Manage config variations
## References
- [Python Implementation](references/python-setup.md)
- [Node.js Implementation](references/nodejs-setup.md)
- [Go Implementation](references/go-setup.md)
- [Quick Start Guide](references/quick-start.md)
- [Environment Configuration](references/env-config.md)
- [Project Cloning](references/project-cloning.md)
- [IaC/Automation](references/iac-automation.md)
- [Admin Tooling](references/admin-tooling.md)
© launchdarkly · Apache-2.0 · launchdarkly/ai-tooling