$npx -y skills add launchdarkly/ai-tooling --skill launchdarkly-metric-chooseChoose the right metrics for a LaunchDarkly experiment, guarded rollout, or release policy. 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 what will aut
| 1 | # LaunchDarkly Metric Choose |
| 2 | |
| 3 | You're using a skill that helps users select the right metrics before setting up an experiment, guarded rollout, or release policy. Your job is to understand the feature context, surface what will auto-attach from existing project policies, inventory what's available and healthy, and produce a clear typed recommendation. |
| 4 | |
| 5 | 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. |
| 6 | |
| 7 | ## Prerequisites |
| 8 | |
| 9 | This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment. |
| 10 | |
| 11 | **Required MCP tools:** |
| 12 | - `list-metrics` — inventory available metrics with their types and event keys |
| 13 | - `list-metric-events` — check which event keys have recent activity |
| 14 | |
| 15 | **Optional MCP tools (enhance workflow):** |
| 16 | - `list-release-policies` — fetch project-level policies that configure which metrics auto-attach to guarded rollouts. Use this for the guarded rollout and release policy paths. |
| 17 | |
| 18 | ## Workflow |
| 19 | |
| 20 | ### Step 1: Identify the Context |
| 21 | |
| 22 | Ask two questions upfront: |
| 23 | |
| 24 | 1. **What is this for?** |
| 25 | - **(a) Experiment** — testing a hypothesis with a flag variant |
| 26 | - **(b) Guarded rollout** — progressively rolling out a change with automatic regression detection |
| 27 | - **(c) Release policy** — creating or editing a project-wide policy that configures default metrics for all guarded rollouts matching certain conditions |
| 28 | |
| 29 | 2. **What is the change?** |
| 30 | - Flag key (if applicable) |
| 31 | - Plain-language description: "Rolling out a new checkout flow" / "Testing a new recommendation algorithm" |
| 32 | |
| 33 | ### Step 2: Fetch Existing Configuration (Guarded Rollout and Release Policy only) |
| 34 | |
| 35 | **For experiments — skip this step.** There is no pre-existing configuration to surface. |
| 36 | |
| 37 | **For guarded rollouts and release policy work**, call `list-release-policies` first: |
| 38 | |
| 39 | ``` |
| 40 | list-release-policies(projectKey) |
| 41 | ``` |
| 42 | |
| 43 | Surface the results before making any recommendations: |
| 44 | |
| 45 | ``` |
| 46 | Your project has 2 release policies: |
| 47 | |
| 48 | Policy: "Production guardrails" (applies to: environment=production) |
| 49 | Auto-attaches to guarded rollouts: |
| 50 | ✓ api-error-rate (count, LowerThanBaseline) |
| 51 | ✓ p95-latency (value, LowerThanBaseline) |
| 52 | ✓ [Metric group] Core Platform Health (3 metrics) |
| 53 | |
| 54 | Policy: "Default" (applies to: all environments) |
| 55 | No metrics configured. |
| 56 | ``` |
| 57 | |
| 58 | This tells the user what's already covered before they choose anything additional. For a guarded rollout, these metrics will appear automatically — the recommendation is about what to add on top, not rebuild from scratch. |
| 59 | |
| 60 | If no policies exist or none have metrics configured, note that all metrics must be selected manually. |
| 61 | |
| 62 | ### Step 3: Inventory Available Metrics with Event Health |
| 63 | |
| 64 | Call `list-metrics` to see all metrics in the project, then cross-reference with `list-metric-events`. |
| 65 | |
| 66 | Organize into two groups: |
| 67 | |
| 68 | | Group | Criteria | Note | |
| 69 | |-------|----------|------| |
| 70 | | **Healthy** | Event key appears in `list-metric-events` | Safe to recommend | |
| 71 | | **At-risk** | Event key absent from `list-metric-events` | Warn: may not produce data | |
| 72 | |
| 73 | Show this inventory before recommending — it may reveal that a metric the user has in mind has no events flowing. |
| 74 | |
| 75 | ### Step 4: Recommend |
| 76 | |
| 77 | The reasoning differs meaningfully by context. |
| 78 | |
| 79 | --- |
| 80 | |
| 81 | #### (a) Experiment |
| 82 | |
| 83 | **Start with the hypothesis, not the metric list.** |
| 84 | |
| 85 | Ask the user to complete this sentence before looking at available metrics: |
| 86 | |
| 87 | > "If this change succeeds, [metric] will [increase / decrease]." |
| 88 | |
| 89 | 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. |
| 90 | |
| 91 | **Propose one primary metric.** It must: |
| 92 | - Directly measure the hypothesis |
| 93 | - Have events actively flowing |
| 94 | - Have an unambiguous success direction (`HigherThanBaseline` or `LowerThanBaseline`) |
| 95 | |
| 96 | **Propose typed secondary metrics.** Suggest at least one of each type that applies: |
| 97 | |
| 98 | | Type | Purpose | Example | |
| 99 | |------|---------|---------| |
| 100 | | **Guardrail** | Did the change break anything? | Error rate, crash rate, latency p95 | |
| 101 | | **Counter-metric** | Did A improve at the cost of B? | If primary is conversion, add support tickets or session length | |
| 102 | | **Supporting signal** | Does correlated behavior confirm the hypothesis? | If primary is signup, add onboarding step 2 completion | |
| 103 | |
| 104 | One of each type is usually the right amount. More se |