---
name: launchdarkly-metric-choose
description: "Choose the right metrics for a LaunchDarkly experiment, guarded rollout, or environment release plan. Use when the user wants to know which metrics to use, which is the primary metric for an experiment, what guardrails to add, or which events to monitor in a rollout. Surfaces the metrics that the environment's release plans already use before making additional recommendations."
license: Apache-2.0
compatibility: Requires the remotely hosted LaunchDarkly MCP server
metadata:
  author: launchdarkly
  version: "1.1.0-experimental"
title: launchdarkly-metric-choose
canonical_url: https://skilld.dev/gh/launchdarkly/ai-tooling/launchdarkly-metric-choose
last_updated: 2026-11-18T14:03:20.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install launchdarkly/ai-tooling/launchdarkly-metric-choose`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/launchdarkly-metric-choose`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/launchdarkly/ai-tooling/launchdarkly-metric-choose) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/launchdarkly-metric-choose`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/launchdarkly-metric-choose --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/launchdarkly-metric-choose --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# LaunchDarkly Metric Choose

You're using a skill that helps users select the right metrics before setting up an experiment, guarded rollout, or environment release plan. Your job is to understand the feature context, surface the metrics that the environment's release plans already use, inventory what's available and healthy, and produce a clear typed recommendation.

This skill is advisory. It does not create metrics, attach them to experiments, or configure rollouts. For those tasks, see the related skills at the end of this document.

## Prerequisites

This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment.

**Required MCP tools:**
- `get-metrics` — inventory available metrics with their types and event keys
- `get-metric-events` — check which event keys have recent activity

**Optional MCP tools (enhance workflow):**
- `get-environment-release-plans` — fetch an environment's release plans (`projectKey`, `environmentKey`). Each plan's `progressiveRelease.metrics` are the metrics that a release with that plan is guarded by, and `default: true` marks the plan that releases use unless they name another. Use this for the guarded rollout and release plan paths.

## Workflow

### Step 1: Identify the Context

Ask two questions upfront:

1. **What is this for?**
   - **(a) Experiment** — testing a hypothesis with a flag variant
   - **(b) Guarded rollout** — progressively rolling out a change with automatic regression detection
   - **(c) Environment release plan** — creating or editing an environment's release plan, whose metrics guard every release that uses the plan

2. **What is the change?**
   - Flag key (if applicable)
   - Plain-language description: "Rolling out a new checkout flow" / "Testing a new recommendation algorithm"

### Step 2: Fetch Existing Configuration (Guarded Rollout and Release Plan only)

**For experiments — skip this step.** There is no pre-existing configuration to surface.

**For guarded rollouts and release plan work**, ask which environment the rollout or plan is for (if not stated), then call `get-environment-release-plans` first:

```
get-environment-release-plans(projectKey, environmentKey)
```

Surface the results before making any recommendations:

```
production has 2 release plans:

Plan: "Guarded rollout" (default)
  Guarded by:
    ✓ api-error-rate  (count, LowerThanBaseline, auto-rollback)
    ✓ p95-latency     (value, LowerThanBaseline, auto-rollback)

Plan: "Progressive"
  No metrics (progressive only).
```

This tells the user what's already covered before they choose anything additional. A release that uses the default plan is guarded by its metrics, so the recommendation is about what to add on top, not rebuild from scratch. A guarded rollout started by hand takes only the metrics you give it: say so, and offer the plan's metrics as the starting point.

If the environment has no release plans, or none has metrics, note that all metrics must be selected manually. An incomplete plan (migrated from a release policy) cannot start a release; say so when you name one.

### Step 3: Inventory Available Metrics with Event Health

Call `get-metrics` to see all metrics in the project, then cross-reference with `get-metric-events`.

Organize into two groups:

| Group | Criteria | Note |
|-------|----------|------|
| **Healthy** | Event key appears in `get-metric-events` | Safe to recommend |
| **At-risk** | Event key absent from `get-metric-events` | Warn: may not produce data |

Pageview and click metrics have no custom event key, so `get-metric-events` cannot vouch for them. List them separately as "not checked" rather than at-risk.

Show this inventory before recommending — it may reveal that a metric the user has in mind has no events flowing.

### Step 4: Recommend

The reasoning differs meaningfully by context.

---

#### (a) Experiment

**Start with the hypothesis, not the metric list.**

Ask the user to complete this sentence before looking at available metrics:

> "If this change succeeds, [metric] will [increase / decrease]."

The primary metric must directly measure that hypothesis — not a proxy, not a correlation. If the user can't complete the sentence, help them get there first.

**Propose one primary metric.** It must:
- Directly measure the hypothesis
- Have events actively flowing
- Have an unambiguous success direction (`HigherThanBaseline` or `LowerThanBaseline`)

**Propose typed secondary metrics.** Suggest at least one of each type that applies:

| Type | Purpose | Example |
|------|---------|---------|
| **Guardrail** | Did the change break anything? | Error rate, crash rate, latency p95 |
| **Counter-metric** | Did A improve at the cost of B? | If primary is conversion, add support tickets or session length |
| **Supporting signal** | Does correlated behavior confirm the hypothesis? | If primary is signup, add onboarding step 2 completion |

One of each type is usually the right amount. More secondary metrics add noise and interpretation burden.

---

#### (b) Guarded Rollout

Guarded rollouts are safety mechanisms, not experiments. Each metric you add is a potential automatic rollback trigger — if it regresses beyond its threshold before the rollout completes, LaunchDarkly can stop and revert the release.

**Start from what the release plan already uses.** After surfacing the release plans in Step 2, ask: "Are the default plan's metrics enough, or do you want to add more for this specific rollout?"

**When recommending additional metrics:**
- Bias toward reliability — engineering metrics (error rate, latency, crash rate) with stable, predictable baselines
- Avoid exploratory product metrics that are noisy or hard to interpret under regression analysis
- **Fewer is better.** Two or three high-signal metrics is the right size. More than five creates false positive rollback risk.
- **Only recommend metrics with events actively flowing.** An at-risk metric in a guarded rollout either produces no signal or, worse, triggers a false rollback due to data quality issues, not a real regression.

Suggested starting point for any guarded rollout (if not already covered by the release plan):
1. Error rate — are we seeing more errors in the new variation?
2. Latency / response time — is the new variation slower?
3. One domain-specific metric tied to the core user action the change affects

---

#### (c) Environment Release Plan

An environment release plan's metrics guard every release that uses the plan, and the default plan is used by most releases in that environment. This is the highest bar.

**Start from the current state.** After surfacing the environment's release plans in Step 2, ask: "Which plan are you editing, or do you want to create a new one? Which environments will use it?"

**When recommending metrics for a release plan:**
- **2–3 metrics maximum.** More than that turns the plan into a burden on every release, including ones where the metrics don't apply well.
- **Only recommend metrics with a long, stable event history.** If an event has been flowing reliably for months, it's a safe default for every release in the environment. Occasional gaps will create problems at scale.
- **Push back on additions.** If the user proposes more than 3, ask which ones they'd remove. The discipline of choosing is the point.
- **Explain scope.** A release plan belongs to one environment, so a production plan applies only to production releases. Help the user think through whether they want the same metrics in staging (where baselines may differ), which needs its own plan there.

Typical strong release plan candidates: error rate, a core conversion or engagement metric, latency.

### Step 5: Deliver the Recommendation

Output a clear, named list. Be explicit about what each metric is for and what's already covered:

```
Recommended metrics for: new checkout flow guarded rollout (environment: production)

ALREADY IN THE DEFAULT RELEASE PLAN ("Guarded rollout", production):
  ✓ api-error-rate    (count, LowerThanBaseline)
  ✓ p95-latency       (value, LowerThanBaseline)

ADDITIONAL — recommended for this rollout:
  ✓ checkout-conversion  (occurrence, HigherThanBaseline)
    → Confirms the rollout isn't degrading the core conversion the feature targets

⚠ page-load-time — no recent events. Instrument the event before including it,
  or remove it from the list to avoid a false rollback trigger.
```

Then close with next steps:
- If a metric the user needs doesn't exist → use the **metric-create** skill
- If an event isn't flowing → use the **metric-instrument** skill
- Once the list is confirmed → configure the guarded rollout or experiment (via the LaunchDarkly UI or API)

## Important Context

- **Mid-experiment metric changes require a restart.** LaunchDarkly snapshots the metric configuration when an experiment starts. Adding, removing, or changing metrics after launch requires stopping the experiment and restarting it — historical data from before the change is not comparable. Raise this immediately if the user mentions they're mid-experiment.
- **A primary metric with no events is worse than no primary metric.** The experiment produces no statistical output. Event health is a hard requirement for the primary metric.
- **CUPED and percentile analysis are incompatible.** If the experiment uses CUPED variance reduction, percentile-based metrics (e.g. p95 latency) silently degrade to mean-based analysis. Flag this if the user selects a percentile metric in a CUPED-enabled experiment.
- **Context kind mismatches cause missing data.** If the metric event is tracked with a `device` context but the experiment randomizes on `user`, the event won't be attributed correctly. Confirm that the context kind in `track()` calls matches the experiment's randomization unit.
- **Release plan metrics must match the plan's randomization unit.** Every metric in a guarded release plan must have an `analysisUnits` entry for the plan's `randomizationUnit`. If the user proposes metrics with mismatched context kinds, flag it before they try to configure the plan.

## Related Skills

- [`launchdarkly-metric-create`](../launchdarkly-metric-create/SKILL.md) — create a metric that doesn't exist yet
- [`launchdarkly-metric-instrument`](../launchdarkly-metric-instrument/SKILL.md) — add a `track()` call so events start flowing
- [`launchdarkly-release-plans`](../../release-autopilot/launchdarkly-release-plans/SKILL.md) — create or change an environment release plan and its metrics
