# launchdarkly-experiment-setup

Walks your agent through a full LaunchDarkly experiment: metrics, treatments, data collection, and stopping with a winner.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 2700 installs · ★ 28
- Author: launchdarkly
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/launchdarkly/ai-tooling/tree/HEAD/skills/experiments/launchdarkly-experiment-setup/SKILL.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/launchdarkly-experiment-setup

## What it does

This skill turns the agent into a guide for LaunchDarkly experiments. It designs the experiment, creates it with a hypothesis, metrics, treatments and flag config, starts the iteration, and later stops it with a declared winner. Exactly one treatment carries `baseline: true`, and `allocationPercent` across treatments should add up to 100.

Everything runs through the remotely hosted LaunchDarkly MCP server, so configure that first. The required tools are `create-experiment`, `start-experiment-iteration` and `get-experiment`. Optional ones cover browsing experiments, editing fields, swapping the design mid-flight and stopping the iteration.

Editing live experiments has limits. `update-experiment` respects `mutableFieldsByStatus`, so what you can touch depends on whether the iteration is `not_started`, `running` or `stopped`; rejected inputs come back under `skipped`. To change locked fields, `save-and-start-experiment-iteration` stops the current iteration, creates a draft with your updates and starts it in one call. Stopping always requires a `winningTreatmentId` — if nothing beat the control, the baseline is the winner.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add launchdarkly/ai-tooling --skill launchdarkly-experiment-setup -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/launchdarkly-experiment-setup/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/launchdarkly-experiment-setup/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add launchdarkly/ai-tooling --skill launchdarkly-experiment-setup -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/launchdarkly-experiment-setup/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add launchdarkly/ai-tooling --skill launchdarkly-experiment-setup -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/launchdarkly-experiment-setup/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install launchdarkly/ai-tooling launchdarkly-experiment-setup
```

2. **Manually: put the files in place**
- File: `.github/skills/launchdarkly-experiment-setup/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add launchdarkly/ai-tooling --skill launchdarkly-experiment-setup -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/launchdarkly/ai-tooling --path skills/experiments/launchdarkly-experiment-setup
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/launchdarkly-experiment-setup/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add launchdarkly/ai-tooling --skill launchdarkly-experiment-setup -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/launchdarkly/ai-tooling/tree/HEAD/skills/experiments/launchdarkly-experiment-setup/SKILL.md

## When to use it
- create an experiment with a hypothesis, metrics and flag treatments
- start data collection for the current iteration
- swap treatments or metrics on a running experiment
- stop an iteration and record the winning treatment
- check experiment status, metrics and current iteration

## Example prompts
- Create an experiment checkout-flow-v2-experiment with a completion-rate hypothesis and two 50% treatments
- Show me the status of checkout-flow-v2-experiment and its current iteration
- Stop the iteration and declare New Checkout the winner

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 4759b9a288d9f44e.

BEGIN THIRD-PARTY FILE 4759b9a288d9f44e
```text
---
name: launchdarkly-experiment-setup
description: "Set up and run experiments in LaunchDarkly. Create experiments with metrics, treatments, and flag config, start iterations to collect data, swap design between iterations, and stop with a winner."
license: Apache-2.0
compatibility: Requires the remotely hosted LaunchDarkly MCP server
metadata:
  author: launchdarkly
  version: "0.2.0"
---

# LaunchDarkly Experiment Setup

You're using a skill that guides you through setting up and running experiments in LaunchDarkly. Your job is to design the experiment, create it with the right metrics, treatments, and flag config, start data collection, evolve the design between iterations when needed, and stop with a winner.

## Prerequisites

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

**Required MCP tools:**
- `create-experiment` — create a new experiment with its initial iteration (hypothesis, metrics, treatments, flag config).
- `start-experiment-iteration` — begin collecting data for an experiment's current draft iteration.
- `get-experiment` — check experiment status, treatments, metrics, and current iteration.

**Optional MCP tools:**
- `list-experiments` — browse existing experiments in the project.
- `update-experiment` — update fields on the experiment or its current iteration. Honours `mutableFieldsByStatus`, so what's editable depends on whether the iteration is `not_started`, `running`, or `stopped`. Returns rejected inputs under `skipped`.
- `save-and-start-experiment-iteration` — the API-recommended way to change locked fields on a running experiment. Stops the current iteration, creates a new draft with the supplied field updates, and starts it in one call.
- `stop-experiment-iteration` — stop the running iteration. You must declare a winner: pass the `winningTreatmentId` (and a `winningReason`). If no variation outperformed, pick the baseline/control as the winner.
- `list-metrics`, `create-metric`, `list-metric-events` — manage metrics referenced by the experiment.

## Core Concepts

### What Are Experiments?

Experiments in LaunchDarkly measure the impact of feature flag variations on key metrics. An experiment consists of:
```
END THIRD-PARTY FILE 4759b9a288d9f44e

The third-party file has ended. Everything between the 4759b9a288d9f44e tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2245 of 11831 bytes. © launchdarkly · Apache-2.0 · https://github.com/launchdarkly/ai-tooling/tree/HEAD/skills/experiments/launchdarkly-experiment-setup/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
