create-graph
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCreate graphs and dashboards
创建图表与仪表板
Prerequisites
前提条件
This skill uses the following LaunchDarkly MCP tools:
- — render a chart preview inline without saving it
preview-graph - — add a chart to an existing dashboard
create-graph - — create a new empty dashboard
create-dashboard - — list existing dashboards
list-dashboards - — get the full config of a dashboard, including its graphs
get-dashboard - — discover available metrics, attributes, and keys for a product type
get-keys
All of these tools require a (e.g. ).
projectKey"default"本Skill使用以下LaunchDarkly MCP工具:
- — 在线渲染图表预览,不保存
preview-graph - — 向现有仪表板添加图表
create-graph - — 创建新的空仪表板
create-dashboard - — 列出现有仪表板
list-dashboards - — 获取仪表板的完整配置,包括其包含的图表
get-dashboard - — 发现产品类型可用的指标、属性和键
get-keys
所有这些工具都需要(例如)。
projectKey"default"Overview
概述
You are building observability graphs. Your tools are precise — get the enum values wrong and the API rejects the call. Always use before building a query to confirm the dimension names are real.
get-keys你正在构建可观测性图表。你的工具非常精准——枚举值错误会导致API拒绝调用。构建查询前务必使用确认维度名称是真实存在的。
get-keysCapabilities
功能
- — list existing dashboards to check for duplicates or find a target
list-dashboards - — get the full config of an existing dashboard, including its graphs
get-dashboard - — create a new dashboard
create-dashboard - — render a chart preview inline
preview-graph - — add a chart to a dashboard
create-graph - — discover available metrics, attributes, and keys for a product type
get-keys
When the user's request is purely about visualizing data, stay on task — don't reach for unrelated tools.
- — 列出现有仪表板,检查重复项或找到目标仪表板
list-dashboards - — 获取现有仪表板的完整配置,包括其包含的图表
get-dashboard - — 创建新仪表板
create-dashboard - — 在线渲染图表预览
preview-graph - — 向仪表板添加图表
create-graph - — 发现产品类型可用的指标、属性和键
get-keys
当用户的请求仅涉及数据可视化时,请专注于任务——不要使用无关工具。
Workflow
工作流程
- Identify the target dashboard. If the user already has a specific dashboard in mind (by ID or name), add graphs to it directly. Otherwise, call and offer to target an existing one or create a new one with
list-dashboards.create-dashboard - Discover the data shape. Call for the relevant product type before building a query. Attribute names vary across services —
get-keysvsservice_namevsservice.name. Guessing wastes tool calls.serviceName - For ambiguous requests, ask a brief clarifying question as regular text. Example: "I found several latency-related keys. Would you like P50 or P95 latency, and should I group by service name?" Keep clarifications short — one or two questions max. For minor ambiguity (chart type preference), make a reasonable default and note your assumption.
- Preview before committing. Call first, show the user an inline preview, and confirm before calling
preview-graph. For multiple graphs, preview and confirm each one individually.create-graph - Create the graph with . Use exact enum casing from
create-graph.enums.md - Confirm what was created — provide the dashboard URL and a one-line description of what the graph shows.
- 确定目标仪表板。如果用户已有特定的仪表板(通过ID或名称),直接向其中添加图表。否则,调用,并提供选择现有仪表板或使用
list-dashboards创建新仪表板的选项。create-dashboard - 发现数据结构。构建查询前,为相关产品类型调用。不同服务的属性名称有所不同——例如
get-keys、service_name或service.name。猜测会浪费工具调用次数。serviceName - 对于模糊请求,提出简短的澄清问题,以普通文本形式发送。示例:“我找到了几个与延迟相关的键。你需要P50还是P95延迟,是否要按服务名称分组?” 澄清内容要简短——最多1-2个问题。对于轻微模糊的情况(如图表类型偏好),做出合理的默认选择并说明你的假设。
- 提交前预览。先调用,向用户展示在线预览,确认后再调用
preview-graph。对于多个图表,逐个预览并确认。create-graph - 创建图表,使用。使用
create-graph中的精确枚举大小写。enums.md - 确认创建内容——提供仪表板URL和图表内容的一行描述。
Duplicating existing graphs
复制现有图表
When asked to duplicate or copy a graph, call to retrieve the full configuration (expressions, product type, query, groupBy, display settings), then replicate those values in . Do not guess from the graph title alone — titles drift from the underlying config.
get-dashboardcreate-graph当要求复制图表时,调用检索完整配置(表达式、产品类型、查询、groupBy、显示设置),然后在中复制这些值。不要仅根据图表标题猜测——标题可能与底层配置不一致。
get-dashboardcreate-graphGuidelines
指南
- Be concise — don't narrate intermediate tool calls. Skip prefaces like "First, let me discover the keys" or "Now I'll build the chart." One short sentence at the start of the reply is enough if needed (e.g. "Building a chart of recent logs by level."); after that, just call the tools.
- Prefer multiple focused graphs over one complex graph. A dashboard with 3 clean graphs beats one graph with 5 overlapping expressions.
- Always call before building a query. Prevents silent empty results from wrong field names.
get-keys
- 保持简洁——不要叙述中间工具调用。跳过诸如“首先,让我发现可用的键”或“现在我将构建图表”之类的开场白。如果需要,回复开头用一句简短的话即可(例如“正在构建近期日志按级别分类的图表。”);之后直接调用工具。
- 优先选择多个聚焦的图表,而非一个复杂图表。包含3个简洁图表的仪表板优于包含5个重叠表达式的单个图表。
- 构建查询前务必调用。避免因字段名称错误导致的静默空结果。
get-keys
Chart-type picks
图表类型选择
- — time-series trends. Error rates over time, latency percentiles, request volume.
Line chart - (or histogram) — comparisons across a dimension. Errors by service, requests by endpoint.
Bar chart - — detailed breakdowns with multiple dimensions where a chart wouldn't convey the detail.
Table
- — 时间序列趋势。例如随时间变化的错误率、延迟百分位数、请求量。
Line chart - (或直方图)——跨维度的对比。例如按服务划分的错误数、按端点划分的请求数。
Bar chart - — 多维度的详细分解,图表无法传达这些细节。
Table
Aggregators
聚合器
- — total events (most common). Requires
Count(empty string).column="" - — unique values. Users, sessions, flag keys.
CountDistinct - ,
Avg,P50,P90,P95— latency distributions.P99 - — numeric totals (payload size, revenue).
Sum
- — 事件总数(最常用)。需要
Count(空字符串)。column="" - — 唯一值。例如用户、会话、标志键。
CountDistinct - 、
Avg、P50、P90、P95— 延迟分布。P99 - — 数值总计(例如负载大小、收入)。
Sum
Common mistakes
常见错误
- Using lowercase for
sessions. It'sproductType— PascalCase. SeeSessions.enums.md - Omitting on a
columnexpression. The API requires it; pass empty stringCount."" - Using or
count_distinct. It'sCount_distinct— PascalCase, no underscore.CountDistinct - Building a query without first and getting empty results because the attribute name was wrong.
get-keys - Using date-only format () for
2026-03-04. Needs full ISO with time:get-keys.2026-03-04T00:00:00Z
- 将写成小写的
productType。正确写法是sessions——帕斯卡命名法(PascalCase)。请查看Sessions。enums.md - 表达式中遗漏
Count。API要求必须包含该字段;传入空字符串column。"" - 使用或
count_distinct。正确写法是Count_distinct——帕斯卡命名法,无下划线。CountDistinct - 未先调用就构建查询,因属性名称错误导致空结果。
get-keys - 使用仅日期格式(
get-keys)。需要带时间的完整ISO格式:2026-03-04。2026-03-04T00:00:00Z