AGENT SKILL

capability-router

START HERE at the beginning of essentially every build request in this universal Rayfin app. Use this first whenever the user asks to build, create, add, or make something ("build me an app", "add sign-in", "let users upload files", "show a chart", "build a dashboard", "store todos", "make a Power BI report") and you need to decide WHICH capabilities to turn on. This skill maps the request to capability packs and tells you, for each, which Fabric service to enable, which npm modules to install, which code to scaffold, and which skill to read next. Triggers: build, create, add, make, app, feature, start, scaffold, capability, which service, what should I install, where do I begin.

使用场景分析与可视化
License 许可
MIT
最近更新
2026-11-13
Stars
★ 112
Forks
70

01 前言 Front Matter

name
capability-router
description
START HERE at the beginning of essentially every build request in this universal Rayfin app. Use this first whenever the user asks to build, create, add, or make something ("build me an app", "add sign-in", "let users upload files", "show a chart", "build a dashboard", "store todos", "make a Power BI report") and you need to decide WHICH capabilities to turn on. This skill maps the request to capability packs and tells you, for each, which Fabric service to enable, which npm modules to install, which code to scaffold, and which skill to read next. Triggers: build, create, add, make, app, feature, start, scaffold, capability, which service, what should I install, where do I begin.

02 资源文件 1

03 SKILL.md 正文

Capability router — pick capabilities, enable services, install modules, activate skills

This is a lean universal app that grows on demand. Your first job for any build request is to route: figure out which capabilities the request needs, then turn on only those. Don't build everything; build toward what the user asked for.

The procedure

  1. Classify the request into one or more capabilities using the matrix below. Most requests need 1–2 packs. When in doubt, start with the smallest set and grow later — you can always route again on the next turn.
  2. For each chosen pack, in order: 0. If the pack ships a pack.json, scaffold it in one command — npm run pack:add -- <pack> enables the service, installs the pinned modules, copies the kit, and wires scripts in one idempotent pass (see pack-manifest.md). Today analytics ships one, so that whole path is a single command — then jump straight to reading the pack skill. Otherwise, do the manual steps below.
    1. Enable the service — edit rayfin/rayfin.yml (see the pack's row). Auth + data + static hosting are already on.
    2. Install the modules — npm install <…> for that pack. Install just what the pack needs; skip modules already in package.json. (Manifest packs install their own modules; a manual npm install is fine for the rest.)
    3. Scaffold the code — create the entities / wiring / files the pack calls for (the pack's row says what; the pack's SKILL.md has the patterns).
    4. Read the pack skill — open .agents/skills/<pack>/SKILL.md and follow it for the real implementation details. Don't duplicate its guidance here.
  3. Keep it building, then deploy with rayfin up when you're ready to see it on Fabric (see AGENTS.md).

Capability matrix

Pack Route here when the user wants… Enable in rayfin.yml Install Scaffold Then read
authentication sign-in, accounts, login, logout, protected pages, "who is the current user", per-user data auth (already on) — (scaffolding already present) Wire AuthProvider + bootstrapAuth() in src/main.tsx; add the route guard in src/App.tsx authentication
data-modeling records, CRUD, a database, entities, lists, "save/store X", per-user rows, row-level security data (already on, dialect: mssql) + auth @microsoft/rayfin-data Add entity classes under rayfin/data/*.ts; register them in rayfin/data/schema.ts; read/write via the rayfin-client; wire auth (Rayfin data is always authenticated) data-modeling + authentication
graphein-visuals a chart, graph, plot, KPI, table, or small dashboard over app data — graphein (already present) Author a ChartSpec, drop into <Chart spec={…} /> (src/components/Chart.tsx) graphein-visuals
analytics a Power BI / semantic-model dashboard, DAX measures, BI reporting over an existing dataset one command: npm run pack:add -- analytics (sets auth on / data off, installs modules, copies kit/**, seeds a runnable demo) — (the command installs them) — (the command copies the kit + seeds App.tsx/main.tsx); then wire the semantic model analytics (then build-workflow, visuals, dax, fabric-data, app-design, headless-preview)

Notes on routing

  • App-building vs analytics are different shapes. The app-building packs (authentication, data-modeling, graphein-visuals) build a normal interactive app over Rayfin data, with data enabled. The analytics pack builds a read-only dashboard over an external Power BI semantic model (data disabled, its own dashboard kit). If the user wants charts over their own app's data, use graphein-visuals; if they want a dashboard over an existing Power BI dataset/report, use analytics.
  • Charts everywhere. graphein-visuals composes with the app-building packs (e.g. data-modeling for the data + graphein-visuals for the chart).
  • Row-level security lives inside data-modeling — route there when the user says "each user only sees their own …".
  • Data implies auth. Rayfin data is always accessed as an authenticated user (no anonymous access on Fabric), so any request that stores or reads app data — data-modeling especially — must also wire authentication; route to both. A static page over public data needs neither. (Analytics is separate: its Power BI model is read through the Fabric embed proxy, which Fabric authenticates — no app AuthProvider needed.)
  • Grow incrementally. Ship the core of what was asked, let it deploy, then add the next capability. You don't have to wire every pack up front.

04 同仓库更多 Skills

microsoft
microsoft/awesome-rayfin

visuals

Use when user wants to incorporate charts, graphs, data grid, or other visual representations of data into their project. Use VegaVisual and DataGrid components to create these visuals, utilizing the shared DataTable input, formatting, theme, and interactivity. Covers the onInteraction selection/click events host apps consume, named multi-table data input for layered overlays and reference lines, and Vega-Lite native selections.

★ 112
microsoft
microsoft/awesome-rayfin

schema-discovery

Explore Power BI semantic model schemas using DAX INFO functions. Progressive metadata discovery strategy, scope estimation, and narrowing techniques for tables, columns, measures, and relationships.

★ 112
microsoft
microsoft/awesome-rayfin

rayfin

Use when doing ANY task involving Rayfin — scaffolding, data models, decorators, auth, deployment, CLI commands, or client setup. Triggers: rayfin, rayfin init, rayfin up, rayfin login, RayfinClient, @entity, @role, @anonymous, @authenticated, @text, @uuid, @int, @decimal, @boolean, @date, @email, @set, @one, @many, DAB, Data API Builder, rayfin.yml, publishableKey, signUp, signIn, signOut, sendMagicLink, handleMagicLinkCallback, ensureSignedInWithFabric, Fabric SSO, Entra ID, rayfin up db apply, rayfin up staticapp deploy, schema.ts, OpaqueSession, onSessionChange, GraphQL select, GraphQL create, GraphQL update, GraphQL delete, findById, executePaginated, RLS policy, row-level security, claims.sub, claims.email, TC39 decorators, config generation, dialect, mssql, postgresql

★ 112
microsoft
microsoft/awesome-rayfin

rayfin-connectors

Use for Rayfin connectors that wire existing Fabric SQL data sources (Lakehouse, Warehouse, SQL Database) into an app as GraphQL-backed entities. Triggers: rayfin connector, rayfin up connector apply, connectors:, fabric-sqlanalytics, fabric-warehouse, fabric-sqldatabase, kusto, kql, eventhouse, workspaceId, itemId, operations:, AppConnectorsSchema, ConnectorsSchema, rayfin/connectors/, metadata.json, connector @role policy, connector claims.sub filter, connector claims.email filter, ConnectorsRayfinClient, rayfin-client.ts, client.connectors, connectorConfig, GraphQLBackedConnector, RestrictedDataApi, schema.ts aggregate, generate entities from metadata, add a use case on specific entities, wire connector into client, call a connector from the SDK, rayfin connector inspect, inspect connector data, sample connector rows, fabric-semanticmodel, --entity, --query, DAX EVALUATE, read-only sample query, rayfin connector search, discover connectable sources, find fabric sources to add, --all-workspaces, --workspace-id, connector search interactive picker, rayfin connector invoke, invoke a connector operation, run executeQuery, --input, --file, RAYFIN_FEATURE_FLAGS, resultSetRowCountLimit, limit rows, row limit, cap rows, too many rows, overflow

数据分析师后端与接口
★ 112
microsoft
microsoft/awesome-rayfin

query-design

Separates DAX data-fetching from TypeScript presentation. Guides when to use DAX vs. TypeScript vs. Vega-Lite for aggregation, total rows, FORMAT(), SELECTCOLUMNS, BLANK handling, filtering, multi-grain queries, cross-filtering and cross-highlight subset/overlay queries, and format strings.

设计师演示文稿视觉设计
★ 112
microsoft
microsoft/awesome-rayfin

playwright-cli

Automate browser interactions, test web pages and work with Playwright tests.

测试与质量
★ 112