/betterstack:dashboard-builderfrom Better Stack
Guides building Better Stack dashboards: planning structure, validating queries, and adding charts incrementally. Load when asked to create or modify dashboards.
Ships in Better Stack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Dashboards only run metrics queries - never raw logs/traces queries. Log and span volumes are still available there: sum(logs_count) / sum(spans_count), grouped by any label the source extracts (level, service, logs-to-metrics labels) - see metrics-query.
Only a log field that is not extracted needs a detour: suggest Explore for one-off visualizations, or extracting it with logs-to-metrics - Docs - to chart it on a dashboard
Related skills:
dashboard-layout - Layout rules, row templates, coordinate math, planning processmetrics-query - Query syntax, merge functions, time filterschart-generation - Chart types, units, axis settingsdashboard-layout skill (it has the row templates and the six layout rules). Then:
dashboard-layout's planning process to draft the section/row structure.dashboard-layout Rules 3-6 BEFORE you add any chart. The most common plan-side violation: a w:12 chart paired with a w:6 + w:6 row above it (orphan-row + full-width, breaks Rules 3 and 4 at once). When you find a violation, propose the fix (e.g. three charts at w:4+w:4+w:4) and patch the plan (or flag it to the user) — never silently implement a layout that breaks the rules.query to verify data exists and values make senseAlways execute queries before adding charts — this is mandatory, not optional.
queryUnknown expression, no Code: 47, no function not found)?create_dashboard_chartA chart with a broken query cannot be added. If the query returns "no data found" or an error, fix the query (different aggregation, different metric, different filter) or drop the chart and tell the user about the gap. Do not add a chart whose query you have not successfully executed against real data.
Common issues:
quantilesMerge on a metric that doesn't populate value_quantiles)Unknown expression identifier -> the aggregation function doesn't exist for this source / metric — pick a different one or revisit the planIf no specific instructions provided, create a comprehensive health-check dashboard that covers the main areas available for the source:
source to understand what data is availablemetrics to discover available metrics for the platformRead references/template-variables.md (in this skill's directory) before you add a dashboard variable or a filter: it covers the variable types, how to define them with update_dashboard, which SQL operator matches each type, and a worked host-filter example.
Always use sentence case for all titles — dashboard names, section names, and chart names. Never use Title Case. Only capitalize the first word and proper nouns/acronyms (AWS, RDS, CPU, I/O, MySQL).
"CPU utilization by instance", "Query performance", "Disk I/O""CPU Utilization By Instance", "Query Performance"Never abbreviate words in titles. This is the most-violated rule — apply it even when copying from a plan, a metric name, or an upstream dashboard that uses the abbreviated form. Dashboards are for humans, not terminals.
"Average query latency", "Maximum connections", "Configuration reloads", "Average response time""Avg query latency", "Max connections", "Config reloads", "Avg response time"If the plan markdown or the metric name contains Avg / Max / Min / Util / Config / Mem / Conn / Resp / Req, expand at chart-create time — do not pass through.
Common abbreviations to avoid: avg->average, max->maximum, min->minimum, config->configuration, conn->connections, mem->memory, util->utilization, info->information, stats->statistics, perf->performance, req->requests, resp->response, err->errors, msg->messages, num->number, alloc->allocations, exec->execution, init->initialization, auth->authentication, calc->calculation, temp->temperature, env->environment, proc->process, addr->address, params->parameters, docs->documents, desc->description, dup->duplicate, recv->received, xmit->transmitted
Exception: Well-known acronyms that are more recognizable than the full form are fine: CPU, GPU, RAM, IOPS, I/O, HTTP, DNS, TCP, UDP, TLS, SSL, JVM, GC, OS, PID, TTL, URL, API, SQL, SSD, HDD, NFS, EBS, RDS, EC2, S3.
These abbreviation rules apply to tooltips too. Borderline abbreviations a first-time reader might not recognize (NIC, SDK, SLO, ADLS, ...) get expanded inline: "network interfaces" not "NICs", "client library" not "SDK". Test: if you'd hesitate to use the abbreviation in onboarding documentation, expand it.
Domain-specific acronyms (e.g. RU request units, PTU provisioned throughput units, DLQ dead-letter queue, DTU database transaction units, XTP extreme transaction processing, SNAT source NAT, RBAC) sit between the two: a customer who doesn't already work with that Azure service will not recognize them. Two acceptable resolutions, pick per-chart:
"RU consumption" → "Request units consumption". Use when the spelled-out form fits the layout and reads naturally."RU consumption"; tooltip leads with one clause defining the term ("Request units (RU) — Cosmos's normalized cost unit. 1 RU ≈ a 1 KB document read."). See the chart-generation skill's Explanation section for the rule.Never leave a domain-specific acronym in a title without one of those two — a cold customer reading the dashboard should not have to Google a term.
Never use parentheses in dashboard, section, or chart titles — for any reason (qualifiers, series counts, etc.). The chart's legend and series labels carry the meaning.
"Response time (avg + max)", "RU consumption (number_chart)", "Per-partition RU allocation (line)""Response time", "RU consumption", "Per-partition RU allocation"Never include units in titles — parenthesised OR bare. The chart's unit setting renders the suffix at display time.
"Memory available %", "Latency ms", "Throughput rps", "CPU utilization (%)", "Network throughput (bytes/s)""Memory available", "Latency", "Throughput", "CPU utilization", "Network throughput"Prefer "and" over "&" in chart and dashboard titles. Reserve & for short 2-word section titles only.
"CPU & memory", "Errors & throttling", "Disk & I/O" — & is fine"Provisioned vs consumed RU", "Capacity and compute units", "Avg and max response time" — use and"Azure Service Bus and Event Hubs" — use andNever start titles with "Per X" — use "X by Y" pattern. "Per-partition RU allocation" → "Request units allocation by partition". "Per-host throughput" → "Throughput by host". "Per-app latency" → "Latency by app". The "Per X" framing reads as developer shorthand; "X by Y" reads as natural English.
Avoid dashed compound words in titles and tooltips. Compounds like "in-memory", "high-water", "tail-latency", "per-partition", "AppLevelReconnectStorm" sound techy and read like internal jargon. Spell them out plainly or drop the term and describe functionally.
"In-memory OLTP storage utilization", "high-water reserved file size", "per-partition RU""OLTP storage utilization", "the space reserved on disk", "RU by partition"Charts showing "null" labels or "value" legends are broken — value_columns and series_column settings must agree with the SQL output. The full reference for both settings (including series_column auto-inference) is in the chart-generation skill; the notes below are the dashboard-builder-specific operational rules.
GROUP BY on a tagAlias the grouping column as series in the SQL so the chart can pick it up:
SELECT {{time}} AS time, avgMerge(value_avg) AS "CPU utilization",
label('db_instance_identifier') AS series
FROM {{source}} WHERE ... GROUP BY time, series
Then set series_column: "series" and legend: "shown_below". Without series_column, bar charts show "null" labels and line charts show "value" in the legend.
When computing error rate ratios, wrap the numerator with coalesce(..., 0) so the chart shows 0% instead of empty/null when there are no errors:
coalesce(avgMergeIf(rate_avg, condition), 0) / nullIf(avgMerge(rate_avg), 0)
These are single-aggregate ratios with no grouping column — set series_column: "" (see chart-generation).
When a chart combines multiple metrics (in/out, read/write) AND groups by an instance tag, concat both into the series label so each line is unambiguous:
-- Good: "broker-1:7071 in", "broker-1:7071 out", "broker-2:7071 in", ...
concat(label('instance'), ' ', multiIf(name = 'metric_in', 'in', 'out')) AS series
-- Bad: just "in", "out" — which instance?
multiIf(name = 'metric_in', 'in', 'out') AS series
Use this pattern for any "per-instance + per-direction" chart. Think about multi-instance deployments even if the current data has only one instance — dashboards are templates.
Rule: Any chart with series_column set MUST use legend: "shown_below". If the chart has multiple series (GROUP BY on a tag), users need the legend to identify them.
Hide the legend ONLY when ALL of these are true:
series_column (single-series only)Exception — category bar charts: A category bar chart (toplist) with series_column should use legend: "hidden" because the category labels are already shown on the axis.
See the chart-generation skill's Bar Chart Configuration — category bar charts (no {{time}}) need x_axis_type: "category" + time_column: "series".
Charts MUST be placed in semantically correct sections. Common mistakes to avoid:
When translating source dashboard groups to sections, verify each chart belongs. If the source has a chart in the wrong group, fix it — don't reproduce the mistake.
Never use pie charts for single-category data. A donut showing one slice at 100% is useless:
Default to stack for line charts. The filled-area look reads better than thin overlapping lines and adds visual weight. The exceptions are narrow.
stack. Produces a filled area under the line. Looks polished. This includes anomaly counters (Nodes not ready, Pods pending, Throttle events, Deadlocks, Failed jobs): stacking makes a non-zero value pop as a bold filled spike — exactly when you want the eye drawn — and an all-zero series correctly reads as nothing to show, i.e. healthy. A blank chart at 0 is fine; the filled spike on a non-zero value is the whole point.
dont_stack + connected (cache hit rate, a lone error-rate %, a single utilization %). A filled block under a steady ~90% ratio reads worse than a clean line, and connected bridges polling gaps rather than the sawtooth a stacked previous series gives.stack. Read+write IOPS, sent+received bytes, by-status-class (2xx/3xx/4xx/5xx), by-phase (Running/Pending/Failed), by-condition (Ready/MemoryPressure/DiskPressure), per-core CPU summing to total CPU. The stacked total is meaningful.dont_stack. Latency per service, error rate per endpoint, CPU% per VM, memory% per app — each line is one entity's measurement, not a piece of a whole. Stacking these would invent a misleading "total latency" or "total CPU%" that has no meaning.Full rules in the chart-generation skill's Handling Missing Values table. In short: non-stacked -> connected (default); stacked -> ALWAYS previous (connected breaks stacking into a sawtooth); zero only when a missing bucket truly means zero events (sparse errors, throttles) — never as the default for cloud-polled metrics (Azure / GCP / AWS / CloudWatch poll on a schedule; missing poll ≠ zero events).
0.00 anything. If a metric is sub-second, convert to milliseconds in the query (* 1000) and use unit: "ms".* 1000, unit: "ms"), others are already milliseconds (-> NO multiplication, just unit: "ms"). Always verify with query before applying * 1000.avgMerge(value_avg) returns NULL on these — see the metrics-query skill's Distribution section for the bucket_* pattern and unit conversion.unit: "e/s" (events per second), NOT unit: "shortened".decimal_places: 0 — these are integers. Use unit: "shortened" for auto-scaling.decimal_places: 1 for most values. Use 0 for counts. Never use 4.custom_unit: true when a predefined unit exists (e.g., use unit: "B_si", not unit: "bytes" with custom_unit: true; e/s, not /s). Custom units lack auto-scaling. See chart-generation skill for the full unit reference.{{time}}, label(), and {{source}} are macros that expand to raw column references (dt, tags, table name). They only work where those columns exist — i.e., directly against {{source}}. Once you wrap a subquery, the outer query can ONLY reference columns the subquery SELECTed.
Rule of thumb: After a subquery boundary ), only use column aliases from the inner SELECT. Never use macros that reference source-table columns.
-- WRONG: outer query uses {{time}} but dt doesn't exist there
SELECT {{time}} AS time, SUM(val) AS total
FROM (SELECT {{time}} AS time, label('x') AS x, maxMerge(value_max) AS val
FROM {{source}} WHERE ... GROUP BY time, x)
GROUP BY time
-- CORRECT: outer query references 'time' column from subquery
SELECT time, SUM(val) AS total
FROM (SELECT {{time}} AS time, label('x') AS x, maxMerge(value_max) AS val
FROM {{source}} WHERE ... GROUP BY time, x)
GROUP BY time
Same applies to CTEs — WITH cte AS (SELECT ... FROM {{source}}) produces named columns. The final SELECT must reference those names, not re-use macros.
unit: "percent" in Better Stack expects 0-1 input and multiplies by 100 for display. Many AWS metrics report 0-100 already. ALWAYS divide by 100 in the query when using unit: "percent":
-- WRONG: shows 4000% instead of 40%
avgMerge(value_avg) AS "CPU %" -- with unit: "percent"
-- CORRECT: shows 40%
avgMerge(value_avg) / 100 AS "CPU %" -- with unit: "percent"
If you compute a ratio (a/b), do NOT multiply by 100 when using unit: "percent". The unit does it for you.
Before adding each chart:
value_columns matches SQL alias exactlyseries_column is set AND legend: "shown_below"{{time}} -> x_axis_type: "category", time_column: "series"unit: "percent" -> values are 0-1 rangeunit: "shortened", decimal_places: 0custom_unit: true)h: 6 passed explicitly{{time}} bucketing + GROUP BY time for sparkline backdrop (exception: current-value KPIs like status/version use argMax without time bucketing)column_units set for each column, percentage_highlight_columns for 0-1 ratio columnsAfter successful generation of the dashboard, provide a concise overview and the dashboard's link from the tool result.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub betterstackhq/claude-plugin --plugin betterstack17 skills in this plugin
/chart-alertsGuide for creating and managing Better Stack chart alerts. Load when asked to set up alerting, create alerts on charts, or configure monitoring thresholds./chart-generationComplete reference for chart types, units, and settings on Better Stack dashboards. Load right before creating charts - after the queries are built with the query skills./chart-stylingBetter Stack chart styling and advanced settings reference - series colors and order, number chart coloring thresholds, heatmap color categories, gauge bounds, y-axis tuning, custom units, and the per-key settings table with cross-setting gotchas. Load when configuring how a chart looks beyond defaults, or when unsure which settings key applies to a chart type.Other plugins' skills for the same job