microsoft/awesome-rayfin/fabric-data
Claude Code and agent skill by microsoft/awesome-rayfin
- vendor
Checking that the SKILL.md file is still in the repository.
Manage Fabric semantic-model connections with fabric-app-data and query Fabric semantic models at runtime with @microsoft/fabric-app-data. Covers fabric.yaml, generated TypeScript config, CLI schema/query testing, and essential FabricClient/use-semantic-model-query result handling.
Install
npx vskill@latest install microsoft/awesome-rayfin/fabric-dataSKILL.md
The same SKILL.md was published earlier as microsoft/awesome-rayfin/fabric-data.
Fabric Data — Connections and Runtime Queries
Use this skill when you need to wire a Power BI semantic model, inspect schema, quick-test DAX, or handle query results in the app.
Fast path
- Confirm the connection alias in
fabric.yaml. - If no alias exists, add one:
``sh npx fabric-app-data add <alias> --from-url "<Fabric portal URL>" # or, when you have IDs: npx fabric-app-data add <alias> -w <workspaceId> -i <itemId> ` Use workspaceId: "me" for My Workspace. The long flags are --workspace and --item; **do not** use --workspace-id or --item-id`.
- Regenerate the config:
``sh npx fabric-app-data generate -o src/fabric.generated.ts ``
- Discover schema or test DAX with the same pipeline the app uses:
``sh npx fabric-app-data query <alias> --query "EVALUATE INFO.VIEW.TABLES()" npx fabric-app-data query <alias> --file src/queries/hero.dax --limit 100 ``
- In app code, use the template's query hook; do not hand-edit generated config.
If you only have the workspace + item (dataset) id of the model, wire it with fabric-app-data add <alias> -w <workspaceId> -i <itemId>.
CLI essentials
All commands except init walk up from the current directory until they find fabric.yaml; run init from the project root.
| Command | Use | |
|---|---|---|
npx fabric-app-data init [-p <profile>] [--force] | Create fabric.yaml with an active profile. | |
npx fabric-app-data add <alias> --from-url "<url>" | Add a semantic model from a Fabric portal URL. | |
npx fabric-app-data add <alias> -w <workspaceId> -i <itemId> | Add by explicit IDs. Short flags: -w, -i; long flags: --workspace, --item. | |
npx fabric-app-data remove <alias> [-p <profile>] | Remove a connection. | |
npx fabric-app-data list [-p <profile>] | List connections. | |
npx fabric-app-data use <profile> [-o <path>] | Switch active profile and regenerate config. | |
npx fabric-app-data generate [-p <profile>] [-o src/fabric.generated.ts] | Generate TypeScript config. | |
npx fabric-app-data query <alias> --query '<DAX>' | Execute DAX against a semantic model. Aliases: execute, exec. |
query options:
-q, --query <query>— inline DAX.-f, --file <path>—.daxfile.-l, --limit <rows>— max returned rows; default 1000, max 1000.-p, --profile <name>— profile; defaults toactiveProfile.
The CLI caps output at 1000 rows. Trimmed JSON includes _cliWarning; refine the DAX with filters or aggregation instead of trying to pull more rows for a visual.
Feeds the headless preview. A savedqueryresult (… --file q.dax > rows.json)can be piped straight intonpm run preview -- --spec s.json --data rows.jsontorender a chart against this live data, or the preview script can run the queryitself (--query <alias> --dax-file q.dax). See theheadless-previewskill.
fabric.yaml
Supported URL segments include semanticmodels, modeling, lakehouses, and warehouses; semantic-model dashboard work usually needs semanticModels.
Generated contract
fabric.generated.ts is auto-generated from the active profile and exports a plain config object:
Edit fabric.yaml, then regenerate. Never hand-edit src/fabric.generated.ts.
Runtime querying
The template already wires FabricClient and exposes useSemanticModelQuery; query through that hook unless you are changing plumbing.
Direct SDK shape, when needed:
Result rules agents must remember
- Always check `result.status` when using the SDK result directly; queries never throw.
- Successful queries return one table:
table.columnsmetadata andtable.rowsasunknown[][]. - Rows are positional:
rows[i][j]matchescolumns[j]. Map deliberately before charting. - Error categories:
query(bad DAX),overflow(unsafe numeric value),api(HTTP/Fabric),network,unknown. - Date/DateTime values are strings like
"2024-01-15T10:30:00.000"with no timezone suffix. Treat them as timezone-unaware model values. - Integers outside
Number.MAX_SAFE_INTEGERreturncategory: "overflow"instead of losing precision.
Caching
Query results are cached in memory by default (LRU, 64 entries). Successes and DAX query errors are cached; transient api, network, and unknown errors are not.
Disable or tune only when you are changing data plumbing:
Minimal types
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 19 Sep 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingtemplates/universal-app/.agents/skills/fabric-data/SKILL.md
Popularity
- Repository stars
- 95
- Repository forks
- 24
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/microsoft/awesome-rayfin/fabric-data)