rayfin
Skill1 starsChanged 53 days agoMITView on GitHub
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
- Deletes or force-pushes
6 other projects use a version of this, 4 of them edited.
Adopted by
Most recently taken up by
- microsoft/frontiertour27-LTG291-turn-your-data-into-production-apps-with-rayfinedited, first seen Oct 17, 2026
- microsoft/frontiertour27-BRK390-building-ai-applications-with-microsoft-databases-and-fabricword for word, first seen Oct 17, 2026
- microsoft/rayfinedited, first seen Oct 13, 2026
- microsoft/trivia-challengeword for word, first seen Sep 24, 2026
- microsoft/aitour27-LTG291-turn-your-data-into-production-apps-with-rayfinedited, first seen Aug 31, 2026
- microsoft/awesome-rayfinedited, first seen May 30, 2026
Other versions6 projects use a version of this.
Word for word · 2
Edited · 4
- microsoft/rayfin★ 64659% same
- microsoft/awesome-rayfin★ 11443% same
- microsoft/aitour27-LTG291-turn-your-data-into-production-apps-with-rayfin★ 243% same
- microsoft/frontiertour27-LTG291-turn-your-data-into-production-apps-with-rayfin★ 243% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- src/caldova-insights/AGENTS.mdAGENTS.md
- caldova-demoSkill
- demo-security-reviewSkill
- caldova-campaign-planningSkill
- app-designSkill
- app-validationSkill
- dax-authoringSkill
- fabric-cliSkill
- fabric-sdkSkill
- playwright-cliSkill
- query-designSkill
- rayfin-functionsSkill
- schema-discoverySkill
- visualsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 1 is common, 4 are distinctive, and 9 are very specific to this project.
1
Common
Most of the 4 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Read the docs from disk before you write Rayfin code, and before you reach for a documentation lookup tool.
- Very specific: line 20
Read node_modules/@microsoft/<package>/package.json and check for a rayfinDocs field.
- Very specific: line 23
Read <docs-root>/index.md and follow its links.
- Distinctive: line 24
Read the file that answers the question.
- Very specific: line 33
Not every installed package carries docs.
- Distinctive: line 42
Only two things justify a tool call, because a file read cannot do them.
- Very specific: line 51
Run either from the project root so the project's own node_modules wins.
- Very specific: line 66
Prefer npm create @microsoft/rayfin@latest for new projects — it generates correct tsconfig and schema boilerplate.
- Very specific: line 72
Keep allowedRedirectUris in rayfin.yml tightly scoped to your app's origin.
- Common: line 91
When the user asks to "build and deploy," "make it live," or "deploy this change" (including schema-only changes like adding a column), …
- Very specific: line 99
Never use raw fetch() or hand-built GraphQL for data operations — always use the typed client, which provides type-safe queries and …
- Distinctive: line 100
Never leave an entity without an explicit permission decorator.
- Very specific: line 101
Never design entities before reading the guide's known-limitations.md.
- Very specific: line 102
Never enable experimentalDecorators or emitDecoratorMetadata to make a decorator error go away — it breaks Rayfin's metadata entirely.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Rayfin
Rayfin Docs — read them from node_modules first
Rayfin packages that declare a rayfinDocs field in their package.json
ship their documentation inside the installed package. It describes the
exact versions this project has, which this skill cannot — decorators, field
options, client methods, and platform constraints all move between releases.
Read the docs from disk before you write Rayfin code, and before you reach for
a documentation lookup tool.
- Read
node_modules/@microsoft/<package>/package.jsonand check for arayfinDocsfield. If it is there, take the docs root fromrayfinDocs.dir(today, alwaysassets/docs). - Read
<docs-root>/index.mdand follow its links. - Read the file that answers the question.
| Your question is about… | Read |
| Decorators, field options, entity and permission metadata | @microsoft/rayfin-core/assets/docs/ |
| Client queries, mutations, paging, field nullability | @microsoft/rayfin-data/assets/docs/ |
| Guides, data modelling, permissions, auth, CLI workflows | @microsoft/rayfin-guide/assets/docs/ |
| Client composition and configuration | @microsoft/rayfin-client/assets/docs/ |
Not every installed package carries docs. @microsoft/rayfin-cli has no
rayfinDocs field — questions about the CLI, its commands, or deployment
workflows are answered by @microsoft/rayfin-guide. Do not stop because a
package has no docs root of its own; go to the guide.
Do not answer a Rayfin question from this skill when a package doc covers it. This skill owns workflow, guardrails, and the CLI surface. The packages own their own behaviour.
Only two things justify a tool call, because a file read cannot do them. Reach for the CLI first — it is always available in a Rayfin project:
- Ranked search, when the index files do not tell you which file to open —
rayfin docs search '<topic>', orsearch_docs(query, module)via MCP (if already installed). - Finding a package you do not have —
rayfin docs discover '<topic>', ordiscover_packages(query)via MCP (if already installed).
Run either from the project root so the project's own node_modules wins. If
rayfin is not on PATH, use npx -y @microsoft/rayfin-cli docs ....
Before creating entities or writing queries, read known limitations. It is short, and it is where the platform states what it will not do:
node_modules/@microsoft/rayfin-guide/assets/docs/known-limitations.mdRules
Platform
- Rayfin uses TC39 Stage 3 decorators — never enable
experimentalDecoratorsoremitDecoratorMetadata. This is an invariant, not a version detail; tsconfig specifics are in the guide's project-structure doc. - Prefer
npm create @microsoft/rayfin@latestfor new projects — it generates correct tsconfig and schema boilerplate.
Security
- 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/assets/docs/permissions.mdand the guide'sdata/permissions.md— read them rather than recalling them. - Publishable keys (
pk-*) are safe for client-side code — never expose service secrets or connection strings. - Keep
allowedRedirectUrisinrayfin.ymltightly scoped to your app's origin. - Email/password auth is local development only — deployed Fabric apps support Fabric SSO (Entra ID) exclusively.
- Fabric SSO only works inside the Fabric Portal — do not attempt it in local development.
Project Layout
- Entities live in
rayfin/data/, one file per entity, and every one is registered inrayfin/data/schema.ts. An entity that is not registered does not exist as far as the client is concerned. - Configuration lives in
rayfin/rayfin.yml. Enabling the data service requires a dialect. - The decorator surface, field options, relationships, and the client query API are package-owned. Read
rayfin-core/assets/docs/decorators.md, the guide'sdata/overview.md, anddata/graphql.md. Do not write entities or queries from memory — the option names and constraints have changed between releases, and the doc innode_modulesis the version this project has.
Schema
- For Fabric:
rayfin upis 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. rayfin up db applyis 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.--forcepermits destructive changes (drop table, drop column, alter type) — never use without review.--gen-config-onlygenerates the underlying API config without applying — use to inspect before applying.
Deployment
- 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.
- Workflow:
rayfin login→rayfin up→rayfin up status.rayfin upbuilds the static app, deploys it, and applies any pending schema migrations. rayfin up statuschecks endpoint health — run after deployment to verify.- Deployment metadata is written to
rayfin/.deployments.json(per-workspace record:fabricItemId,hostingUrl,publishableKey, etc.). The deploy also appends the live hosting URL toallowedRedirectUrisinrayfin.yml.
Anti-Patterns
- 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.
- Never use raw
fetch()or hand-built GraphQL for data operations — always use the typed client, which provides type-safe queries and automatic auth. - Never leave an entity without an explicit permission decorator. Forgetting silently applies full CRUD for any signed-in user.
- 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. - Never enable
experimentalDecoratorsoremitDecoratorMetadatato make a decorator error go away — it breaks Rayfin's metadata entirely.
CLI Quick Reference
# Scaffold
npm create @microsoft/rayfin@latest <name> # Create from template
npx rayfin init [directory] # Interactive setup
# Deploy to Fabric (default workflow)
npx rayfin login # Sign in with Entra ID
npx rayfin up # Deploy app + apply schema (canonical)
npx rayfin up status # Check deployment health
npx rayfin up db apply # Schema-only, skip static deploy (advanced)
npx rayfin up staticapp deploy # Redeploy static contentDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

