Token导航 LogoToken导航

Agent Skill · 研究检索

launchdarkly-metric-create(启动 darkly metric create)

launchdarkly-metric-create 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

launchdarkly-metric-create 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 26,066。

总安装 3,646周安装 155GitHub Stars 7下载 1,277核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:launchdarkly-metric-create(启动 darkly metric create)
来源仓库:https://github.com/launchdarkly/agent-skills
仓库路径:skills/launchdarkly-metric-create
安装命令:
npx skills add https://github.com/launchdarkly/agent-skills --skill launchdarkly-metric-create
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/launchdarkly/agent-skills --skill launchdarkly-metric-create

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

launchdarkly-metric-create 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词或任务场景快速定位候选结果时使用。适用于指标定义、数据收集和性能监控等度量体系建设场景。

通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/launchdarkly-metric-create

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/launchdarkly/agent-skills --skill launchdarkly…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

launchdarkly-metric-create 怎么安装?

在终端执行 npx skills add https://github.com/launchdarkly/agent-skills --skill launchdarkly-metric-cr…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

launchdarkly-metric-create 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

launchdarkly-metric-create 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

launchdarkly-metric-create 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

launchdarkly-metric-create 用的人多吗?

公开数据是累计安装 3,646 次,近一周安装 155 次,下载 1,277 次,GitHub 7 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

launchdarkly-metric-create 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
launchdarkly-metric-create

启动 darkly metric create · 本页

3,6467调用外部服务未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

LaunchDarkly Metric Create

You're using a skill that will guide you through creating a LaunchDarkly metric. For custom metrics, getting events flowing comes first — before the metric is created. Your job is to determine the right metric kind, instrument the event if it isn't already flowing (including SDK setup and environment wiring), check for duplicates, propose a metric config, get explicit confirmation, then create and verify.

Prerequisites

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

Required MCP tools:

  • create-metric — create the metric
  • get-metric — verify it after creation
  • get-environment — fetch the client-side SDK key when instrumenting

Optional MCP tools (enhance workflow):

  • list-metrics — check for existing metrics with the same event key and understand naming conventions
  • list-metric-events — discover which event keys have recent activity before committing to one (custom metrics only)

Two Different "Projects" — Never Confuse Them

Users work with two completely separate things that both get called "project." You must keep these distinct at all times:

What it isHow the user refers to itWhat you do with it
LaunchDarkly projectThe project inside the user's LD account where the metric will be createdUsually sounds like an environment or team name: my-app, anthony-agent-dev-5000, productionPass as projectKey to all MCP tool calls
Local codebaseThe developer's application on disk that you'll instrument with a track() callOften a folder name, repo name, or app name: checkout_proj, frontend, my-react-appUse to find and edit source files

Rules for resolving these from user input:

  • If the user says *"my application at X"* or *"my codebase"* or *"my repo"* → they mean the local codebase. X is a folder path or project name, not a LaunchDarkly key.
  • If the user says *"add it to X"* or *"in LaunchDarkly"* or *"my LD project"* → they mean the LaunchDarkly project. X is the projectKey for API calls.
  • A user can name their local codebase checkout_proj while their LaunchDarkly project is anthony-agent-dev-5000. These are unrelated.
  • Never assume the local codebase name is a LaunchDarkly project key. If you're unsure which is which, ask directly: *"Just to confirm — what's your LaunchDarkly project key? (This is different from your local app name — you can find it in the LD UI under Account Settings > Projects.)"*

When both are needed (e.g. for a custom metric with instrumentation), confirm each explicitly before proceeding.

Workflow

Step 1: Determine the Metric Kind

LaunchDarkly has three metric kinds. Choose the right one before anything else.

KindHow events are collectedRequires
customDeveloper calls ldClient.track(eventKey) in codeeventKey
pageviewFires automatically when a user visits a matching URL — no SDK call neededurls (URL match rules)
clickFires automatically when a user clicks a CSS selector on a matching URL — no SDK call neededurls + selector

Decision rules:

  • User says "track when someone views a page / visits a URL" → pageview (preferred — no instrumentation required)
  • User says "track when someone clicks a button / link" → click
  • User says "track a custom event" or references a track() call → custom

When pageview or click would work, suggest it over custom — it requires no code changes.

Step 2: Resolve the Data Source

For pageview and click metrics:

  • Ask for the URL(s) to match. Confirm the kind of URL match rule:

- substring — URL contains this string (most common) - exact — URL must match exactly - canonical — matches the canonical URL - regex — full regex pattern

  • For click metrics, also ask for the CSS selector (e.g. .checkout-btn, #submit).
  • Skip list-metric-events — these metrics don't use event keys.
  • Skip to Step 3.

For custom metrics — check events first, instrument if needed:

Call list-metric-events immediately to see which event keys are already flowing:

list-metric-events(projectKey, environmentKey?)

Case A — the event key is already in the list: Confirm the key with the user and proceed to Step 3. No instrumentation needed.

Case B — the event key is NOT in the list: The metric can't measure anything without events. Instrument the event now before creating the metric. Do not simply warn and ask whether to proceed — treat instrumentation as the default next action.

Follow the instrumentation sub-workflow below, then re-check list-metric-events to confirm events are flowing before moving to Step 3. Only skip instrumentation if the user explicitly says they want to create the metric first and wire the event up later — in that case, remind them at the end that the metric will produce no data until the event is tracked.

Step 2b: Instrument the Event (when events aren't flowing)

This sub-workflow gets a track() call into the codebase and connects the app to the right LaunchDarkly environment. Complete all steps before returning to the main workflow.

1. Find the right place in the codebase. Locate the function or handler where the event naturally occurs (e.g. a checkout submit handler, a form submission callback). Read the relevant source files to understand the existing structure before making changes.

2. Determine the event key. If the user hasn't specified one, propose a descriptive kebab-case key that matches what the code is doing (e.g. checkout-completed, signup-submitted). Confirm with the user before using it.

3. Fetch the client-side SDK key. Ask the user which environment they want to connect to (e.g. "test", "production", "staging") — just the environment name. Then call:

get-environment(projectKey, environmentKey)

Use the clientSideId from the response.

4. Write the environment file. Check whether a .env file (or equivalent — .env.local, .env.development, etc.) already exists.

  • If the file does not exist, create it.
  • If the file exists and already contains the key (e.g. VITE_LD_CLIENT_SIDE_ID), compare the stored value to the clientSideId returned by get-environment. If they differ, surface the discrepancy to the user: "Your .env already has VITE_LD_CLIENT_SIDE_ID=<old>, but get-environment returned <new> for the <env> environment. Should I update it?" Do not silently keep the old value — a mismatched client-side ID means events will be sent to the wrong project or environment.
  • If the file exists but the key is absent, add it without touching other values.

Use the variable name appropriate to the project's build tool (e.g. VITE_LD_CLIENT_SIDE_ID for Vite, REACT_APP_LD_CLIENT_SIDE_ID for CRA, NEXT_PUBLIC_LD_CLIENT_SIDE_ID for Next.js).

4b. Set the SDK base URL if the user is not on app.launchdarkly.com. The SDK defaults to app.launchdarkly.com for all traffic. If the user is on a different LaunchDarkly deployment (e.g. an internal staging environment like catamorphic, or a dedicated instance), events and flag evaluations will silently go to the wrong host.

Detect this by inspecting any _links or UI URLs in MCP API responses — if they point to a host other than app.launchdarkly.com, you are on a non-production deployment. When in doubt, ask:

"Are you connecting to app.launchdarkly.com or a different LaunchDarkly instance? (e.g. an internal or staging environment)"

If they are on a non-standard host, add three additional variables to the .env file:

VITE_LD_BASE_URL=https://<their-host>
VITE_LD_STREAM_URL=https://clientstream.<their-host-domain>
VITE_LD_EVENTS_URL=https://events.<their-host-domain>

And pass them to the SDK options at init time:

asyncWithLDProvider({
  clientSideID,
  context: { kind: 'user', anonymous: true },
  options: {
    baseUrl: import.meta.env.VITE_LD_BASE_URL,
    streamUrl: import.meta.env.VITE_LD_STREAM_URL,
    eventsUrl: import.meta.env.VITE_LD_EVENTS_URL,
  },
})

Omit the options block entirely if they are on app.launchdarkly.com — the defaults are correct and no extra config is needed.

5. Install and initialize the SDK if it isn't already present. Check package.json (or the equivalent dependency file) for an existing LD SDK. If none is found, install the right one for the project's stack:

  • React → launchdarkly-react-client-sdk
  • Browser JS → launchdarkly-js-client-sdk
  • Node.js server → @launchdarkly/node-server-sdk

Initialize the SDK at the app's entry point (e.g. wrap the React root with LDProvider, configure LDClient.init() in the server entry, etc.). Pass the client-side ID from the env file. Use an anonymous user/context as the default unless the app already manages user context.

6. Add the track() call. In the location identified in step 1, add the call immediately before or after the action completes:

  • Count / occurrence metric: ldClient.track('event-key')
  • Value metric: ldClient.track('event-key', null, numericValue)

Use optional chaining (ldClient?.track(...)) in client-side code where the client may not yet be initialized.

7. Verify events are flowing. After the instrumentation changes are made, remind the user to run the app and trigger the event at least once. Then call list-metric-events again to confirm the key appears before proceeding to metric creation.

Step 3: Check for Existing Metrics

Before creating anything, use list-metrics to scan the project:

  1. Check for duplicates. Search for metrics with the same event key, URL pattern, or similar names. Avoid creating a second metric that measures the same thing — instead, flag the existing metric and ask the user if they want to reuse it.
  2. Learn the naming convention. Are metric keys kebab-case or snake_case? Are there common tag patterns? Match what already exists.
  3. Understand the tag taxonomy. Tags like team:growth, area:checkout, or type:guardrail may already exist. Suggest relevant tags based on what the user describes.

Step 4: Propose the Metric Configuration

Before calling any API, surface a proposed configuration in plain language for the user to confirm or edit.

Determine measure type. The right choice depends on what the user is trying to learn and how they'll use the metric — in an experiment, a guarded rollout, or a release policy. Do not assume. When the event is something a user can do repeatedly (click, add to cart, view page, etc.), always ask before proposing:

"Are you trying to measure how many times this event happens in total (count), or what percentage of users triggered it at least once (occurrence)?"

Tie the question to their context:

  • Experiments — occurrence is common for conversion goals (did the treatment cause more users to do X?); count is better for engagement or volume goals (did the treatment cause more total actions?)
  • Guarded rollouts / release policies — occurrence is typical for error rate guardrails (what fraction of users hit an error?); count suits absolute volume guardrails (total error events)
  • If the user explicitly says "percent of users" or "conversion rate" → occurrence
  • If the user explicitly says "number of times" or "total events" → count

Only skip asking if the intent is unambiguous from context (e.g. "API latency" → value, "error rate" → count, "signup conversion" → occurrence).

What the user wants to measureMeasure typeMeans
Total times the event occurredcountRaw event count per analysis unit
Whether each user triggered the event at alloccurrenceConversion / binary (did it happen?)
A numeric value attached to the eventvalueLatency, revenue, score, etc.

Determine success criteria:

  • Higher is better → HigherThanBaseline (conversion rate, revenue, engagement)
  • Lower is better → LowerThanBaseline (latency, error rate, bounce rate)

Use common templates as defaults when the user's intent is clear:

User intentkindmeasure typesuccess criteriaunit
Page visit / view ratepageviewoccurrenceHigherThanBaseline—
Button / link click rateclickoccurrenceHigherThanBaseline—
API latency / page load timecustomvalue (average)LowerThanBaselinems
Signup / conversion ratecustomoccurrenceHigherThanBaseline—
Error count / ratecustomcountLowerThanBaseline—
Revenue per usercustomvalue (sum)HigherThanBaselineUSD

Present the proposed config before creating — don't silently fire the API:

Proposed metric:
  Key:              checkout-page-viewed
  Name:             Checkout Page Viewed
  Kind:             pageview (fires automatically on URL visit — no code change needed)
  URLs:             substring match on "/checkout"
  Measure type:     occurrence (did each user visit the page?)
  Success criteria: HigherThanBaseline

Proceed, or would you like to change anything?

STOP HERE. Do not call any API. Do not proceed to Step 5. Wait for the user to explicitly confirm before doing anything else. The user must respond with an approval (e.g. "yes", "looks good", "proceed") before you call create-metric. If there is any ambiguity in the proposed config — such as a choice between sum vs average, or the event key name — ask that question as part of the proposal and wait for the answer before continuing.

Step 5: Create the Metric

Only proceed once the user has explicitly confirmed the proposed config in Step 4. If you have not yet received a confirmation, go back and wait.

Once the user confirms, call create-metric. The tool handles the translation from measureType to the underlying API fields — you never need to pass isNumeric or unitAggregationType directly.

create-metric(
  projectKey,
  key,
  name,
  kind,              // "custom" | "pageview" | "click"
  eventKey?,         // only for kind="custom"
  urls?,             // only for kind="pageview" or "click": [{ kind, url }]
  selector?,         // only for kind="click": CSS selector string
  measureType,       // "count" | "occurrence" | "value"
  successCriteria,   // "HigherThanBaseline" | "LowerThanBaseline"
  valueAggregation?, // only for measureType="value": "average" (default) or "sum"
  unit?,             // display label: "ms", "USD", etc.
  description?,
  tags?
)

Step 6: Verify

Use get-metric to confirm the metric was created with the right configuration:

  1. Key and name match what was requested.
  2. kind is correct — custom, pageview, or click.
  3. measureType is correct — double-check by reading back the measureType field, not just isNumeric.
  4. eventKey / urls / selector are set to the intended values.
  5. successCriteria is correct.

Surface a summary to the user:

✓ Metric created: checkout-page-viewed
  Kind:     pageview (auto-tracked on URL visit)
  URLs:     substring "/checkout"
  Measures: occurrence (conversion rate)
  Goal:     Higher is better

View in LaunchDarkly: {_links.ui from the create-metric response}

The create-metric tool returns a _links.ui field with the correct URL for the environment being used. Always use that value — never hard-code app.launchdarkly.com.

Measure Type Reference

The create-metric tool translates measureType to the LD API fields internally. You never need to set isNumeric or unitAggregationType directly.

measureTypeisNumericunitAggregationTypeUse for
countfalsesumRaw event counts — error rate, click count
occurrencefalseaverageConversion — did the user do the thing?
value (average)trueaveragePer-user mean — average latency, average session length
value (sum)truesumPer-user total — total revenue, total items purchased

For value metrics, valueAggregation defaults to "average". Pass valueAggregation: "sum" for revenue or cumulative totals.

Important Context

  • Prefer pageview and click over custom when possible. They require no SDK instrumentation and work automatically in browser environments.
  • Event keys are case-sensitive. checkout-completed and Checkout-Completed are different events. Match the key exactly as it appears in your track() calls.
  • Custom metrics without events produce no data. A custom metric is only useful once its event key is actively being tracked in production (or the relevant environment). If you created the metric before instrumenting the event, remind the user.
  • Metric keys are immutable. Once created, a metric's key cannot be changed. Choose carefully.
  • Metrics are project-scoped. A metric created in one project is not visible in another. Make sure projectKey matches where the experiment or flag lives.
  • One primary metric per experiment. When attaching this metric to an experiment, clarify whether it's the primary metric (the one that determines success or failure) or a secondary metric (a guardrail or supporting signal). See the LaunchDarkly docs for experiment setup.

平台分布

Codex

35.83%
按下载量换算458

Claude

30.7%
按下载量换算392

Cursor

17.85%
按下载量换算228

Gemini CLI

9.74%
按下载量换算124

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills