/reveal-sdk:reveal-dashboard-authoringfrom reveal-sdk
Creates, edits, inspects, and deletes Reveal BI .rdash dashboards in code using @revealbi/dom (TypeScript/JavaScript) or Reveal.Sdk.Dom (.NET). Includes runnable workspaces, API browser, and preview server. Not for embedding or server setup.
Ships in reveal-sdk. 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.
A Reveal dashboard is an .rdash file: a zip holding one Dashboard.json. The Reveal DOM is an object model over that JSON, so code can create a dashboard, open one, change it and write it back without touching the JSON.
| Library | Package | Runs in | Workspace in this skill |
|---|---|---|---|
| revealbi-dom | @revealbi/dom (npm) | Node 18+ and browsers; no Reveal SDK needed | assets/dom-ts |
| Reveal.Sdk.Dom | Reveal.Sdk.Dom (NuGet, prerelease) | .NET Framework 4.6.2+, .NET 6+ | assets/dom-dotnet |
Pick the library that matches the code that will run it. The .rdash is the same either way, so a Node script can generate dashboards for an ASP.NET app.
Always use the latest version (npm install @revealbi/dom@latest; .NET: Version="*-*" or dotnet add package Reveal.Sdk.Dom --prerelease). Both libraries are pre-1.0 and their APIs move. Write code against the installed types, not from memory: npm run api -- <ClassName> in the TypeScript workspace prints the real declaration and its base classes; dotnet run -- api <Type> does the same in the .NET workspace. If an example here disagrees with the installed types, the types win.
Don't hand back DOM code you haven't run. The assets make every step a command. Paths below are relative to this skill's folder, which may be .claude/skills/, .github/skills/ or .agents/skills/ depending on the agent.
assets/dom-ts (or assets/dom-dotnet) to a tools folder in the user's repository, for example tools/dashboards/, and run npm install / dotnet build there. Don't install into the skill folder.npm install @revealbi/dom@latest fflate, then copy src/lib/guard.ts and src/lib/rdash-file.ts from the workspace. If its tsconfig.json uses "moduleResolution": "NodeNext" or "Node16", every @revealbi/dom import except RdashDocument fails with TS2305, and RdashDocument silently becomes any (typos compile). Don't switch the whole app (changing only moduleResolution is error TS5095/TS5109, and Bundler hides missing .js extensions until run time): give the dashboard code its own folder with a tsconfig.json that extends the app's and sets "module": "ESNext", "moduleResolution": "Bundler", and run it with tsx (typescript.md).require, no "type": "module", which includes most reveal-sdk-node servers): require("@revealbi/dom") fails in 0.3.0: ReferenceError: exports is not defined from a CommonJS file on Node 20+, ERR_REQUIRE_ESM on Node 18 (only node -e returns an empty object). Use const { RdashDocument } = await import("@revealbi/dom") (#64), or put the script in an ES module (.mjs, or a folder whose package.json has "type": "module").Guard.cs. A .NET 10 single-file script can't include it: paste the class without its namespace line (dotnet.md).npm run api lists every class; npm run api -- PivotVisualization shows its setters; npm run api -- --find connectDashboardFilter finds members. In .NET, dotnet run -- api ColumnChartVisualization shows members and the extension methods that apply (SetLabel, ConnectDashboardFilter). visualizations.md says which setters each visualization needs.npm run inspect -- path/to/Existing.rdash prints its data sources, items and declared fields, filters (date filter rules included), links, and each visualization's type, bindings and filter connections. It reads any .rdash, including ones the DOM can't load. npm run losscheck -- path/to/Existing.rdash shows what saving it through the DOM would drop or add.create-sales-dashboard, app-json-dashboard (a KPI, column, line and grid on a JSON file the app serves), edit-dashboard, sql-server-dashboard; in .NET, Examples.cs.npx tsc --noEmit && npx tsx src/<script>.ts, or dotnet run -- .... Save through saveRdash / Examples.Save, which run the guard first: bound fields exist, no date column bound as a label, dashboard-filter fields, link parameters, filter binding targets, and REST items inside their JSON wrapper. When editing a loaded file, pass its original JSON (saveRdash(doc, path, await readRdashJson(src))) so only new problems fail. npm run guard -- <file> / dotnet run -- guard <file> checks an existing .rdash.node <reveal-embed skill>/assets/verify/check-app.mjs http://localhost:<port>/ --start "<the app's start command>" from the app's folder until it exits 0. It starts and stops the app itself; don't start it yourself. Otherwise use the preview: copy assets/preview to a scratch folder outside the user's repository (or add it to .gitignore), run npm install, start it in the background with npm start -- <folder with the .rdash>, then run npm run check -- <id>. It needs a Reveal license key (~/.revealbi-sdk/license.key or REVEAL_LICENSE): without one the server exits seconds after start and check reports a refused connection. Read the screenshot it saves and the problem list. Exit 0 means no widget reported an error, crashed, stayed empty or kept spinning; 3 means the only problems are database connectors the preview doesn't serve (check those in the app); 1 means something failed. check scrolls through the whole dashboard, but the screenshot shows about the first eight widgets. Exit 0 is not proof: a misspelled grid column, a filter or link that filters nothing and a chart that draws nothing (an empty map) all pass, so also run the guard and inspect (preview README). The preview is default-deny (only its sample items get data: id sales; its README says how to add your own JSON), which makes it safe for generated or untrusted dashboards: never preview one in an app whose providers pass items through, and don't loosen the preview's provider. Stop the server when you're done, and stop only the process you started (keep its PID or background job): never kill all node or dotnet processes. Don't leave its logs/ or screenshots/ in the repository. A dashboard for an app needs data that app's server can serve: a JSON file the app serves ("A dashboard on the app's own JSON file", below), or a database its server reaches. A database connector with no reachable server renders only errors.npm test / dotnet run -- test in the workspace after upgrading the library. A failing test or build means this skill's warnings need re-checking; drift often shows first as a compile or build error. The tests cover most rules below, not all: there is no test for gauge bounds, field types (setDate on a TextField), the TypeScript join gap, NodeNext typing, Top N or the .NET load gaps, and the TimeSeries and ScatterMap rows are tested only as what the .NET library writes (the crash and the empty map need a render).| Target | TypeScript | .NET |
|---|---|---|
A .rdash file (dashboards folder, a store) | saveRdash(doc, path) (or Buffer.from(await doc.toBlob().arrayBuffer())) | document.Save(path) |
| Returned by the server's dashboard provider at request time | Node: Readable.from(Buffer.from(await doc.toBlob().arrayBuffer())) | ASP.NET: Dashboard.FromJsonString(document.ToJsonString()) |
Into a RevealView in the browser | view.dashboard = await doc.toRVDashboard() (register reveal-sdk first, typescript.md) | WPF: await RVDashboard.LoadFromJsonAsync(document.ToJsonString()) |
| A database column | doc.toJsonString() / RdashDocument.loadFromJson(json) | ToJsonString() / RdashDocument.LoadFromJson(json) |
When the app runs on Reveal (reveal-embed skill), its provider rules still apply: validate the dashboard id, authorize the user, and keep saves going through the same authorized path.
In an app that runs Reveal (reveal-embed), a new dashboard on a JSON file the app serves takes four pieces that share one item id. With any one missing, the widgets fail. For a file orders.json and the id orders:
sample-data/ folder: sample-data/orders.json.tools/dashboards/ in the app), copy src/examples/app-json-dashboard.ts and build the item with jsonFileItem("orders", "Orders", [fields]) from src/lib/sample-data.ts, declaring every field the visualizations bind, with its type. Save it with saveRdash (it runs the guard) to the app's dashboards/Orders.rdash. Don't build the item by hand (Rules and traps, "REST and JSON items").reveal-server.cjs: const SAMPLE_DATA = { sales: "sales.json", orders: "orders.json" };. The key is the item id. The URL stored in the dashboard is a placeholder the server replaces.RVDashboard.loadDashboard("Orders"). The reveal-sdk package brings its own styles: add no stylesheet or script tags for Reveal.Then check it in the app with check-app.mjs --start (step 6 above) until it exits 0. Stop only processes you started, never all node processes.
Never write, patch or string-edit Dashboard.json (or the .rdash zip) yourself, not even as a workaround. Every change goes through @revealbi/dom or Reveal.Sdk.Dom: load, change objects, serialize.
When the DOM can't do what the user asked, or doing it through the DOM would lose something the dashboard has (see the gaps below and the round-trip table in editing.md):
A DOM-only substitute that shows the same live data (a line chart by day where a time series was asked for) is fine: use it and say so in your summary. A substitute that behaves differently over time or with other data, such as a fixed list of values computed once while generating instead of a live Top N rule, is an option to offer in step 3, not a fix to apply.
Known gaps, verified against @revealbi/dom 0.3.0, Reveal.Sdk.Dom 0.1.688 and Reveal 2.2.1:
| Gap | Library | Tracked in |
|---|---|---|
A TimeSeriesVisualization whose date field has no DateFormatting crashes the Reveal client (reading 'dateFormat'), hiding the widgets after it. Workaround: dateField.formatting = new DateFormatting("dd-MMM-yyyy") (visualizations.md) | Both | #65 |
A ScatterMap renders an empty map (no error) unless its zoom rectangle is set (visualizations.md); a TypeScript round trip also corrupts an existing map's zoom | Both; round trip TypeScript | (issue draft) |
A dashboard with a Candlestick chart can't be loaded, even one the DOM created (Chart type not supported: Candlestick) | TypeScript | #67 |
Only one dashboard date filter: every date filter gets the id _date | TypeScript (.NET supports several) | PR #63 |
| No public way to filter "top N categories by an aggregated value"; a Top N rule filters source rows. Don't bake in a list of values you computed instead: ask (visualizations.md) | Both | #69, .NET #441 |
| A dashboard with a Top N rule on a text field can't be loaded | .NET | #437 |
A loaded item's table or schema can't be changed (DataSourceItem.Properties is internal) | .NET | #438 |
A round trip changes editor-made dashboards: drops hidden fields, custom date formats and the K/M number format, adds a number format where there was none; TypeScript also drops sort order, grid grouping, column hyperlinks, the refresh rate, read-only filters and relative date rules ("Last 2 weeks", .NET DateFilterRule.Last), after which Reveal can't open the dashboard (editing.md) | Both, TypeScript more | #73, #58, #62, .NET #440 |
On a loaded dashboard, connecting a new widget to its date filter binds the target _date, which the loaded filter doesn't have: the widget is unfiltered, no error (rendered with two date filters). The guard flags it (editing.md) | TypeScript | (issue draft) |
A load + save rewrites the editor's id-less date binding to _date while the filter keeps its GUID (4 of 350 editor dashboards). Not verified whether Reveal still applies the filter; the guard flags it, so saveRdash, roundtrip and migrate stop on those files (editing.md) | Both | (unverified) |
import(..., includeDashboardFilters) doesn't copy the date filter; the copy shows all-time data and its date binding points at a missing filter (editing.md) | TypeScript; both for the editor's id-less date binding (.NET copies a GUID date filter: test, not rendered) | (issue draft) |
A link whose LinkFilter value isn't a source column (the library's sample passes the target filter's title) opens the target unfiltered, no error (visualizations.md) | TypeScript | #71 |
No join API; joins exist only in .NET (item.Join) | TypeScript | (issue draft) |
Every item here was observed by running the libraries, and the workspace tests check most of them:
fields (#70). Reveal later fails the widget with no such column. Save through the guard, and keep field names in constants (Sales.Revenue) (typescript.md).connectDashboardFilter(dateFilter) binds a field literally called "Date", in both libraries. The plural connectDashboardFilters(date, region) does the same, and Reveal then ignores every dashboard filter on that widget, the correct ones too. Connect each filter on its own. The guard catches it (visualizations.md).setLabel("OrderDate") breaks the widget; pass a DateDataField (visualizations.md).new Date(2026, 0, 1) (.NET DateTimeKind.Local, DateTime.Today) is written as the previous day east of UTC, and Reveal filters that day. Use new Date(Date.UTC(2026, 0, 1)) / an unspecified or UTC DateTime (visualizations.md).LinkFilter value must be the source column; a wrong one opens the target unfiltered (visualizations.md).CircularGauge with only maximum set crashes the client (visualizations.md).new DashboardDateFilter("Order date") defaults to "last 365 days" (DateRuleType.LastYear), which hides older data. Set ruleType = DateRuleType.AllTime (or the rule the user wants). .NET requires a DateFilterRule in the constructor (dotnet.md)._date (.NET gives each filter its own id). On a loaded editor- or .NET-made dashboard, a new connection to its date filter is silently dead: use .NET for that edit, or ask (editing.md).item.Join), in a database view, or in the server's data (typescript.md).new RestDataSourceItem(title, url, dataSource) writes the JSON wrapper that gives widgets rows. The no-argument constructor, or assigning item.dataSource afterwards, puts the widgets straight on the REST source, and every one fails with "unknown type ('REST')". The guard catches it; for a file the app serves, use jsonFileItem (above).setDate on a field declared as TextField renders wrong numbers without an error. Values need NumberField, setDate needs DateField, and every field any visualization binds must be in the item's fields (validation throws when fields is empty) (visualizations.md).DataSource / DataSourceItem, so instanceof MicrosoftSqlServerDataSource is false. Use provider ("SQLSERVER", "POSTGRES", "REST", ...) and properties. A loaded item's fields is empty, because the declared fields sit on visualization.dataDefinition.fields. Copy them back before building a new visualization on that item (editing.md).item.id = "Orders") so the provider can use them as allow-list lookup keys. Treat incoming ids as client-controlled: authorize the current user for the mapped source and replace all source/query details server-side; possession of an id is not permission. Otherwise generated items get GUIDs (typescript.md).npm run spec).reveal-embed skill.Save over an existing, larger file. It leaves a corrupt zip that strict readers reject. Save to a temp file and move it over (dotnet.md).dotnet run -- roundtrip, see editing.md). Follow "Use only the DOM" above only if no DOM path keeps the settings.DateFilterRule.assets/dom-dotnet/ApiBrowser.cs (opens in a new tab)assets/dom-dotnet/DomSamples.csproj (opens in a new tab)assets/dom-dotnet/Examples.cs (opens in a new tab)assets/dom-dotnet/Guard.cs (opens in a new tab)assets/dom-dotnet/LossCheck.cs (opens in a new tab)assets/dom-dotnet/Migration.cs (opens in a new tab)assets/dom-dotnet/Program.cs (opens in a new tab)assets/dom-dotnet/README.md (opens in a new tab)assets/dom-dotnet/SampleData.cs (opens in a new tab)assets/dom-dotnet/Workspace.cs (opens in a new tab)assets/dom-ts/README.md (opens in a new tab)assets/dom-ts/package.json (opens in a new tab)assets/dom-ts/src/examples/app-json-dashboard.ts (opens in a new tab)assets/dom-ts/src/examples/create-sales-dashboard.ts (opens in a new tab)assets/dom-ts/src/examples/edit-dashboard.ts (opens in a new tab)assets/dom-ts/src/examples/spec-generator.ts (opens in a new tab)assets/dom-ts/src/examples/sql-server-dashboard.ts (opens in a new tab)assets/dom-ts/src/lib/guard.ts (opens in a new tab)assets/dom-ts/src/lib/rdash-file.ts (opens in a new tab)assets/dom-ts/src/lib/sample-data.ts (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub revealbi/reveal.sdk --plugin reveal-sdk2 skills in this plugin
Other plugins' skills for the same job