/fabric-apps:fabric-app-workflowfrom fabric-apps
Conventions for building visuals in a Fabric/Rayfin data app: DAX-query triplet pattern, mockup→wire-spec→production pipeline, Claude Design ZIP handoff, and matrix/table UI gotchas.
Ships in fabric-apps. 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; scripts run unread.
Conventions for building visuals in a Rayfin Fabric App over a published semantic model.
Pairs with rayfin-fabric-cli (CLI/deploy gotchas) and vega-lite-app-gotchas (spec traps).
src/queries/<domain>/Each visual gets three files under a domain folder:
<name>.dax: the raw DAX (never inline DAX in components)<name>.json: the Vega-Lite spec<name>.ts: a factory exporting { connection, query, columnMetadata, vegaLiteSpec }The factory is where you parameterize the spec or query, e.g. accept a categories?: string[]
and inject a FILTER clause. Components consume the factory function, not the raw files.
Confirm columnMetadata keys from real CLI output:
npx fabric-app-data query semanticModel <alias> -q "EVALUATE ..."
On the late-October 1.36 connector template there is no fabric-app-data: run
npx fabric-app-semantic-model-tools run-dax-query --dax <file> --alias <connection> instead
(see rayfin-fabric-cli).
.vl.json5 (or .jsonc) in mockups/ using inline preview data.npm run mockups:watch compiles each to mockups/.preview/<name>_nc.vl.json (clean JSON
for Vega Viewer / vega-embed) so you can eyeball it before wiring.npm run wire-spec -- mockups/<name>.vl.json5 --domain <d> --name <n> scaffolds the
.dax / .ts / .json triplet.columnMetadata keys from a CLI query output.Start specs from the 60 deneb-templates/ references where possible: copy, rename to
.vl.json5 / .jsonc, adapt to the data shape, let the watcher preview it.
npm run import-design -- --zip "path/to/export.zip" extracts to
design-imports/<name>/ and generates a manifest.json.<script id="data-manifest"> visual becomes a mockup spec + a
DAX query.design-system/HANDOFF-CONTEXT.md for the full copy-paste block.When reusing a Sparkline across pages with different value scales, parameterize rather than fork the component:
labelTitle?: string (default "Period"): lets each consumer rename the tooltip x-axis
label without breaking the others.tooltipFormat?: (value: number) => string: if supplied, pre-compute a valueTip string
in the data table and reference it as a nominal field in the tooltip. Sidesteps the
d3-format mixed-units problem (see vega-lite-app-gotchas #3) entirely.tableLayout: "fixed" with an explicit width on every <th> is the
only reliable way to control widths. Mix pixel and percent widths cautiously.paddingLeft/paddingRight
to the <td> (and the matching <th>); it pushes content without breaking the layout math.replace_all respects indentation: if the same line appears at two indent levels (e.g.
a per-row cell vs a total-row cell), one old_string only matches one of them. Grep after
a replace_all to confirm every intended occurrence was actually hit.scripts/inspect-layout.js):
references/layout-and-tables.md. Run the check before
calling a page done.npm run validate:visual -- <factory.ts> '<props json>' renders the module's first function
export, and module namespace keys sort alphabetically, so a helper exported beside a
factory gets rendered instead. Export one function per factory module. The JSON report
follows npm's header lines: parse from the first line that starts with {.npm run lint crashes with ENOENT ... scandir while DAX queries run, because
fabric-app-semantic-model-tools creates and removes .fabric-app-semantic-model-tools-*
folders in the app root as ESLint walks it; the template's visual-input tests time out at
5 s under the same load. Run both when no query is running.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub insightfulanalytics/pbi_agentic_dev --plugin fabric-apps3 skills in this plugin
/rayfin-fabric-cliOperational gotchas for building Microsoft Fabric Apps with the Rayfin scaffold and the `fabric-app-data` / `rayfin` CLIs (Vite + React data apps over a published semantic model, with optional Fabric SQL DB writeback via DAB GraphQL). Invoke on TLS/certificate errors from npm/npx or the Fabric SDK, "rayfin up" / "db apply" failures, `fabric-app-data query` "too many arguments", "Dialect is required when Data module is enabled", "No compiled data/*.js files found", TS6377 tsBuildInfo errors, a writeback `create()` that silently never lands a row, UUID primary-key / `NEWID()` issues, or enabling the data service on an app scaffolded without it. Also invoke before scaffolding a new app (`npm create @microsoft/rayfin`, `rayfin init`), before passing `--overwrite`, when a fresh `dataapp` scaffold has no `fabric-visuals` or `src/queries`, when the scaffold's install fails with EALLOWSCRIPTS, or when running DAX through `fabric-app-semantic-model-tools run-dax-query`. Covers scaffold target safety, the template versions (SDK or connector), NODE_OPTIONS, the npm 11.16 allow-scripts failure, AVG HTTPS-shield interference, query CLI syntax, what the first `rayfin up` changes, the five edits to turn on writeback, and client-supplied UUID ids./vega-lite-app-gotchasHard-won fixes for Vega-Lite specs rendered inside a React / Power BI / Fabric App (the `VegaVisual` + Tailwind stack). Invoke when a value label is cut at the plot edge or runs into the row names, two-line axis labels overlap the marks, a layer reports "Conflicting axis property", a Vega-Lite chart "sorts alphabetically instead of by month", an ordinal axis won't honour a string `sort` array, a multi-series line chart shows all series in one tooltip or ignores a custom `tooltip`, tooltip numbers mix `$420k` and `$1.2M`, a chart renders with no color / "color is not a valid CSS color" after using `var(--ds-*)`, the chart loses its brand color, axis labels get clipped by the card, you're laying out a KPI card in Vega, or you hit "Duplicate signal name" on hover_tuple. Also invoke on fabric-visuals 5.0 when a null `axis` still draws an axis, an axis `format` prints NaN or is ignored, labelled bars sort alphabetically ("unioned domains only support"), text labels read "2.1K", or a click's selection predicates come back with `fieldId`. Covers ordinal sorting, multi-series tooltips, value pre-formatting, CSS-variable resolution in SVG, the `--color-brand` theming bridge, card overflow clipping, KPI-card layout, and the fabric-visuals 5.0 axis, sort, label and interaction traps.Other plugins' skills for the same job