/fabric-apps:rayfin-fabric-clifrom fabric-apps
Resolves operational gotchas for Microsoft Fabric Apps built with the Rayfin scaffold and fabric-app-data/rayfin CLIs. Covers TLS errors, scaffold failures, writeback issues, DAX queries, and template version differences.
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.
None: SKILL.md is the whole skill.
Traps specific to the Rayfin data-app scaffold (npm create @microsoft/rayfin), the
fabric-app-data SDK, and Fabric SQL DB writeback. Read before fighting TLS errors or a
"won't deploy / won't post" writeback bug.
--overwrite deletes the targetnpm create @microsoft/rayfin@latest -- "<name>" --template dataapp creates <name>/. Never
point it at a folder that already holds work, and never pass --overwrite. On a non-empty
target, consenting to overwrite (the prompt or the flag) runs wipeTargetDirectory, an
rmSync(target, { recursive: true, force: true }), before anything is written: the folder and
everything in it are gone, not merged. A project folder with a workbook, PBIP or notes beside the
app gets the app in a subfolder. (Read from rayfin-cli 1.36.2,
dist/utils/scaffold-pipeline.js, 19 Oct 2026.)
@latest: an old cached dataapp template is a different starterThe npx cache can hold an old rayfin-cli. Its 1.33.1 dataapp template is a writeback starter
(rayfin-client, react-router-dom) with no fabric-visuals, src/queries, AGENTS.md or
.agents/skills. From 1.36 the same template name is the Fabric Apps Analytics template. If a
fresh scaffold has no @microsoft/fabric-visuals in package.json and no src/queries, rerun
with @latest. Its agent skills are also newer than copies in older apps, so take them from a
fresh scaffold rather than copying them across.
The 1.36 template itself moved on in late October 2026, so two apps on "1.36" can differ:
| Mid-October 1.36 | Late-October 1.36 (Reading Room, 31 Oct 2026) | |
|---|---|---|
| Model link | fabric.yaml, the fabric-app-data SDK | a connector in rayfin/rayfin.yml (type: fabric-semanticmodel, a name used as the connection) |
| Query hook | use-semantic-model-query over the SDK | useSemanticModelQuery({ connection, query }) over @microsoft/rayfin-connector-fabric-semanticmodel |
| CLI DAX | npx fabric-app-data query semanticModel <alias> -f <file> | npx fabric-app-semantic-model-tools run-dax-query --dax <file> --alias <connection> |
| Charts | fabric-visuals | fabric-visuals, fabric-datagrid and fabric-visuals-extensibility 5.0.0 |
Neither one is the stale starter: check which you have before following an older app's code.
NODE_OPTIONS='--use-system-ca'$env:NODE_OPTIONS='--use-system-ca'
Without it the Fabric SDK's HTTPS requests fail cert validation against corporate-CA-signed endpoints. Set it once per shell.
The scaffold copies the template, then runs an install with --allow-scripts, which npm 11.16
refuses in a project-scoped install ("--allow-scripts is not allowed in project-scoped installs.
Add the entries to the "allowScripts" field in package.json, or to .npmrc, instead."). The files
are all there; run npm install in the new folder. npm then skips the install scripts of seven
packages (esbuild, @swc/core, keytar, msal-node-runtime and others) with a warning, and vite,
vitest, rayfin login and rayfin up still work (31 Oct 2026).
rayfin up edits rayfin/rayfin.ymlIt adds the deployed app's URL to services.auth.allowedRedirectUris and sets
staticHosting.assetAccess: protected. Commit both with the app.
query, add --from-url, and rayfin upIf you still get TLS errors after the NODE_OPTIONS above, AVG is MITM-ing the HTTPS connection. Disable Web/Mail Shield (or whitelist the Fabric endpoints) before running those three commands.
fabric-app-data query syntax: <sourceType> <alias>, text in -q/-f# ❌ "too many arguments for 'query'"
npx fabric-app-data query starwars --query "EVALUATE ..."
# ✅
npx fabric-app-data query semanticModel starwars -q "EVALUATE ..."
npx fabric-app-data query semanticModel starwars -f path/to/query.dax
On the connector template, run-dax-query takes one to four --dax files per call ("Provide
one to four --dax files"), so check a folder of queries in batches of four:
NODE_OPTIONS=--use-system-ca npx fabric-app-semantic-model-tools run-dax-query \
--dax src/queries/a.dax --dax src/queries/b.dax --alias reading
data: { enabled: false } at scaffold time means the whole data-service scaffold is
missing. Turning on writeback (Fabric SQL DB via DAB GraphQL) needs all five; miss one
and rayfin up / db apply fails cryptically:
rayfin.yml needs a dialect. data: { enabled: true } alone →
400 … Dialect is required when Data module is enabled. Add dialect: mssql
(Fabric SQL DB is T-SQL).rayfin/tsconfig.json must exist. Without it, db apply says "TypeScript
compilation successful" then ❌ No rayfin/.temp/compiled/data/*.js files found. Copy
the template's: extends ../tsconfig.json, outDir .temp/compiled, composite: true,
noEmit: false, module/moduleResolution: nodenext.tsconfig.json must reference it: "references": [{ "path": "./rayfin" }].tsBuildInfoFile. If rayfin extends a root tsconfig that sets
tsBuildInfoFile, it inherits the same path → tsc -b fails TS6377
("will overwrite .tsbuildinfo generated by referenced project"). Override it in
rayfin/tsconfig.json (e.g. ".temp/rayfin.tsbuildinfo").rayfin/data/schema.ts needs a runtime array, not just a type. The CLI discovers
entities from export const schema = [BudgetAdjustment] (a value import of the class).
A type-only export type AppSchema = {...} compiles but registers nothing.Deploy order: npx rayfin up provisions the SQL DB child item, applies settings/static,
and runs the schema apply itself. If that step fails, fix the above and re-run
npx rayfin up db apply. The standalone db apply is remote-only and needs the compiled
artifacts to already exist.
DEFAULT NEWID(): supply id client-sideThe docs claim the server generates a UUID if you omit id. Not true here. Rayfin's DDL
only emits a column default when the decorator sets one (@uuid({ default: … })); a plain
@uuid() id produces UNIQUEIDENTIFIER NOT NULL with no default, so a create() that omits
id fails the PK constraint. The DAB client catches nothing, so a try/catch swallows it and
the row silently never lands (table stays empty, the draft "won't post"). Fix:
await api.BudgetAdjustment.create({ id: crypto.randomUUID(), year, /* … */ });
Corollary: never let a writeback catch be silent. Surface the error in the UI and
console.error it; a "nothing happens on click" write bug is otherwise invisible. Check the
PK/id first; auth is usually fine: postedAt as an ISO-8601 string (trailing Z) is
accepted by DATETIME2, and @authenticated('*') writes carry the user token automatically
via the shared RayfinClient singleton.
What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/fabric-app-workflowThe authoring conventions for a Fabric / Rayfin data app over a published semantic model (how query+spec+factory files are organised, the mockup→wire-spec→production pipeline, the Claude Design ZIP handoff, reusable Sparkline props, and matrix/table UI gotchas). Invoke when adding a new chart/visual to a Fabric App, asking "where do DAX queries live", "how do I wire a Vega spec", "where do I put a new query", working with `mockups/`, `.vl.json5` / `.jsonc` specs, `npm run mockups:watch` / `wire-spec` / `import-design`, the `src/queries/<domain>/` triplet pattern, building a reusable Sparkline component, fighting matrix/table column widths or fabric-datagrid headers cut short, Show as table printing raw numbers, a page that breaks at phone or laptop widths, writing card titles that state a finding computed from the rows, or `replace_all` indentation edits./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.npx claudepluginhub insightfulanalytics/pbi_agentic_dev --plugin fabric-appsOther plugins' skills for the same job