AGENT SKILL

Rayfin 存储

rayfin-storage

仅当用户明确要求使用实验性的 Rayfin Storage,或项目已启用该功能时使用。触发词:Rayfin Storage、@microsoft/rayfin-storage、@blob、StorageObject、StorageClient、StorageFolderClient、createStorageClient、rayfin/storage、rayfin dev storage apply、rayfin up storage apply

使用场景云存储管理
License 许可
MIT
所属仓库
microsoft/rayfin
最近更新
2026-11-12
Stars
★ 662
Forks
77

01 前言 Front Matter

name
rayfin-storage
metadata
{ "author": "microsoft", "version": "0.1.0" }
description
Use only when the user explicitly requests experimental Rayfin Storage or the project already enables it. Triggers: Rayfin Storage, @microsoft/rayfin-storage, @blob, StorageObject, StorageClient, StorageFolderClient, createStorageClient, rayfin/storage, rayfin dev storage apply, rayfin up storage apply

03 SKILL.md 正文

Rayfin Storage

Rayfin Storage is experimental. Do not select or suggest it for a generic file-upload request unless the user explicitly names Rayfin Storage or the project already enables services.storage.enabled.

Bootstrap

If @microsoft/rayfin-storage is missing, install the version compatible with the project's Rayfin packages before writing Storage code.

Enable Storage in rayfin/rayfin.yml:

services:
  storage:
    enabled: true

Version-matched documentation

Read node_modules/@microsoft/rayfin-storage/package.json, resolve rayfinDocs.dir, and read its index.md before changing Storage declarations or client code. If direct file access is unavailable, use rayfin docs get --module rayfin-storage --path index.md or the equivalent Rayfin MCP get_doc call.

Storage folders use Core's shared @role() decorator and policy DSL. Read node_modules/@microsoft/rayfin-core/assets/docs/permissions.md for that API. Do not infer operation signatures, decorator options, result shapes, or error codes from this skill.

Guardrails

  • Import blob, StorageObject, ContentTypes, and byte-size helpers from @microsoft/rayfin-core/experimental while Storage remains experimental.
  • Give every folder at least one authenticated permission decorator; configuration apply rejects folders with no rules, and anonymous Storage permissions are unsupported.
  • Treat authorization policies as the security boundary; prefixes organize paths but do not grant access.
  • Omit prefix by default. Add it only when the user explicitly requires path partitioning or the existing application design establishes one; never derive a user-ID prefix merely because authentication is available. If the requirement is unclear, keep the object at the folder root and tell the user that no prefix was added.
  • Keep an explicit @blob({ name }) value aligned with its Storage schema key.
  • Send decorated application metadata through upload({ fields }); intrinsic object fields are server-managed.
  • Access listed custom fields at the top level because the SDK flattens the service's fields envelope.
  • Use the typed Storage client rather than constructing Storage HTTP or SAS requests directly.

Commands

npm install @microsoft/rayfin-storage  # Install the SDK separately
npx rayfin dev storage apply           # Apply folder configuration locally
npx rayfin up                          # Deploy and apply enabled services
npx rayfin up storage apply            # Re-apply cloud Storage configuration only

Use --force only after reviewing and accepting destructive configuration changes.

04 同仓库更多 Skills

microsoft
microsoft/rayfin

Rayfin 应用创建与入门

rayfin-getting-started

在启动或创建新的 Rayfin 应用时使用,或在出现 Rayfin 任务但尚未进入 Rayfin 项目时使用。它会通过 Rayfin CLI 带你进入项目,然后移交给项目内权威的、版本锁定的 rayfin 技能/文档,由它们负责所有项目内工作。触发词:构建 Rayfin 应用、启动 Rayfin 项目、创建新的 Rayfin 应用、create-rayfin、npm create @microsoft/rayfin、rayfin init、scaffold rayfin、rayfin CLI、rayfin template、universal app、awesome-rayfin gallery、get started with Rayfin。

软件开发工程师开发环境与工具链管理
★ 662
microsoft
microsoft/rayfin

数据可视化图表实现

visuals

当用户想要在项目中加入图表、图形、数据网格或其他数据可视化表示时使用。使用 VegaVisual 和 DataGrid 组件创建这些可视化,利用共享的 DataTable 输入、格式设置、主题和交互性。涵盖宿主应用消费的 onInteraction 选择/点击事件、用于分层叠加和参考线的命名多表数据输入,以及 Vega-Lite 原生选择。触发词:chart、graph、plot、dashboard、KPI、metric、trend、scorecard、data grid、visualize。

软件开发工程师前端开发与界面实现
★ 662
microsoft
microsoft/rayfin

Power BI 语义模型探查

schema-discovery

使用 DAX INFO 函数探索 Power BI 语义模型架构。包括渐进式元数据发现策略、范围估计,以及针对表、列、度量值和关系的缩小范围技巧。

数据分析师数据分析与报告
★ 662
microsoft
microsoft/rayfin

Power BI 查询设计

query-design

将 DAX 数据获取与 TypeScript 呈现相分离。指导何时使用 DAX、TypeScript 或 Vega-Lite 来进行聚合、总计行、FORMAT()、SELECTCOLUMNS、BLANK 处理、筛选、多粒度查询、交叉筛选与交叉高亮的子集/覆盖查询,以及格式字符串。

数据分析师数据分析与报告
★ 662
microsoft
microsoft/rayfin

Universal App 函数能力开发

functions-capability

应用并构建 Universal App 的函数能力。用于可信的服务器端逻辑、密钥(secrets)、外部 API、自定义模型端点、已发布的 Fabric 数据智能体、Webhook 或特权操作。

软件开发工程师代码实现
★ 662
microsoft
microsoft/rayfin

Fabric 语义模型 DAX 查询

fabric-sdk

如何通过运行中的应用里的 Rayfin connectors 客户端查询 Fabric 数据。使用 getRayfinClient().connectors.<name>.executeQuery 对语义模型执行 DAX 查询,并使用 toQueryResult 规范化响应。

数据工程师数据分析与报告
★ 662