launchdarkly avatar

Launchdarkly Metric Instrument

This walks you through adding LaunchDarkly track() calls to measure user actions in experiments. It detects whether you're using a server-side or client-side SDK (critical because the signatures differ), finds existing patterns in your codebase to mirror, helps you place the call in the right spot, and verifies events are flowing using the LaunchDarkly MCP server. The workflow is thorough, maybe more than you need if you already know the SDK, but genuinely useful if you're instrumenting your first metric or debugging why events aren't showing up. One thing to remember is that track() calls only count in experiments when a flag evaluation happens first, so the event can be correlated to a participant.

skills.sh installs
2.3K
GitHub stars
19
last updated
Jul 14, 2026

Install

$ npx -y skills add launchdarkly/agent-skills --skill launchdarkly-metric-instrument --agent claude-code

Installs into .claude/skills of the current project.

Files

LaunchDarkly Metric Instrument

You're using a skill that will guide you through adding a track() call to a codebase so a LaunchDarkly metric can measure it. Your job is to detect the SDK in use, find the right place in code to add the call, write it correctly, and verify that events are reaching LaunchDarkly.

Prerequisites

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

Required MCP tools:

  • get-metric-events — verify events are flowing after instrumentation

Optional MCP tools (enhance workflow):

  • get-sdk-key — retrieve the server-side SDK key for the right environment when SDK initialization is needed (get-environment for a client-side ID or mobile key)

Workflow

Step 1: Detect the SDK

Before writing any code, understand the LaunchDarkly setup already in this codebase.

  1. Search for existing track() calls. This is the fastest signal:
    • Look for ldClient.track(, .track(, ld.track(
    • If any exist, they tell you the SDK type, call signature, and context pattern in one shot — mirror those exactly.

Sponsors

Details

Repository
github.com/launchdarkly/agent-skills
Category
AI & Agent Building
First seen
May 16, 2026

More from launchdarkly/agent-skills

All 41
1julianromli avatarclone-websitejulianromli/ai-skillsReverse-engineer and clone one or more websites in one shot — extracts assets, CSS, and content section-by-section and proactively dispatches parallel builder a2.3Kskills.sh installs
2ar9av avatarimpl-validatorar9av/obsidian-wikiValidate whether an implementation matches its stated goal. Use this skill when a skill or agent wants a second opinion on its own output, when the user says "c2.2Kskills.sh installs
3k-dense-ai avatarhypothesis-generationk-dense-ai/scientific-agent-skillsFormulate evidence-bounded scientific questions, candidate hypotheses, rival explanations, causal or associational claims, discriminating predictions, measureme2.2Kskills.sh installs
4vercel-labs avatarfrontend-designvercel-labs/agent-evalCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, 2.2Kskills.sh installs
5triggerdotdev avatartrigger-agentstriggerdotdev/skillsAI agent patterns with Trigger.dev - orchestration, parallelization, routing, evaluator-optimizer, and human-in-the-loop. Use when building LLM-powered tasks th2.2Kskills.sh installs
6launchdarkly avataraiconfig-online-evalslaunchdarkly/agent-skillsaiconfig online evals2.2Kskills.sh installs