create-graph — скилл для Claude Code: графики и дашборды
Скилл собирает графики по логам, трейсам, ошибкам, сессиям, метрикам и событиям, показывает превью прямо в чате и сохраняет их на дашборд.
npx skills add launchdarkly/ai-tooling --skill create-graph -a claude-codeЧто делает create-graph
Скилл работает через удалённый MCP-сервер LaunchDarkly. Внутри шесть инструментов: preview-graph рисует график без сохранения, create-graph добавляет его на существующий дашборд, create-dashboard создаёт пустой, list-dashboards и get-dashboard показывают, что уже есть, а get-keys выдаёт доступные метрики, атрибуты и ключи для типа продукта. Всем инструментам нужен projectKey.
Порядок такой: сначала определяется целевой дашборд, потом вызывается get-keys — имена атрибутов различаются между сервисами, встречаются service_name, service.name и serviceName, и угадывание даёт пустые результаты. Дальше график рендерится через preview-graph, вы подтверждаете превью, и только затем он уходит в create-graph. Для нескольких графиков превью и подтверждение идут по одному.
Есть на что наступить. productType пишется в PascalCase: Sessions, а не sessions. У агрегатора Count обязателен параметр column, причём пустой строкой. CountDistinct — без подчёркивания. В get-keys дата нужна в полном ISO с временем, вида 2026-03-04T00:00:00Z, а не только датой. Ошибка в enum приводит к отказу API, поэтому проверка ключей до запроса — не формальность.
Какие задачи решает
- построить график ошибок по сервисам
- посмотреть превью графика до сохранения
- создать пустой дашборд под новую метрику
- скопировать существующий график вместе с его конфигом
- узнать доступные метрики и атрибуты для типа продукта
Примеры запросов агенту
- построй график ошибок по сервисам за последние сутки
- сделай превью P95 latency и покажи, прежде чем сохранять
- продублируй график с дашборда на новый
Как установить create-graph
1Через Skills CLI (Vercel)
npx skills add launchdarkly/ai-tooling --skill create-graph -a claude-code2Вручную: положить файлы
~/.claude/skills/create-graph/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/create-graph/
1Через Skills CLI (Vercel)
npx skills add launchdarkly/ai-tooling --skill create-graph -a codex2Вручную: положить файлы
.agents/skills/create-graph/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add launchdarkly/ai-tooling --skill create-graph -a cursor2Вручную: положить файлы
.cursor/skills/create-graph/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install launchdarkly/ai-tooling create-graph2Вручную: положить файлы
.github/skills/create-graph/SKILL.md1Через Skills CLI (Vercel)
npx skills add launchdarkly/ai-tooling --skill create-graph -a gemini-cli2Командой платформы
gemini skills install https://github.com/launchdarkly/ai-tooling --path skills/observability/create-graphВручную: положить файлы
.devin/skills/create-graph/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add launchdarkly/ai-tooling --skill create-graph -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о create-graph
Как установить create-graph в Claude?
Выполните npx skills add launchdarkly/ai-tooling --skill create-graph -a claude-code. Скилл встанет в ~/.claude/skills/create-graph/SKILL.md.
Что делает create-graph?
Строит графики по логам, трейсам, ошибкам, сессиям, метрикам и событиям, показывает их превью в чате и сохраняет на дашборд LaunchDarkly.
Что нужно для работы скилла?
Удалённый MCP-сервер LaunchDarkly и projectKey для каждого вызова инструментов.
Исходный текст
SKILL.md · Apache-2.0
--- name: create-graph description: "Creates observability dashboards and graphs from logs, traces, errors, sessions, metrics, and events data by previewing charts inline and saving them to a dashboard." license: Apache-2.0 compatibility: Requires the remotely hosted LaunchDarkly MCP server metadata: author: launchdarkly version: "0.1.0" --- # Create graphs and dashboards ## Prerequisites This skill uses the following LaunchDarkly MCP tools: - `preview-graph` — render a chart preview inline without saving it - `create-graph` — add a chart to an existing dashboard - `create-dashboard` — create a new empty dashboard - `list-dashboards` — list existing dashboards - `get-dashboard` — get the full config of a dashboard, including its graphs - `get-keys` — discover available metrics, attributes, and keys for a product type All of these tools require a `projectKey` (e.g. `"default"`). ## Overview You are building observability graphs. Your tools are precise — get the enum values wrong and the API rejects the call. Always use `get-keys` before building a query to confirm the dimension names are real. ## Capabilities - `list-dashboards` — list existing dashboards to check for duplicates or find a target - `get-dashboard` — get the full config of an existing dashboard, including its graphs - `create-dashboard` — create a new dashboard - `preview-graph` — render a chart preview inline - `create-graph` — add a chart to a dashboard - `get-keys` — discover available metrics, attributes, and keys for a product type When the user's request is purely about visualizing data, stay on task — don't reach for unrelated tools. ## Workflow 1. **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 `list-dashboards` and offer to target an existing one or create a new one with `create-dashboard`. 2. **Discover the data shape.** Call `get-keys` for the relevant product type before building a query. Attribute names vary across services — `service_name` vs `service.name` vs `serviceName`. Guessing wastes tool calls. 3. **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. 4. **Preview before committing.** Call `preview-graph` first, show the user an inline preview, and confirm before calling `create-graph`. For multiple graphs, preview and confirm each one individually. 5. **Create the graph** with `create-graph`. Use exact enum casing from `enums.md`. 6. **Confirm what was created** — provide the dashboard URL and a one-line description of what the graph shows. ## Duplicating existing graphs When asked to duplicate or copy a graph, call `get-dashboard` to retrieve the full configuration (expressions, product type, query, groupBy, display settings), then replicate those values in `create-graph`. Do not guess from the graph title alone — titles drift from the underlying config. ## Guidelines - **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 `get-keys` before building a query.** Prevents silent empty results from wrong field names. ## Chart-type picks - **`Line chart`** — time-series trends. Error rates over time, latency percentiles, request volume. - **`Bar chart`** (or histogram) — comparisons across a dimension. Errors by service, requests by endpoint. - **`Table`** — detailed breakdowns with multiple dimensions where a chart wouldn't convey the detail. ## Aggregators - `Count` — total events (most common). Requires `column=""` (empty string). - `CountDistinct` — unique values. Users, sessions, flag keys. - `Avg`, `P50`, `P90`, `P95`, `P99` — latency distributions. - `Sum` — numeric totals (payload size, revenue). ## Common mistakes - Using lowercase `sessions` for `productType`. It's `Sessions` — PascalCase. See `enums.md`. - Omitting `column` on a `Count` expression. The API requires it; pass empty string `""`. - Using `count_distinct` or `Count_distinct`. It's `CountDistinct` — PascalCase, no underscore. - Building a query without `get-keys` first and getting empty results because the attribute name was wrong. - Using date-only format (`2026-03-04`) for `get-keys`. Needs full ISO with time: `2026-03-04T00:00:00Z`.
© launchdarkly · Apache-2.0 · launchdarkly/ai-tooling