
Launchdarkly Metric Create
Define and verify LaunchDarkly metrics so feature experiments and rollouts measure real conversions, clicks, latency, or custom events—not vanity toggles.
Overview
LaunchDarkly Metric Create is an agent skill most often used in Grow (also Ship launch, Build integrations) that instruments events and creates verified LaunchDarkly metrics for experiments and rollouts.
Install
npx skills add https://github.com/launchdarkly/agent-skills --skill launchdarkly-metric-createWhat is this skill?
- Instruments events first (SDK setup, .env, client-side key) before creating custom metrics
- Supports binary and numeric metrics: page views, clicks, conversion, latency, error rate, custom events
- Uses LaunchDarkly MCP tools: create-metric, get-metric, get-environment; optional list-metrics and list-metric-events
- Checks duplicates and naming conventions, proposes config, requires explicit confirmation, then verifies post-create
- Requires remotely hosted LaunchDarkly MCP server (Apache-2.0, v1.4.0-experimental)
- Required MCP tools: create-metric, get-metric, get-environment
- Optional MCP tools: list-metrics, list-metric-events
- Skill version 1.4.0-experimental (Apache-2.0)
Adoption & trust: 1.3k installs on skills.sh; 16 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You want to measure a rollout or experiment in LaunchDarkly but events are not flowing yet and you are unsure which metric type or event key to register without duplicating existing metrics.
Who is it for?
Solo builders using LaunchDarkly MCP who need a disciplined instrument-then-create path for conversion, click, latency, or custom event metrics.
Skip if: Teams without the LaunchDarkly MCP server configured, or anyone who only needs ad-hoc logging outside LaunchDarkly’s metric model.
When should I use this skill?
User wants to create a LaunchDarkly metric, track an event, or measure page views, clicks, conversion, latency, error rate, or any custom numeric or binary outcome for an experiment or rollout.
What do I get? / Deliverables
After confirmation, the skill creates the metric via MCP and verifies it with get-metric so experiments can target a defined, instrumented outcome.
- Instrumented event stream (when not already flowing)
- Created LaunchDarkly metric configuration
- Post-create verification via get-metric
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Canonical shelf is Grow because metrics exist to measure outcomes after you ship; that is where experiment readouts and lifecycle KPIs live in the solo-builder journey. Analytics is where you instrument events, avoid duplicate metric keys, and tie SDK traffic to measurable experiment success criteria.
Where it fits
Wire the LaunchDarkly client SDK and .env so conversion events emit before any metric definition.
Add error-rate and latency metrics right before a guarded production rollout.
Register a binary signup metric and verify it for an ongoing A/B test readout.
How it compares
Use this structured MCP workflow instead of manually clicking the LaunchDarkly UI or guessing event keys in chat without duplicate checks.
Common Questions / FAQ
Who is launchdarkly-metric-create for?
Indie and solo builders shipping feature flags who use Claude Code, Cursor, or Codex with the hosted LaunchDarkly MCP server and need experiment-ready metrics.
When should I use launchdarkly-metric-create?
Use it in Grow when defining success metrics for lifecycle experiments; in Ship when launch checks need error-rate or latency metrics; in Build when wiring SDK events before the first rollout.
Is launchdarkly-metric-create safe to install?
Review the Security Audits panel on this Prism page and treat SDK keys and .env changes as sensitive; the skill expects MCP access to your LaunchDarkly environment.
SKILL.md
READMESKILL.md - Launchdarkly Metric Create
# LaunchDarkly Metric Create You're using a skill that will guide you through creating a LaunchDarkly metric. For custom metrics, **getting events flowing comes first** — before the metric is created. Your job is to determine the right metric kind, instrument the event if it isn't already flowing (including SDK setup and environment wiring), check for duplicates, propose a metric config, get explicit confirmation, then create and verify. ## Prerequisites This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment. **Required MCP tools:** - `create-metric` — create the metric - `get-metric` — verify it after creation - `get-environment` — fetch the client-side SDK key when instrumenting **Optional MCP tools (enhance workflow):** - `list-metrics` — check for existing metrics with the same event key and understand naming conventions - `list-metric-events` — discover which event keys have recent activity before committing to one (custom metrics only) ## Two Different "Projects" — Never Confuse Them Users work with two completely separate things that both get called "project." You must keep these distinct at all times: | | What it is | How the user refers to it | What you do with it | |---|---|---|---| | **LaunchDarkly project** | The project inside the user's LD account where the metric will be created | Usually sounds like an environment or team name: `my-app`, `anthony-agent-dev-5000`, `production` | Pass as `projectKey` to all MCP tool calls | | **Local codebase** | The developer's application on disk that you'll instrument with a `track()` call | Often a folder name, repo name, or app name: `checkout_proj`, `frontend`, `my-react-app` | Use to find and edit source files | **Rules for resolving these from user input:** - If the user says *"my application at X"* or *"my codebase"* or *"my repo"* → they mean the **local codebase**. `X` is a folder path or project name, not a LaunchDarkly key. - If the user says *"add it to X"* or *"in LaunchDarkly"* or *"my LD project"* → they mean the **LaunchDarkly project**. `X` is the `projectKey` for API calls. - A user can name their local codebase `checkout_proj` while their LaunchDarkly project is `anthony-agent-dev-5000`. These are unrelated. - **Never assume the local codebase name is a LaunchDarkly project key.** If you're unsure which is which, ask directly: *"Just to confirm — what's your LaunchDarkly project key? (This is different from your local app name — you can find it in the LD UI under Account Settings > Projects.)"* When both are needed (e.g. for a custom metric with instrumentation), confirm each explicitly before proceeding. ## Workflow ### Step 1: Determine the Metric Kind LaunchDarkly has three metric kinds. **Choose the right one before anything else.** | Kind | How events are collected | Requires | |------|--------------------------|----------| | `custom` | Developer calls `ldClient.track(eventKey)` in code | `eventKey` | | `pageview` | Fires automatically when a user visits a matching URL — **no SDK call needed** | `urls` (URL match rules) | | `click` | Fires automatically when a user clicks a CSS selector on a matching URL — **no SDK call needed** | `urls` + `selector` | **Decision rules:** - User says "track when someone views a page / visits a URL" → **`pageview`** (preferred — no instrumentation required) - User says "track when someone clicks a