launchdarkly avatar

Custom Metrics

This walks you through the full lifecycle of custom business metrics in LaunchDarkly: creating metric definitions via API, tracking events through the SDK, and querying results. It's built for measuring things like conversion rates, task success, user satisfaction, or revenue impact from your configs. The skill includes API key auto-detection from Claude's MCP config or environment variables, handles required fields like successCriteria and unit for numeric metrics, and gives you concrete tracking patterns for common scenarios. You'll need a LaunchDarkly API token with writer permissions. It's experimental but covers the practical stuff you'd actually need to instrument custom metrics beyond LaunchDarkly's built-in ones.

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

Install

$ npx -y skills add launchdarkly/agent-skills --skill custom-metrics --agent claude-code

Installs into .claude/skills of the current project.

Files

Custom Metrics for Configs

Full lifecycle management of custom business metrics: create metric definitions with the MCP server, track events via SDK, retrieve metric data, and manage metrics programmatically.

Prerequisites

  • LaunchDarkly AI SDK initialized (see sdk-install). The SDK reads LD_SDK_KEY from the environment.
  • The remotely hosted LaunchDarkly MCP server configured in your environment
  • A LaunchDarkly API token with the writer role, only to update or delete metrics, or for scripts that can't use MCP
  • Understanding of built-in agent metrics (see built-in-metrics)

API Access

Use the LaunchDarkly MCP server tools wherever one exists: they authenticate via OAuth and need no token. Create metrics with create-metric, check that events are arriving with get-metric-events, read definitions with get-metrics, and change or remove them with update-metric and delete-metric. For scripts that can't use MCP, ask the user to paste an API access token for this session and substitute it for {api_token} in the examples below. Do not search environment variables, .env files, or agent/MCP config files for credentials.

Metrics Lifecycle Overview

Sponsors

Details

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

More from launchdarkly/agent-skills

All 41
1launchdarkly avataronline-evalslaunchdarkly/agent-skillsonline evals1.3Kskills.sh installs
2launchdarkly avatarprojectslaunchdarkly/agent-skillsprojects1.3Kskills.sh installs
3charleswiltgen avataraxiom-securitycharleswiltgen/axiomUse when storing credentials securely, encrypting data, implementing passkeys, securing AI/agentic features against prompt injection, code signing, or managing 1.3Kskills.sh installs
4neolabhq avatardo-and-judgeneolabhq/context-engineering-kitExecute a task with sub-agent implementation and LLM-as-a-judge verification with automatic retry loop1.3Kskills.sh installs
5nvidia avatarnemoclaw-user-guidenvidia/skillsGuides human users' AI agents to the NemoClaw docs MCP server and canonical Fern documentation in Markdown form. Use when users ask how to install, configure, o1.3Kskills.sh installs
6brave avataranswersbrave/brave-search-skillsUSE FOR AI-grounded answers via OpenAI-compatible /chat/completions. Two modes: single-search (fast) or deep research (enable_research=true, thorough multi-sear1.3Kskills.sh installs