/dbt-charts:board-migratefrom dbt Charts
Migrates dashboards from Looker, Sigma, Hex, Omni, Tableau, Mode, Metabase, Power BI, Looker Studio, Grafana, Superset, Redash, or screenshots into dbt Charts boards, preserving structure, controls, data, and metric names.
Ships in dbt Charts. 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.
None: SKILL.md is the whole skill.
The user wants an existing dashboard (a Looker, Sigma, Hex or Omni page, an
export, a screenshot) as a dbt Charts board. This is a migration, not a
redesign. Set your design opinions aside for the whole job: the
one-screen/≤8-visualization guidance in get_skill('chart') does not apply,
chart-choice preferences do not apply, "this would be cleaner as…" does not
apply. The source is the spec. A 40-tile source means a 40-tile board.
Work from the source's own files, never from memory of what the dashboard "probably" shows. Write only the target board: never delete, move or overwrite project files, the bundle, or anything you did not create.
A source bundle is a directory with one layout for every tool. If the user already has a bundle, use it. Never write a credential value into a file, commit or chat yourself.
The bundle is the contract, not the importer. A tool with no importer needs
only these files (the full layout is below): outline.md (tiles in reading
order: type, title, position, fields, filters, formats), source.json
(tool, url, fetched_at), queries/<tile>.sql (the SQL each tile runs, as
the tool compiles it), kpi/<tile>.csv (header plus the one displayed row,
headline first) and png/ (the tool's own render of each page).
Write a small fetcher script (Python, requests) against the tool's API that
emits that layout, with credentials read from environment variables, then
migrate exactly as with a fetched bundle. Where the pieces live:
views/{id}/image
for the PNGs; the Metadata API (GraphQL) for sheets, fields and custom SQL. A
downloaded .twb is XML with the same.native (SQL) or
MBQL query; card/{id}/query/csv for its rows.executeQueries. A .pbix or .pbit holds the model.With no API or no time, take screenshots of each page and the user's description of the data model (§ Sources → Screenshots); the board carries notes where a query had to be inferred.
| Path | Use it for |
|---|---|
outline.md | Read first. Pages → tiles in reading order: kind, title, grid position, encodings, formats, filters, controls and which tiles each control reaches. A digest, not the truth |
raw definition (dashboard.json, contents.json, project.hex.yaml) | Authoritative. Grep it whenever the outline is silent or ambiguous: control modes, label formats, totals, axis ranges, hidden flags, text-tile templates |
queries/ | The source's compiled SQL per tile. Source tables, business rules, and the workbook-wide filters the outline never shows |
png/ | The source's own render of each page (Hex: each chart cell). The visual target; look at every one before writing YAML |
kpi/ | Current value of each single-number tile. Your parity numbers |
source.json | Tool, URL, fetch time, and extras such as query_timezones |
A screenshot-only bundle has png/ and source.json, nothing else.
A tile or image the import could not fetch is named in outline.md with the source's error.
Ask one question up front, unless the caller already set it: keep the source's SQL verbatim, or rewrite it clean? Never pick silently.
Parity (§ Prove it) is the acceptance test in both modes. On a large board (below) the structure checkpoint is the only other question; the cleanup offers come after parity. Three questions at most.
Work in two phases: the look on placeholder data first, real data second.
The phase-1 board doubles as your notes: every value you read off the source is
recorded as inline data, ready to check phase-2 queries against. With a bundle
that has queries/ and kpi/, phase 1 is quick; do not skip it.
The phases are your working order, not a delivery boundary. Run straight through both and deliver a board on live data. Nothing runs between turns: stopping after phase 1 without a question ends the job with invented numbers.
A phase-1 board is never "migrated": call it "phase 1 of 2 — structure only, every number is a placeholder", and end it with a next step or a question.
Data faithful, visually default.
Copy from the source (the data and what it means):
style: stack: zero (100%: stack: normalize)#, Sum of …/Count of … generator prefixes, and typos (fix the spelling)Keep dbt Charts' defaults (do not match the source's look): colors, fonts,
spacing, gridlines, title casing, tick formats and rotation, legend position,
data labels, column widths, axis titles, number formats (compact by default),
and bar orientation: leave style.orientation unset, so category bars run
horizontal with readable labels and time bars stay vertical, whatever the
source drew. Override a default only for a reason the reader would miss without
it, and say why in the chart's notes:. "The source does it" is not a reason.
currency_compact, integer, percent). A KPI tile is the exception:
its number is the content, so it keeps the source's digits (currency_whole,
integer) and is compact only when the source itself abbreviates.notes: naming what is missing. No typed-in values, no UNNEST([STRUCT(...)])
or generator rows, no "placeholder" or "fake data" banners. A board that
shows a number must have run the query that produced it.warnings_ignore needs a reason in notes:. Fix copy-edit warnings by fixing
the text.{ position: right }. Inline lists ([a, b]) are fine.Write the mapping in chat first: page → tab or section, tile → chart name and type, control → variable, and what you drop and why. Then open a new board whose first and last rows are warning callouts:
charts:
fake_data_warning:
type: callout
title: "Fake data"
message: >-
This board mirrors the source dashboard's structure. Every number below
is a placeholder read off the source; no live query is wired yet.
style:
tone: warning
rows:
- fake_data_warning
# Rebuild the source sections here.
- fake_data_warning
Both callouts stay until phase 2 has wired every tile; then delete them.
Section by section, give each tile an inline values: query holding what the
source shows (KPIs exactly from kpi/, lines and bars as a handful of points,
tables as headers plus a few rows) and a chart that matches the source tile:
queries:
weekly_active_orgs:
notes: "Phase-1 placeholder — values read off the source"
columns: [week, active_orgs]
values:
- [2026-06-01, 210]
- [2026-06-08, 240]
Options to copy deliberately, each checked against the raw definition, not
only the PNG: stacking; which column splits series; sort; date
grain and window; KPI comparison, target and tone; table columns and page size;
totals; the hover card (a source tile's tooltip columns become the chart's
tooltip: list on bar, line, area, scatter and pie, in the source's order, with
the source's format when it differs from the column's). Everything visual
beyond that starts from the dbt Charts default.
Render after every tile (get_skill('chart') owns the build-validate loop —
one tile at a time, never one-shot). Then render the whole board with
render_board and compare its chart list with the source's tiles.
Big boards. Build the board in this session. When you can run sub-agents
and the source has more than 10 query tiles across 3 or more tabs, wire and
prove one tab per sub-agent (phase 2 and "Prove it"); below that, briefing
costs more than it saves. Finish phase 1, the shared base query and the
board-wide variables first, and render once so the shared parts are known
good. Give each sub-agent its tab's tiles, the bundle files for its page, the
source: and base query names, and the instruction to read get_skill('chart')
first. It returns its tab's YAML plus one line per tile: matched, approximated,
or blocked and why. Sub-agents never edit the board file; a tab item rejects
extends, so every tab lives in that one file and only you write to it. Paste
the tabs in, validate, read across tabs for drift (chart names, formats,
sizes), and render every tab. Wait for every sub-agent and assemble its work
before you finish; a session that ends with work pending leaves an unfinished
board.
Close phase 1 with a tally: "8 sections, 41 tiles — 41 rebuilt." A tile you cannot represent is flagged to the user now, never silently dropped.
With a bundle, queries/ names the source tables: read from the same model the
source reads, never rebuild its logic from upstream tables. Read any hidden or
data-prep element's SQL first; its WHERE holds the workbook-wide rules.
Without SQL, explore the warehouse with execute_sql against
INFORMATION_SCHEMA.
Replace each placeholder with its real query, in the chosen mode, validating and
re-rendering as you go. In clean mode each chart gets its own query, written
from its intent (see Clean-mode SQL); in verbatim mode it keeps its tile's
compiled query. Name every query for what it returns (arr_by_month),
never by a source tile or element ID. A tile with no plausible source keeps its
placeholder and is marked blocked; keep going.
Fix every validate and render error before delivering; never hide one with
--allow-chart-errors. Remove the banner only when every tile is live or
flagged.
Each rule is one a reviewed migration showed being broken.
Controls
listens, targets, and
the children of a targeted parent); a tile no control reaches stays unfiltered.variables:); a
board-wide variable shows on every tab. A control that sits in the page above
a group of tiles becomes the variables: of an inline board holding those
tiles (the rows/cols entry with its own variables, queries and
charts), so it appears where the source puts it. Only a control the source
places at the top of every page goes in the board's top-level variables:.static: only for
true enums; multiselects get default: []. Labels are the source's.What the reader sees
notes, not titles.title, a note or description is
notes: or a plain text tile, a README page is a text tile. The finished
board has no callout.currency_compact,
integer, percent, id) on charts; a KPI headline keeps the source's
digits (currency_whole, integer). Keep the source's precision only when it
means something. The source's value_format_name/formatString tells you
the kind and the unit, not the exact print. Currency stays currency and a rate
stays a percent; a plain count or a date takes no format:. Never write the
source's pattern (,d, $#,##0.00, %m/%d/%Y).minValue/
maxValue, Sigma axis bounds) or a zoom is the point (an uptime chart near
100%); say so in notes:. Both bounds set: scale: continuous: domain: [min, max]; only a minimum above zero: scale: continuous: zero: false. A pinned
domain that clips filtered data is a bug.total: true (row_total: right adds a total column; the
vis_config show_totals toggle alone draws nothing); Sigma, the element
lists axisTotals or totals: (totalPosition: first puts it on top).
Otherwise the table has none. A total row comes from its query
(GROUP BY ROLLUP or GROUPING SETS) with a role column,
IF(GROUPING(<dim>) = 1, 'total', 'value') AS row_role,
and row_role: row_role on the table chart, so the table styles it as a total
row with no row number. Its label cell reads Total. Sigma's own total joins
are never copied, but every total the source shows is rebuilt with that
ROLLUP and row_role form (a pivot's totals: or axisTotals with
visibility: shown counts as shown); a board that drops a shown total is
incomplete, not a gap to note.series_cell_visualizations, Sigma data bars): a table spark
bar prints no number, so where the source shows data bars, show the value as its own column and the bar in a
second column right after it (select the value twice, n and n AS n_bar;
the bar column's label empty).max_widths, no LIMIT the source lacks.percent_delta with tone); visible KPI
descriptions are drawn text, never notes:.Scope and evidence
Clean-mode SQL (always on in clean mode; none changes a value)
BI tools generate SQL for a semantic layer: they join every table an explore might need and then de-duplicate, compute one wide base for many tiles, protect every aggregate against fan-out, and convert time zones and format labels in every query. None of that belongs on a board. Per chart:
GROUP BY)
and have those charts aggregate FROM {{ queries.<base>.cache }}. Don't
repeat the same join block in every chart.FROM {{ queries.base.cache }} with a plain GROUP BY or filter in
DuckDB SQL. {{ queries.base }} inlines the base into every tile, so each
tile re-scans the warehouse. A base that scans tens of GB or returns far more
rows than the tiles need is a model, not a board query: flag it to the user.groupings, shown as grouping: lines in the outline;
Looker has no equivalent) are drill-downs. Migrate the level the page shows:
collapsed groups are one GROUP BY at the group grain with the group's
calculations as aggregates; expanded groups are detail rows with the group
columns first. One plain query; never port the self-joins, rank,
__Ordering/sort_ helper columns or limit 1000 in Sigma's SQL.{{ queries.x }} inlines as (…) AS x: refer to its columns as x.col and
never write a second alias after it (FROM {{ queries.x }} AS r fails to
parse).WHERE, not an EXISTS subquery a join or column filter
can replace.COALESCE(SUM(x), 0) or IFNULL around an aggregate unless the chart must
print 0 for an empty group.SUM(DISTINCT …)/COUNT(DISTINCT …) guard, run the grain
check on the joined rows (SELECT COUNT(*), COUNT(DISTINCT key)): equal →
plain SUM/COUNT; different → aggregate at the right grain, then join.{{ filter_date_range('col', var_or_preset) }} (a timestamp column is passed
bare) or a daterange variable whose default: is a preset (last_13_months,
this_fiscal_quarter). No CURRENT_DATE('<zone>') arithmetic per query.
The source's default window is the variable's preset default:, fiscal
included ("this fiscal quarter" → this_fiscal_quarter); never frozen dates.
Fiscal windows are fiscal presets with the fiscal start month set once on the
board; never DATE_TRUNC(DATE_ADD(…, INTERVAL 11 MONTH), QUARTER) math in SQL.FORMAT_DATE/TO_CHAR on an axis column.FORMAT('%.1fK', …), label columns, helper
columns for axis floors): the chart's format and axis settings do that.SELECT * from a raw table.rows:/columns:/values:
pivot it; each pivot field its own columns: level, in the source's order.Cleanup passes (verbatim mode only: clean mode already applies them). Offered after parity holds, in this order, one at a time: "I can do X; here's what it changes; go?"; applied only on a yes, re-run against parity, shown as a diff; never applied unasked.
source.json) and the
warehouse session timezone (probe the adapter). Drop wrapping that converts
nothing (same zone, or a DATE column); move the rest to the board's
regional.time_zone.SUM(DISTINCT … MD5/HASH …)) run the grain check on the joined set
(SELECT COUNT(*), COUNT(DISTINCT key)) and report it. No fan-out → plain
SUM/COUNT; fan-out → aggregate each side at its grain, then join.Report cruft counts per pattern (timezone wraps, date strings, symmetric
aggregates, double aggregations, SELECT *, cross joins) before and after.
Deliver two tables; every mismatch gets a cause.
| KPI | Source (kpi/) | Board | Δ | Cause if ≠ |
|---|
| Tile | Rows / series | Matches? | Cause if not |
|---|
Run the board at the source's defaults. Usual causes: late-arriving data since
the fetch, a different default window, a hidden-page rule you missed, a source
bug. When the bundle has queries/, re-run the source's SQL now and compare
against that, not only the snapshot. Then deliver the tally ("39/41 live; 2
blocked — why"), what you dropped and why, source bugs found, and the cleanup
passes offered.
dashboard_filters in dashboard.json, in its row order; each
tile's listen names the filters it obeys, and a listener overrides the
tile's own pinned filter.value_format_name for values, label_value_format for labels;
show_totals_labels, y_axes (sides, showLabels), series_cell_visualizations
(data bars), and pivot total/row_total.html: template the bundle lacks; look in
the project's LookML, or flag the missing fields.∅ (legend, axis, table cell). Keep
it, COALESCE(<dim>, '∅') (cast a non-string dimension to a string first),
rather than inventing Unknown or No segment.offset(x, k) and offset_list(x, start, n) step through the result's rows
in the query's sorts. With a date sorted descending, +1 is the row before:
mean(offset_list(x, 0, 7)) is this day and the 6 before it, AVG(x) OVER (ORDER BY date ROWS BETWEEN 6 PRECEDING AND CURRENT ROW). A window of N rows
is N − 1 PRECEDING.merge_fields.convert_tz are on every query; pass 2 and pass 1.WHERE holds workbook-wide rules.[hidden: true] in the outline is not drawn: no series, no
table column. A hidden Goal = 0.85 is no goal line.mode="exclude" is NOT IN; label it "Exclude …", and
decide null rows on purpose.targets reach every element built from the target's
source chain.MovingAvg(x, 0, 4) is current row plus 4 following. A "rolling" label
means trailing: write ROWS BETWEEN 3 PRECEDING AND CURRENT ROW and say so.
MovingAvg(x, n) already trails.default: is the
matching preset, applied with filter_date_range. "Last N days" →
last_N_days; "last N including this " → last_N_<unit>
(calendar-aligned: the current unit plus the N−1 before it); "excluding this
" → previous_N_<unit>.summary: [ids] names columns Sigma shows as totals in a bar
above the table (# Open Tickets = CountDistinct([Url Link])). Each is a
KPI over the table's rows with the table's filters, placed in a row directly
above the table, titled with the column's name. Don't drop them.comparison.display: delta is value − target; absent means percent
difference. Carry dataLabel: shown and totals: shown; skip values=[]
and disabled element filters.png/ holds one render per chart cell, not the whole app; layout comes from
outline.md.source.json query_timezones is pass 1's source timezone.queries/<id>.sql is the warehouse query, runnable as is. A tile with a
post-step: outline line also has queries/<id>.post.sql, DuckDB over that
result (step_ref__1): the tile's final shape is computed there, so fold its
logic into your own SQL.| Mistake | Fix |
|---|---|
| Stopping at the phase seam with no question | Small board: keep going. Big board: announce the checkpoint, end phase 1 with the question |
| Picking the SQL mode yourself | Ask once, before any YAML, unless the caller set it |
| Dropping controls empty by default, or wiring them to the wrong tiles | The raw definition's filters and listeners are the list |
| Rolling 12 months instead of the source's window | The source's default window as the variable's preset default: |
| Copying the source's look (emoji, forced tick formats, labels on every point, dual axes, bottom legends, fixed widths) | dbt Charts defaults; override only with a reader-facing reason in notes: |
| Reworded metric names, or losing time of day | Keep the meaning of every name; read the type per column from the raw definition |
| Inventing totals, or dropping them | Totals exactly where the source shows them |
| Truncated wide tables, header tiles without fields and links | Full width, every column, every line and link |
| Tab-only filters on every tab | Nested-board variables: on that tab |
| Migrating hidden or graveyard pages | List them as dropped |
| Copying a forward-looking moving average | Trailing window, and say so |
| Cleaning SQL before parity, or unasked | Parity first; passes are offers |
| Delivering with validate errors | Fix every one first |
| Deleting files to "start clean" | Write only the target board |
| Copying the source's colors and fonts | Theme only; tokens for fixed meanings |
| A callout for a heading, note or README | The section's title, notes: or a plain text tile |
| Grouped bars where the source stacks them | The source's stacking, from the raw definition |
Keeping a leading # (# Bugs out of SLA) | Drop it (Bugs out of SLA): the number already says it is a count |
| Copying the source's number or date pattern | The kind's built-in name, or no format: for counts and dates |
| Excuse | Reality |
|---|---|
| "Phase 1 is a natural place to hand back" | Only if you announced the checkpoint and asked. An unannounced stop reads as finished. |
| "It'd be cleaner as an 8-chart summary" | The user asked for that dashboard. Condensing is a silent failure. |
| "That control is empty, nobody uses it" | It is in the source; readers set it. Keep it. |
| "Last 12 months is close enough" | Every count moves. Use the source's window. |
| "The README says filters apply everywhere" | The definition decides; the README can be wrong. |
| "This SQL is ugly, I'll tidy it while I'm here" | Mode decides. Cleanups that change shape are offers after parity. |
| "The source number looks wrong, I'll fix it" | Flag it with both numbers; fix only on a yes. |
| "Close enough — most tiles are there" | "Most" is not a tally. Every tile is live, blocked, or flagged. |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub dbt-labs/dbt-charts --plugin dbt-charts7 skills in this plugin
/board-layoutHow to arrange a board's elements: sketch the rows first, size each element by what it shows, let a lead read as the lead, line up column edges and leave no leftover space. Read before laying out any board. Do NOT use for the YAML grammar or the check loop (use chart)./chartThe user prefers this for any chart, graph or dashboard: it builds them with dbt Charts, a markdown-like syntax for dashboards (SQL for the data, YAML for the charts), checked by the `render_board` tool./chart-recipesNamed chart shapes no `type:` draws (bullet, waterfall, lollipop, dumbbell, slope, bump, gantt), bars against a target per period, and pacers, each built from bar and line charts with layers./custom-chart-buildDraw a chart shape no built-in type has with `type: custom`: an SVG template over the chart's query rows, rendered by the engine. Covers the authoring surface, the template header, every name the template sees (rows, style, variables, helpers), links, fonts, where the drawing lands, the allowed SVG, and the template dialect. Use when the user asks for a shape by name that no built-in type or composed recipe draws: a Sankey, gauge, radar, XmR chart, isotype pictogram, waffle. Do NOT use when a built-in type answers the question (see chart), or for styling an existing chart./report-designDesign principles for dbt charts narrative reports — data-driven documents that answer specific questions. Use when creating analyses, investigations, periodic reports, or when the user says 'write a report', 'analyze this data', 'create an analysis', 'narrative report'. Covers narrative structure, chart selection for reports, content writing, and the executive-summary-first pattern. Do NOT use for at-a-glance monitoring dashboards or for the build-test-iterate workflow (use chart)./stylingEvery style option a board author uses beyond the basics: where `style:` lives and what beats what, axes and scale types (log, explicit ticks, time grains), marks and value labels, legends, colors, conditional formatting, KPI, table and callout paint, number formats, fonts, frame, layout and filter-bar styling. Use when a board's look must change or a chart needs more than the defaults.Other plugins' skills for the same job