/grafana:dashboardsfrom grafana
Author Grafana dashboards: JSON model, panel types, standard options, thresholds, transformations, variables, annotations, and library panels. Use when creating, editing, or debugging dashboards.
Ships in grafana. 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 are JSON: panels on a 24-column grid, fed by data-source queries, shaped by client-side transformations, styled by standard options and overrides, parameterized by template variables, connected through annotations and links. Data shape drives the visualization; variables make dashboards reusable; links carry context across navigation.
promql, logsql, metricsql are sibling skills. This skill governs how queries
wire into panels, not query syntax.alerting sibling skill.
Panel-attached alert rules and the panel editor's Alert tab are integration points only.provisioning/dashboards/*.yaml belong to the provisioning sibling skill. This skill covers the JSON
those tools emit.${CLAUDE_SKILL_DIR}/references/json-model.md] Top-level fields, panel
object structure, gridPos, timepicker/templating/annotations blocks, library panel JSON shape, V2 Resource
kinds, schema versioning, direct JSON edit mechanics.${CLAUDE_SKILL_DIR}/references/panels.md] Visualization-selection rules, panel-type
catalog with type IDs, panel editor and inspector structure, library panel lifecycle, panel styles.${CLAUDE_SKILL_DIR}/references/panel-deep-dives.md] Per-panel
configuration: time-series graph styles (line width, fill opacity, gradient mode, interpolation), axis placement,
legend, tooltip, special overrides (Transform, Fill below to); stat value options, text modes, color and graph modes;
table cell types, column filtering, sorting, tooltip-from-field, footer calculations.${CLAUDE_SKILL_DIR}/references/panel-options.md] Standard options (unit, min/max, decimals,
color scheme, display name), thresholds, value mappings, field overrides, override precedence, display-name
expressions.${CLAUDE_SKILL_DIR}/references/variables.md] All variable types, syntax, format options, selection
options, multi-value interpolation, multi-property variables, chained variables, regex filtering, global built-ins,
URL sync, repeating panels/rows/tabs.${CLAUDE_SKILL_DIR}/references/transformations.md] Full catalog grouped by purpose (adding
fields, filtering, reshaping, grouping, histograms, time-series modeling), common patterns, debugging mechanics.${CLAUDE_SKILL_DIR}/references/annotations-links.md] Native annotations, annotation
queries, time regions, dashboard/panel/data links, data link variables, cross-dashboard navigation patterns.${CLAUDE_SKILL_DIR}/references/json-surgery.md] Verified jq recipes for dashboard files:
structure/panel/variable mapping, targeted mutation, extract → edit → splice, add/delete panels, row-nesting
traversal, validation, V2 element access, gcx/mcp-grafana handoff for live instances.Dashboard JSON runs thousands of lines. Never read a whole dashboard into context, and never rewrite one wholesale —
work surgically with jq. Full recipe catalog: json-surgery.md.
Map first. Build a structural picture without reading the file:
jq -r '(.panels[], .panels[].panels[]?) | [.id, .type, .title] | @tsv' dash.json
Edit surgically. Single field → targeted jq mutation on the selected path. Substantial panel work → extract the
panel to a small file, edit that, splice it back. Select panels by .id, never by title.
Validate. jq empty for syntax, then a semantic diff against the pre-edit copy
(diff <(jq -S . before) <(jq -S . after)) — it must show exactly the intended change and nothing else.
The load-bearing detail is row nesting: collapsed rows nest their panels in row.panels[], expanded rows keep them as
top-level siblings. (.panels[], .panels[].panels[]?) covers both — plain .panels[] silently misses collapsed-row
panels. For dashboards in a live Grafana instance rather than files, gcx (see provisioning) patches server-side and
the mcp-grafana MCP tools provide summary/property/patch access without full JSON.
Six top-level concerns:
uid (stable; externalize references via this), title, tags, version, schemaVersion. Never
hand-edit schemaVersion or version.time.from/time.to, timezone, refresh, timepicker (refresh intervals + quick ranges).templating.list — template variables. Array order = render order left-to-right.annotations.list — annotation queries. Built-in -- Grafana -- query is always present.panels — panel objects. Layout via gridPos (24 columns × 30px per row unit).links — dashboard-level links (top of dashboard or controls menu).Two schemas. Classic is the historical default and what grafana.com dashboards use. V2 Resource
(Kubernetes-style apiVersion: dashboard.grafana.app/v2beta1) supports advanced layouts and conditional rendering and
is the preferred format for new dashboards-as-code. See json-model.md for both schemas and the full panel object spec.
Match data shape to visualization. Grafana's auto-suggestion reads shape, not intent — don't accept it blindly.
sparkline cell type with the Time series to table transformation for per-row
trendsPanel type IDs in JSON: timeseries, stat, gauge, bargauge, barchart, histogram, heatmap, piechart,
table, logs, nodeGraph, traces, flamegraph, canvas, geomap, text, news, dashlist, alertlist,
annolist, state-timeline, status-history, candlestick, trend, xychart.
Display pipeline order:
Time → seconds, Data → bytes, Throughput → reqps). Don't
pre-scale in queries — let Grafana scale for display.Add field from calculation → Binary operation before
applying a Date & time unit. Grafana's date/time formats expect milliseconds.String unit displays all decimals when you need exact values without rounding.Classic paletteClassic palette (by series name)From thresholds (by value) or Single/Multiple continuous colors (by value)No value — set a placeholder (-, N/A, 0) so blank panels are unambiguous.Base = green, 80 = red, Mode = Absolute. Override per panel — don't ship the default unchanged.Absolute when threshold values are real-domain numbers. Percentage only when comparing to dynamic
min/max.Show thresholds explicitly (As lines, As filled regions) — default is Off.Color text or Color background.Special → Null → "N/A" to make missing data unambiguous in Stat/Table.Display name changes the rendered label only; for actual field renaming use Rename
by regex.defaults → standard options → value mappings → thresholds → overrides. Reorder in the Overrides
tab when later rules need to win.Run in listed order; each step sees the previous output. Text fields accept dashboard variables (interpolated before execution).
Filter data by values / Filter fields by name — drop unneeded data first.Convert field type / Extract fields — coerce types.Add field from calculation — derive fields.Group by / Reduce — aggregate.Organize fields by name — final naming/ordering.rate() or increase() at the query level before transformations — Reduce on raw
counters is meaningless. (Query-language concern; see promql.)Join by field on Time (Outer join, time series) aligns multiple queries before visualizing as Table or
computing cross-query expressions.Partition by values instead of N queries with different WHERE clauses.Time series to table transform for "row per entity, sparkline in the last column" tables.Variables interpolate before queries reach the data source, with data-source-specific escaping (regex for
Prometheus/InfluxDB, Lucene for Elasticsearch, glob for Graphite). Use ${var:raw} to bypass.
1m, 1h, 1d time spans. Reference as $myinterval in group-by/summarize.$varname for standalone references; ${varname} to interpolate inside a larger expression. Never use deprecated
[[varname]].Refresh: On time range change only when the variable query depends on time. Otherwise On dashboard load —
saves a refetch per range change.Custom all value is not escaped — match the data source's syntax: .+ or .* for Prometheus/Loki regex; *
for Graphite glob; (.*) for an explicit regex group.$__rate_interval for Prometheus rate() — handles the 4× scrape-interval rule automatically.${__from} / ${__to}. For ISO, use ${__from:date:iso}. For UTC, use :date or
:date:iso (other formats use browser time).${var.aws},
${var.azure}. Prefer over parallel variables for the same concept.skipUrlSync: true when the variable shouldn't be URL-overridable (sensitive values, shared dashboards).
Constants default to this.Repeat by variable to a multi-value variable. Horizontal panels can't share a row with
non-repeating panels; Vertical matches the source panel's width. Put the variable in the panel title (CPU — $host)
for clarity.Settings → Annotations. Each query has its
own toggle, color, and Show in: All panels / Selected panels / All panels except scope.-- Grafana -- query is always present. By default filters by dashboardId — Save As does not carry
over manual annotations. To survive duplication, tag annotations and use a tag-filtered query.Query type: Time regions;
supports Cron syntax in the Advanced toggle.Three link types, three scopes.
__url_time_range does not auto-insert ? or & — build the query string yourself.${__all_variables} appends every current template variable. Place before any explicit var-<name>=... so
explicit values override the wildcard.&var-host=${server}.__field.displayName when fields have been renamed; __field.name for the raw name.One click skips the context menu; only one data link per panel can have it enabled.Reusable panel definitions referenced by libraryPanel: { uid, name } instead of inline config.
More → New library panel. Source panel becomes a library-panel reference; save the
dashboard to persist.[dashboards] versions_to_keep.Settings → Versions — pick two and Compare versions for text + JSON diff.Restore creates a new version with old content — old versions remain in history.When writing dashboards:
Show thresholds: As lines or As filled regions on
time-series-like panels instead of the default Off.$__rate_interval (Prometheus) and time-aware globals ($__interval, $__from, $__to) instead of hard-coded
windows.When reviewing dashboards:
promql, metricsql, logsql) govern targets[].expr contents. This skill governs
the rest of the panel.alerting governs alert rules and notification routing; panel-attached alert configuration via the panel editor's
Alert tab is the only crossover.provisioning governs file-based dashboard delivery (Terraform, Grizzly, Foundation SDK,
provisioning/dashboards/*.yaml); this skill governs the JSON those tools emit and consume.(.panels[], .panels[].panels[]?) to cover collapsed-row panels.uid is the durable handle. Externalize all cross-system references (provisioning, links, scripts) via uid,
never id or title.schemaVersion or version. Grafana manages both.rate() / increase() at the query level before transformations. Raw counters through Reduce
are meaningless.${__all_variables} before any explicit var-<name>=... in data link URLs so explicit values override.references/annotations-links.md (opens in a new tab)references/json-model.md (opens in a new tab)references/json-surgery.md (opens in a new tab)references/panel-deep-dives.md (opens in a new tab)references/panel-options.md (opens in a new tab)references/panels.md (opens in a new tab)references/transformations.md (opens in a new tab)references/variables.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub xobotyi/cc-foundry --plugin grafana7 skills in this plugin
/alertingGrafana unified alerting: rule types, evaluation lifecycle, state transitions, notification policies, contact points, silences, mute timings, recording rules, and alert/notification templates. Invoke whenever task involves any interaction with Grafana alerting — creating or editing alert rules, configuring contact points and routing, templating annotations or notifications, debugging alert state, or reviewing alerting configuration./datavizData visualization discipline for monitoring and observability dashboards: chart-type selection by data shape, encoding accuracy hierarchy (position > length > angle > area > color), pre-attentive attributes, Tufte data-ink, color theory (semantic conventions, Viridis, colorblind safety), dashboard layout and information hierarchy (F/Z-pattern, tiering), time-series conventions (baseline, interpolation, dual axes, stacking), observability frameworks (RED, USE, Four Golden Signals, SLO/SLI). Invoke whenever task involves any interaction with dashboard design quality — making a good dashboard, reviewing a visualization, picking a chart type, dashboard layout, color choices, panel arrangement, or critiquing existing observability dashboards./logsqlVictoriaLogs LogsQL query language: filters (word, phrase, prefix, regexp, range, IPv4 range, exact, stream, time), pipe operators (stats, sort, fields, format, extract, unpack_json, unpack_logfmt, math, limit, top, uniq), stats functions, log stream filtering with Prometheus-style label selectors, field extraction, and performance patterns. Invoke whenever task involves any interaction with LogsQL — writing, debugging, optimizing, or reviewing VictoriaLogs queries./metricsqlVictoriaMetrics MetricsQL query language as a PromQL superset: rollup extensions, behavioral differences from PromQL (rate/increase semantics, implicit conversions, auto-aligned subqueries), label manipulation, WITH templates, keep_metric_names modifier, multiple-or filters, and query API enhancements. Invoke whenever task involves any interaction with MetricsQL or VictoriaMetrics queries — writing, debugging, optimizing, migrating PromQL to VictoriaMetrics, or reviewing./promqlPromQL query writing: selectors, operators, vector matching, functions, aggregations, histograms, subqueries, recording rules, alerting rules, and query optimization. Invoke whenever task involves any interaction with PromQL — writing, debugging, optimizing, reviewing, or explaining Prometheus queries for dashboards, alerts, recording rules, or ad-hoc exploration./provisioningGrafana provisioning across all delivery methods: file provisioning YAML (datasources, dashboards, alerting), Kubernetes-style HTTP API, gcx CLI (replacing grafanactl), Terraform provider, Foundation SDK, Git Sync. Invoke whenever task involves any interaction with Grafana provisioning or observability-as-code — configuring datasources, managing dashboards or alerting resources as code, automating Grafana setup, choosing between IaC tools, migrating between approaches, or using the Grafana HTTP API.Other plugins' skills for the same job