[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M699WYTG47ZT6R5XVW47ZS9Y":3,"skill-same:01M699WYTG47ZT6R5XVW47ZS9Y":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":49,"repositoryHtmlUrl":50,"repositoryHomepageUrl":17,"ownerHtmlUrl":51,"ownerBlogUrl":52,"ownerDescription":53,"updatedAt":54,"install":55,"resources":68},"01M699WYTG47ZT6R5XVW47ZS9Y","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, deep link, deep linking, shareable URL, app state, createFabricAppStateClient, getLaunchStateSync, replaceState, onStateChange, fabricAppState","当执行任何涉及 Rayfin 的任务时使用——脚手架搭建（scaffolding）、数据模型、装饰器（decorators）、认证（auth）、部署、CLI 命令或客户端设置。触发词：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、deep link、deep linking、shareable URL、app state、createFabricAppStateClient、getLaunchStateSync、replaceState、onStateChange、fabricAppState","microsoft\u002Frayfin","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M699VK9NEV8GH0Y5JKT1G8XG",662,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Frayfin\u002Fblob\u002Fmain\u002Fpackages\u002Ftools\u002Fcli\u002Fassets\u002Fagent-files\u002Fskills\u002Frayfin\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BT7QVANT4709358VEJK53E","代码实现","SCENARIO","使用场景",[5,31,32,33,10,34,35,36,37,38],"cli","security","policy","auth","init","config","deploy","setup","2026-11-10 10:12:30",false,"---\nname: rayfin\ndescription: \"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, deep link, deep linking, shareable URL, app state, createFabricAppStateClient, getLaunchStateSync, replaceState, onStateChange, fabricAppState\"\nmetadata:\n  author: microsoft\n  version: \"0.5.0\"\n---\n\n# Rayfin\n\n## Rayfin Docs — read them from `node_modules` first\n\nRayfin packages that **declare a `rayfinDocs` field in their `package.json`**\nship their documentation **inside the installed package**. It describes the\nexact versions this project has, which this skill cannot — decorators, field\noptions, client methods, and platform constraints all move between releases.\nRead the docs from disk before you write Rayfin code, and before you reach for\na documentation lookup tool.\n\n1. Read `node_modules\u002F@microsoft\u002F\u003Cpackage>\u002Fpackage.json` and check for a\n   `rayfinDocs` field. If it is there, take the docs root from `rayfinDocs.dir`\n   (today, always `assets\u002Fdocs`).\n2. Read `\u003Cdocs-root>\u002Findex.md` and follow its links.\n3. Read the file that answers the question.\n\n| Your question is about… | Read |\n| --- | --- |\n| Decorators, field options, entity and permission metadata | `@microsoft\u002Frayfin-core\u002Fassets\u002Fdocs\u002F` |\n| Client queries, mutations, paging, field nullability | `@microsoft\u002Frayfin-data\u002Fassets\u002Fdocs\u002F` |\n| Guides, data modelling, permissions, auth, CLI workflows | `@microsoft\u002Frayfin-guide\u002Fassets\u002Fdocs\u002F` |\n| Client composition and configuration | `@microsoft\u002Frayfin-client\u002Fassets\u002Fdocs\u002F` |\n| Vite local routing and Rayfin CLI-backed local authentication | `@microsoft\u002Frayfin-local-dev\u002Fassets\u002Fdocs\u002F` |\n| Server-side functions (UDFs) — authoring, invoking, connections, CLI | `@microsoft\u002Frayfin-guide\u002Fassets\u002Fdocs\u002Ffunctions\u002F` |\n| Deep-link app state — shareable URLs for apps embedded in the Fabric portal | `@microsoft\u002Frayfin-app-state-fabric\u002Fassets\u002Fdocs\u002F` |\n\nNot every installed package carries docs. `@microsoft\u002Frayfin-cli` has no\n`rayfinDocs` field — questions about the CLI, its commands, or deployment\nworkflows are answered by `@microsoft\u002Frayfin-guide`. Do not stop because a\npackage has no docs root of its own; go to the guide.\n\n**Do not answer a Rayfin question from this skill when a package doc covers it.**\nThis skill owns workflow, guardrails, and the CLI surface. The packages own their\nown behaviour.\n\nOnly two things justify a tool call, because a file read cannot do them. Reach\nfor the CLI first — it is always available in a Rayfin project:\n\n- **Ranked search**, when the index files do not tell you which file to open —\n  `rayfin docs search '\u003Ctopic>'`, or `search_docs(query, module)` via MCP (if\n  already installed).\n- **Finding a package you do not have** — `rayfin docs discover '\u003Ctopic>'`, or\n  `discover_packages(query)` via MCP (if already installed).\n\nRun either from the project root so the project's own `node_modules` wins. If\n`rayfin` is not on `PATH`, use `npx -y @microsoft\u002Frayfin-cli docs ...`.\n\n**Before creating entities or writing queries, read known limitations.** It is\nshort, and it is where the platform states what it will not do:\n\n```text\nnode_modules\u002F@microsoft\u002Frayfin-guide\u002Fassets\u002Fdocs\u002Fknown-limitations.md\n```\n\n## Rules\n\n### Platform\n\n- Rayfin uses TC39 Stage 3 decorators — never enable `experimentalDecorators` or `emitDecoratorMetadata`. This is an invariant, not a version detail; tsconfig specifics are in the guide's project-structure doc.\n- Prefer `npm create @microsoft\u002Frayfin@latest` for new projects — it generates correct tsconfig and schema boilerplate.\n\n### Security\n\n- **Every entity must carry an explicit permission decorator.** Omitting one silently grants full CRUD to any signed-in user, which is almost never what production data wants. The decorators, the row-level policy DSL, and field visibility options are documented in `rayfin-core\u002Fassets\u002Fdocs\u002Fpermissions.md` and the guide's `data\u002Fpermissions.md` — read them rather than recalling them.\n- Publishable keys (`pk-*`) are safe for client-side code — never expose service secrets or connection strings.\n- Keep `allowedRedirectUris` in `rayfin.yml` tightly scoped to your app's origin.\n- Email\u002Fpassword auth is local development only — deployed Fabric apps support Fabric SSO (Entra ID) exclusively.\n- Fabric-hosted apps can be embedded, protected standalone, or public standalone. Keep the application auth gate in every posture; public static hosting does not make backend APIs or data anonymous.\n- Vite local development may establish a Rayfin session through `@microsoft\u002Frayfin-local-dev`, which reuses `rayfin login`, the configured tenant, and the CLI token cache. Do not add Azure CLI auth or another MSAL cache.\n- Keep local auto-login behind a DEV-only dynamic import, and keep `services.auth.fabric.externalEntraExchange: true` enabled when that flow is used.\n- Local auto-login does not exercise the deployed public signed-out screen. Validate public signed-out, protected\u002Frestored, embedded, and local failure\u002Frecovery paths separately.\n\n### Project Layout\n\n- Entities live in `rayfin\u002Fdata\u002F`, one file per entity, and every one is registered in `rayfin\u002Fdata\u002Fschema.ts`. An entity that is not registered does not exist as far as the client is concerned.\n- Configuration lives in `rayfin\u002Frayfin.yml`. Enabling the data service requires a dialect.\n- **The decorator surface, field options, relationships, and the client query API are package-owned.** Read `rayfin-core\u002Fassets\u002Fdocs\u002Fdecorators.md`, the guide's `data\u002Foverview.md`, and `data\u002Fgraphql.md`. Do not write entities or queries from memory — the option names and constraints have changed between releases, and the doc in `node_modules` is the version this project has.\n\n### Schema\n\n- **For Fabric:** `rayfin up` is the canonical command for \"deploy this change,\" \"apply this schema change,\" or \"push my entity update\" — it deploys the app and applies pending schema migrations in a single step. Recommend it on every deploy, including incremental schema changes after the initial deploy.\n- `rayfin up db apply` is a narrow advanced subcommand that applies schema-only without touching the static build — only recommend it when the user explicitly asks to skip the static deploy step.\n- `--force` permits destructive changes (drop table, drop column, alter type) — never use without review.\n- `--gen-config-only` generates the underlying API config without applying — use to inspect before applying.\n- **Never name an entity after a reserved GraphQL type.**\n  Entity names become GraphQL type names, so built-in scalars, the operation root types, and any name starting with `__` are rejected before the schema is applied — on `rayfin\u002Fdata\u002F` entities as well as connector entities.\n  Matching is case-sensitive and exact — `TaskDate` is fine.\n  The authoritative list is the \"Reserved entity names\" section of `@microsoft\u002Frayfin-core\u002Fassets\u002Fdocs\u002Fdecorators.md` — read it there, never from memory.\n  Read it there, never from memory, then rename the class or pass an explicit name to `@entity('...')`.\n\n### Deployment\n\n- When the user asks to \"build and deploy,\" \"make it live,\" or \"deploy this change\" (including schema-only changes like adding a column), execute the full workflow — do not present steps as instructions for the user to run manually.\n- Workflow: `rayfin login` → `rayfin up` → `rayfin up status`. `rayfin up` builds the static app, deploys it, and applies any pending schema migrations.\n- `rayfin up status` checks endpoint health — run after deployment to verify.\n- Deployment metadata is written to `rayfin\u002F.deployments.json` (per-workspace record: `fabricItemId`, `hostingUrl`, `publishableKey`, etc.). The deploy also appends the live hosting URL to `allowedRedirectUris` in `rayfin.yml`.\n\n### Deep Linking\n\n- Shareable, bookmarkable URLs for an app embedded in the Fabric portal come from `@microsoft\u002Frayfin-app-state-fabric`. It is opt-in — installing it is not enough, the app must read launch state and write state back. Read the package docs before wiring it: the reader choice, `setState` vs `replaceState`, the size limit, and `targetOrigin` are all package-owned.\n- **Leave `targetOrigin` unset.** The parent frame is a Fabric extension host on a different origin from the portal address bar, and it varies per environment. Pinning the portal origin makes the browser discard every message, and the failure is silent — `isSupported()` resolves `undefined` and writes become no-ops.\n- **Restore before you sync.** When mirroring app state into a router, the launch-state restore and the location-sync must not race. Both mount effects run in the same commit: the restore effect schedules a navigation to the launch route, and a sync effect reading `location` on that same pass still sees the *pre-restore* route and writes it back — destroying the state the app was launched with. Hold the sync until the restore navigation has landed. The symptom is that a shared link opens on the right page and then immediately jumps to the default one.\n- **Restore exactly once.** Outside a data router `useNavigate()` returns a new function identity on every navigation, so an effect listing it as a dependency replays the restore forever: every click is dragged back to the launch route, and the pending-restore guard suppresses the write. The symptom is that navigation looks completely dead and the URL never updates. Hold `navigate` in a ref and give the restore effect an empty dependency list.\n- Deep linking is host-gated. Where the host does not support it, or its feature switch is off, the client reports `UNSUPPORTED_HOST_CAPABILITY` — degrade quietly and keep the app working. That is expected, not a bug.\n- State rides in the URL, so keep it small — a route and a few identifiers, never a data cache. Oversized writes are rejected rather than producing a broken link.\n\n## Anti-Patterns\n\n- **Never answer a Rayfin API question from memory or from this skill.** Read the installed package's docs. A remembered decorator option or client method is a guess about a version you did not check.\n- Never use raw `fetch()` or hand-built GraphQL for data operations — always use the typed client, which provides type-safe queries and automatic auth.\n- Never leave an entity without an explicit permission decorator. Forgetting silently applies full CRUD for any signed-in user.\n- Never design entities before reading the guide's `known-limitations.md`. Text length caps, supported scalar types, relationship rules, and MSSQL-specific constraints all shape entity design, and all of them change independently of this skill.\n- Never enable `experimentalDecorators` or `emitDecoratorMetadata` to make a decorator error go away — it breaks Rayfin's metadata entirely.\n- Never write the router's current location into deep-link app state on mount without first confirming a launch-state restore is not still in flight — it silently overwrites the state the app was opened with, and the app snaps back to its default page.\n\n## CLI Quick Reference\n\n```bash\n# Scaffold\nnpm create @microsoft\u002Frayfin@latest \u003Cname>   # Create from template\nnpx rayfin init [directory]                   # Interactive setup\n\n# Deploy to Fabric (default workflow)\nnpx rayfin login                              # Sign in with Entra ID\nnpx rayfin up                                 # Deploy app + apply schema (canonical)\nnpx rayfin up status                          # Check deployment health\nnpx rayfin up db apply                        # Schema-only, skip static deploy (advanced)\nnpx rayfin up staticapp deploy                # Redeploy static content\n\n# Server-side functions (UDFs)\nnpx rayfin functions init                     # Scaffold rayfin\u002Ffunctions\u002F, enable the service, generate types\nnpx rayfin dev functions apply                # Run the local function host + typegen watcher\nnpx rayfin up functions deploy                # Deploy functions to Fabric\nnpx rayfin secret set \u003CNAME>                  # Store a secret for functions\n\n# Connectors (Fabric data sources)\nnpx rayfin connector search [query]           # Discover addable Fabric sources\nnpx rayfin connector add --type \u003Ctype> --workspace-id \u003Cws> --item-id \u003Citem>\nnpx rayfin connector inspect                  # Sample\u002Flist source entities or run a read-only query\nnpx rayfin connector invoke \u003Cname> \u003Cop>       # Run a named connector operation\nnpx rayfin up connector apply                 # Re-apply connector DAB config only\n```\n","# Rayfin\n\n## Rayfin Docs — read them from `node_modules` first\n\nRayfin packages that **declare a `rayfinDocs` field in their `package.json`**\nship their documentation **inside the installed package**. It describes the\nexact versions this project has, which this skill cannot — decorators, field\noptions, client methods, and platform constraints all move between releases.\nRead the docs from disk before you write Rayfin code, and before you reach for\na documentation lookup tool.\n\n1. Read `node_modules\u002F@microsoft\u002F\u003Cpackage>\u002Fpackage.json` and check for a\n   `rayfinDocs` field. If it is there, take the docs root from `rayfinDocs.dir`\n   (today, always `assets\u002Fdocs`).\n2. Read `\u003Cdocs-root>\u002Findex.md` and follow its links.\n3. Read the file that answers the question.\n\n| Your question is about… | Read |\n| --- | --- |\n| Decorators, field options, entity and permission metadata | `@microsoft\u002Frayfin-core\u002Fassets\u002Fdocs\u002F` |\n| Client queries, mutations, paging, field nullability | `@microsoft\u002Frayfin-data\u002Fassets\u002Fdocs\u002F` |\n| Guides, data modelling, permissions, auth, CLI workflows | `@microsoft\u002Frayfin-guide\u002Fassets\u002Fdocs\u002F` |\n| Client composition and configuration | `@microsoft\u002Frayfin-client\u002Fassets\u002Fdocs\u002F` |\n| Vite local routing and Rayfin CLI-backed local authentication | `@microsoft\u002Frayfin-local-dev\u002Fassets\u002Fdocs\u002F` |\n| Server-side functions (UDFs) — authoring, invoking, connections, CLI | `@microsoft\u002Frayfin-guide\u002Fassets\u002Fdocs\u002Ffunctions\u002F` |\n| Deep-link app state — shareable URLs for apps embedded in the Fabric portal | `@microsoft\u002Frayfin-app-state-fabric\u002Fassets\u002Fdocs\u002F` |\n\nNot every installed package carries docs. `@microsoft\u002Frayfin-cli` has no\n`rayfinDocs` field — questions about the CLI, its commands, or deployment\nworkflows are answered by `@microsoft\u002Frayfin-guide`. Do not stop because a\npackage has no docs root of its own; go to the guide.\n\n**Do not answer a Rayfin question from this skill when a package doc covers it.**\nThis skill owns workflow, guardrails, and the CLI surface. The packages own their\nown behaviour.\n\nOnly two things justify a tool call, because a file read cannot do them. Reach\nfor the CLI first — it is always available in a Rayfin project:\n\n- **Ranked search**, when the index files do not tell you which file to open —\n  `rayfin docs search '\u003Ctopic>'`, or `search_docs(query, module)` via MCP (if\n  already installed).\n- **Finding a package you do not have** — `rayfin docs discover '\u003Ctopic>'`, or\n  `discover_packages(query)` via MCP (if already installed).\n\nRun either from the project root so the project's own `node_modules` wins. If\n`rayfin` is not on `PATH`, use `npx -y @microsoft\u002Frayfin-cli docs ...`.\n\n**Before creating entities or writing queries, read known limitations.** It is\nshort, and it is where the platform states what it will not do:\n\n```text\nnode_modules\u002F@microsoft\u002Frayfin-guide\u002Fassets\u002Fdocs\u002Fknown-limitations.md\n```\n\n## Rules\n\n### Platform\n\n- Rayfin uses TC39 Stage 3 decorators — never enable `experimentalDecorators` or `emitDecoratorMetadata`. This is an invariant, not a version detail; tsconfig specifics are in the guide's project-structure doc.\n- Prefer `npm create @microsoft\u002Frayfin@latest` for new projects — it generates correct tsconfig and schema boilerplate.\n\n### Security\n\n- **Every entity must carry an explicit permission decorator.** Omitting one silently grants full CRUD to any signed-in user, which is almost never what production data wants. The decorators, the row-level policy DSL, and field visibility options are documented in `rayfin-core\u002Fassets\u002Fdocs\u002Fpermissions.md` and the guide's `data\u002Fpermissions.md` — read them rather than recalling them.\n- Publishable keys (`pk-*`) are safe for client-side code — never expose service secrets or connection strings.\n- Keep `allowedRedirectUris` in `rayfin.yml` tightly scoped to your app's origin.\n- Email\u002Fpassword auth is local development only — deployed Fabric apps support Fabric SSO (Entra ID) exclusively.\n- Fabric-hosted apps can be embedded, protected standalone, or public standalone. Keep the application auth gate in every posture; public static hosting does not make backend APIs or data anonymous.\n- Vite local development may establish a Rayfin session through `@microsoft\u002Frayfin-local-dev`, which reuses `rayfin login`, the configured tenant, and the CLI token cache. Do not add Azure CLI auth or another MSAL cache.\n- Keep local auto-login behind a DEV-only dynamic import, and keep `services.auth.fabric.externalEntraExchange: true` enabled when that flow is used.\n- Local auto-login does not exercise the deployed public signed-out screen. Validate public signed-out, protected\u002Frestored, embedded, and local failure\u002Frecovery paths separately.\n\n### Project Layout\n\n- Entities live in `rayfin\u002Fdata\u002F`, one file per entity, and every one is registered in `rayfin\u002Fdata\u002Fschema.ts`. An entity that is not registered does not exist as far as the client is concerned.\n- Configuration lives in `rayfin\u002Frayfin.yml`. Enabling the data service requires a dialect.\n- **The decorator surface, field options, relationships, and the client query API are package-owned.** Read `rayfin-core\u002Fassets\u002Fdocs\u002Fdecorators.md`, the guide's `data\u002Foverview.md`, and `data\u002Fgraphql.md`. Do not write entities or queries from memory — the option names and constraints have changed between releases, and the doc in `node_modules` is the version this project has.\n\n### Schema\n\n- **For Fabric:** `rayfin up` is the canonical command for \"deploy this change,\" \"apply this schema change,\" or \"push my entity update\" — it deploys the app and applies pending schema migrations in a single step. Recommend it on every deploy, including incremental schema changes after the initial deploy.\n- `rayfin up db apply` is a narrow advanced subcommand that applies schema-only without touching the static build — only recommend it when the user explicitly asks to skip the static deploy step.\n- `--force` permits destructive changes (drop table, drop column, alter type) — never use without review.\n- `--gen-config-only` generates the underlying API config without applying — use to inspect before applying.\n- **Never name an entity after a reserved GraphQL type.**\n  Entity names become GraphQL type names, so built-in scalars, the operation root types, and any name starting with `__` are rejected before the schema is applied — on `rayfin\u002Fdata\u002F` entities as well as connector entities.\n  Matching is case-sensitive and exact — `TaskDate` is fine.\n  The authoritative list is the \"Reserved entity names\" section of `@microsoft\u002Frayfin-core\u002Fassets\u002Fdocs\u002Fdecorators.md` — read it there, never from memory.\n  Read it there, never from memory, then rename the class or pass an explicit name to `@entity('...')`.\n\n### Deployment\n\n- When the user asks to \"build and deploy,\" \"make it live,\" or \"deploy this change\" (including schema-only changes like adding a column), execute the full workflow — do not present steps as instructions for the user to run manually.\n- Workflow: `rayfin login` → `rayfin up` → `rayfin up status`. `rayfin up` builds the static app, deploys it, and applies any pending schema migrations.\n- `rayfin up status` checks endpoint health — run after deployment to verify.\n- Deployment metadata is written to `rayfin\u002F.deployments.json` (per-workspace record: `fabricItemId`, `hostingUrl`, `publishableKey`, etc.). The deploy also appends the live hosting URL to `allowedRedirectUris` in `rayfin.yml`.\n\n### Deep Linking\n\n- Shareable, bookmarkable URLs for an app embedded in the Fabric portal come from `@microsoft\u002Frayfin-app-state-fabric`. It is opt-in — installing it is not enough, the app must read launch state and write state back. Read the package docs before wiring it: the reader choice, `setState` vs `replaceState`, the size limit, and `targetOrigin` are all package-owned.\n- **Leave `targetOrigin` unset.** The parent frame is a Fabric extension host on a different origin from the portal address bar, and it varies per environment. Pinning the portal origin makes the browser discard every message, and the failure is silent — `isSupported()` resolves `undefined` and writes become no-ops.\n- **Restore before you sync.** When mirroring app state into a router, the launch-state restore and the location-sync must not race. Both mount effects run in the same commit: the restore effect schedules a navigation to the launch route, and a sync effect reading `location` on that same pass still sees the *pre-restore* route and writes it back — destroying the state the app was launched with. Hold the sync until the restore navigation has landed. The symptom is that a shared link opens on the right page and then immediately jumps to the default one.\n- **Restore exactly once.** Outside a data router `useNavigate()` returns a new function identity on every navigation, so an effect listing it as a dependency replays the restore forever: every click is dragged back to the launch route, and the pending-restore guard suppresses the write. The symptom is that navigation looks completely dead and the URL never updates. Hold `navigate` in a ref and give the restore effect an empty dependency list.\n- Deep linking is host-gated. Where the host does not support it, or its feature switch is off, the client reports `UNSUPPORTED_HOST_CAPABILITY` — degrade quietly and keep the app working. That is expected, not a bug.\n- State rides in the URL, so keep it small — a route and a few identifiers, never a data cache. Oversized writes are rejected rather than producing a broken link.\n\n## Anti-Patterns\n\n- **Never answer a Rayfin API question from memory or from this skill.** Read the installed package's docs. A remembered decorator option or client method is a guess about a version you did not check.\n- Never use raw `fetch()` or hand-built GraphQL for data operations — always use the typed client, which provides type-safe queries and automatic auth.\n- Never leave an entity without an explicit permission decorator. Forgetting silently applies full CRUD for any signed-in user.\n- Never design entities before reading the guide's `known-limitations.md`. Text length caps, supported scalar types, relationship rules, and MSSQL-specific constraints all shape entity design, and all of them change independently of this skill.\n- Never enable `experimentalDecorators` or `emitDecoratorMetadata` to make a decorator error go away — it breaks Rayfin's metadata entirely.\n- Never write the router's current location into deep-link app state on mount without first confirming a launch-state restore is not still in flight — it silently overwrites the state the app was opened with, and the app snaps back to its default page.\n\n## CLI Quick Reference\n\n```bash\n# Scaffold\nnpm create @microsoft\u002Frayfin@latest \u003Cname>   # Create from template\nnpx rayfin init [directory]                   # Interactive setup\n\n# Deploy to Fabric (default workflow)\nnpx rayfin login                              # Sign in with Entra ID\nnpx rayfin up                                 # Deploy app + apply schema (canonical)\nnpx rayfin up status                          # Check deployment health\nnpx rayfin up db apply                        # Schema-only, skip static deploy (advanced)\nnpx rayfin up staticapp deploy                # Redeploy static content\n\n# Server-side functions (UDFs)\nnpx rayfin functions init                     # Scaffold rayfin\u002Ffunctions\u002F, enable the service, generate types\nnpx rayfin dev functions apply                # Run the local function host + typegen watcher\nnpx rayfin up functions deploy                # Deploy functions to Fabric\nnpx rayfin secret set \u003CNAME>                  # Store a secret for functions\n\n# Connectors (Fabric data sources)\nnpx rayfin connector search [query]           # Discover addable Fabric sources\nnpx rayfin connector add --type \u003Ctype> --workspace-id \u003Cws> --item-id \u003Citem>\nnpx rayfin connector inspect                  # Sample\u002Flist source entities or run a read-only query\nnpx rayfin connector invoke \u003Cname> \u003Cop>       # Run a named connector operation\nnpx rayfin up connector apply                 # Re-apply connector DAB config only\n```\n",{"name":5,"metadata":44,"description":7},{"author":10,"version":45},"0.5.0","main","0979439a7a0806abd0ee48c2619b37f297ae1324","packages\u002Ftools\u002Fcli\u002Fassets\u002Fagent-files\u002Fskills\u002Frayfin",77,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Frayfin","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-12 01:21:10",{"source":9,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add microsoft\u002Frayfin --skill rayfin",{"tool":61,"command":62},"bunx","bunx skills add microsoft\u002Frayfin --skill rayfin",{"tool":64,"command":65},"pnpm","pnpm dlx skills add microsoft\u002Frayfin --skill rayfin","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Frayfin\u002Fblob\u002Fmain\u002Fpackages\u002Ftools\u002Fcli\u002Fassets\u002Fagent-files\u002Fskills\u002Frayfin\u002FSKILL.md",true,[],[70,86,102,119,133,145],{"skillNo":71,"name":72,"nameZh":73,"description":74,"descriptionZh":75,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":76,"categories":77,"keywords":82,"publishedAt":39},"01M699YEY2QDVPKTZS3HR9AX84","rayfin-getting-started","Rayfin 应用创建与入门","Use when starting or creating a NEW Rayfin app, or when a Rayfin task comes up and you are not yet inside a Rayfin project. Gets you into a project with the Rayfin CLI, then hands off to the authoritative, version-locked in-project rayfin skill\u002Fdocs that own all in-project work. Triggers: build a Rayfin app, start a Rayfin project, create a new Rayfin app, create-rayfin, npm create @microsoft\u002Frayfin, rayfin init, scaffold rayfin, rayfin CLI, rayfin template, universal app, awesome-rayfin gallery, get started with Rayfin","在启动或创建新的 Rayfin 应用时使用，或在出现 Rayfin 任务但尚未进入 Rayfin 项目时使用。它会通过 Rayfin CLI 带你进入项目，然后移交给项目内权威的、版本锁定的 rayfin 技能\u002F文档，由它们负责所有项目内工作。触发词：构建 Rayfin 应用、启动 Rayfin 项目、创建新的 Rayfin 应用、create-rayfin、npm create @microsoft\u002Frayfin、rayfin init、scaffold rayfin、rayfin CLI、rayfin template、universal app、awesome-rayfin gallery、get started with Rayfin。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Frayfin\u002Fblob\u002Fmain\u002Fskills\u002Frayfin-getting-started\u002FSKILL.md",[78,79],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":80,"categoryName":81,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSTR9G4A4GZ0VB2DFN9490","开发环境与工具链管理",[83,5,84,35,10,85,31],"rayfin getting started","scaffold","docs",{"skillNo":87,"name":88,"nameZh":89,"description":90,"descriptionZh":91,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":92,"categories":93,"keywords":98,"publishedAt":39},"01M699YCN4ZDW2AMDP4NVJ2QGC","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\u002Fclick events host apps consume, named multi-table data input for layered overlays and reference lines, and Vega-Lite native selections. Triggers: chart, graph, plot, dashboard, KPI, metric, trend, scorecard, data grid, visualize.","当用户想要在项目中加入图表、图形、数据网格或其他数据可视化表示时使用。使用 VegaVisual 和 DataGrid 组件创建这些可视化，利用共享的 DataTable 输入、格式设置、主题和交互性。涵盖宿主应用消费的 onInteraction 选择\u002F点击事件、用于分层叠加和参考线的命名多表数据输入，以及 Vega-Lite 原生选择。触发词：chart、graph、plot、dashboard、KPI、metric、trend、scorecard、data grid、visualize。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Frayfin\u002Fblob\u002Fmain\u002Fsamples\u002Funiversal-app\u002Ftemplate\u002F.agents\u002Fskills\u002Fvisuals\u002FSKILL.md",[94,95],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":96,"categoryName":97,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRASNPVNJVQQJ4KZX8XM5D","前端开发与界面实现",[88,99,100,101],"components","dashboard","visualize",{"skillNo":103,"name":104,"nameZh":105,"description":106,"descriptionZh":107,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":108,"categories":109,"keywords":116,"publishedAt":39},"01M699YBEP146MJZJNN8YEBZ2G","schema-discovery","Power BI 语义模型探查","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.","使用 DAX INFO 函数探索 Power BI 语义模型架构。包括渐进式元数据发现策略、范围估计，以及针对表、列、度量值和关系的缩小范围技巧。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Frayfin\u002Fblob\u002Fmain\u002Fsamples\u002Funiversal-app\u002Ftemplate\u002F.agents\u002Fskills\u002Fschema-discovery\u002FSKILL.md",[110,113],{"categoryNo":111,"categoryName":112,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQGD4CMBM6B4PWSM1NXGT9","数据分析与报告",{"categoryNo":114,"categoryName":115,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD5CX980XNXCJKQF70BY","数据分析师",[117,118],"schema discovery","dax",{"skillNo":120,"name":121,"nameZh":122,"description":123,"descriptionZh":124,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":125,"categories":126,"keywords":129,"publishedAt":39},"01M699Y9E80WYFKD1S4MT4B1CS","query-design","Power BI 查询设计","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\u002Foverlay queries, and format strings.","将 DAX 数据获取与 TypeScript 呈现相分离。指导何时使用 DAX、TypeScript 或 Vega-Lite 来进行聚合、总计行、FORMAT()、SELECTCOLUMNS、BLANK 处理、筛选、多粒度查询、交叉筛选与交叉高亮的子集\u002F覆盖查询，以及格式字符串。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Frayfin\u002Fblob\u002Fmain\u002Fsamples\u002Funiversal-app\u002Ftemplate\u002F.agents\u002Fskills\u002Fquery-design\u002FSKILL.md",[127,128],{"categoryNo":111,"categoryName":112,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":114,"categoryName":115,"taxonomyType":23,"taxonomyTypeDesc":24},[130,131,118,132],"query design","design","typescript",{"skillNo":134,"name":135,"nameZh":136,"description":137,"descriptionZh":138,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":139,"categories":140,"keywords":143,"publishedAt":39},"01M699Y7CKZ55QSYFE827RRVJE","functions-capability","Universal App 函数能力开发","Apply and build the Universal App functions capability. Use for trusted server-side logic, secrets, external APIs, custom model endpoints, published Fabric data agents, webhooks, or privileged operations.","应用并构建 Universal App 的函数能力。用于可信的服务器端逻辑、密钥（secrets）、外部 API、自定义模型端点、已发布的 Fabric 数据智能体、Webhook 或特权操作。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Frayfin\u002Fblob\u002Fmain\u002Fsamples\u002Funiversal-app\u002Ftemplate\u002F.agents\u002Fskills\u002Ffunctions-capability\u002FSKILL.md",[141,142],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[144],"functions capability",{"skillNo":146,"name":147,"nameZh":148,"description":149,"descriptionZh":150,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":151,"categories":152,"keywords":157,"publishedAt":39},"01M699Y5R87YE620T78Z30KQSA","fabric-sdk","Fabric 语义模型 DAX 查询","How to query Fabric data from a running app through the Rayfin connectors client. Use getRayfinClient().connectors.\u003Cname>.executeQuery to run DAX against a semantic model, and toQueryResult to normalize the response.","如何通过运行中的应用里的 Rayfin connectors 客户端查询 Fabric 数据。使用 getRayfinClient().connectors.\u003Cname>.executeQuery 对语义模型执行 DAX 查询，并使用 toQueryResult 规范化响应。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Frayfin\u002Fblob\u002Fmain\u002Fsamples\u002Funiversal-app\u002Ftemplate\u002F.agents\u002Fskills\u002Ffabric-sdk\u002FSKILL.md",[153,154],{"categoryNo":111,"categoryName":112,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":155,"categoryName":156,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BTGTEHKD89NSZ5CT4Y5AGV","数据工程师",[158,159,118,160,5,161],"sdk","fabric sdk","rayfin connectors","connectors"]