Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计通过

firebase-data-connectFirebase 数据 connect

Agent Skill

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

总安装

869,616

周安装

36,560

GitHub Stars

262

下载量

304,512
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:firebase-data-connect(Firebase 数据 connect)
来源仓库:https://github.com/firebase/agent-skills
仓库路径:skills/firebase-data-connect
安装命令:
npx skills add https://github.com/firebase/agent-skills --skill firebase-data-connect
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/firebase/agent-skills --skill firebase-data-connect

简介

PostgreSQL 支持的 GraphQL 后端,具有自动生成的类型安全 SDK,适用于 Web、移动设备和 Flutter。

  • 使用 @table 定义 GraphQL 架构
  • 装饰者和关系; Data Connect 自动生成 SQL 和 GraphQL 操作
  • 在 GraphQL 中编写查询和突变,并支持过滤、排序、分页和更新插入;通过@transaction可进行交易
  • 使用@auth 安全操作
  • 使用 @check 的级别(PUBLIC、USER、NO_ACCESS)和行级控制
  • 和@redact
  • 为 TypeScript、Kotlin、Swift 和 Dart 生成类型安全的 SDK,并提供嵌套数据访问和本地模拟器支持以进行开发

SKILL.md

Firebase SQL Connect

Firebase SQL Connect is a relational database service using Cloud SQL for PostgreSQL with GraphQL schema, auto-generated queries/mutations, and type-safe SDKs.

[!NOTE] Product Rename: Firebase Data Connect was renamed to Firebase SQL Connect. All instructions, references, and examples in this skill repository referring to "Data Connect" or "Firebase Data Connect" apply to "SQL Connect" and "Firebase SQL Connect" as well.

Project Structure

dataconnect/
├── dataconnect.yaml      # Service configuration
├── schema/
│   └── schema.gql        # Data model (types with @table)
└── connector/
    ├── connector.yaml    # Connector config + SDK generation
    ├── queries.gql       # Queries
    └── mutations.gql     # Mutations

Key Tools for Validation

Rely on these two mechanisms to ensure project correctness:

  1. Review GraphQL Schema: Both user-defined and generated extensions (in .dataconnect/schema/main/).
  2. Validate Operations: Run npx -y firebase-tools@latest dataconnect:compile against the schema.

Operation Strategies: GraphQL vs. Native SQL

Always default to Native GraphQL. Native SQL lacks type safety and bypasses schema-enforced structures. Only use Native SQL when the user explicitly requests it or when the task requires advanced database features.

StrategyWhen to useImplementation
Native GraphQL (Default)Almost all use cases. Standard CRUD, basic filtering/sorting, simple relational joins. Requires full type safety.Auto-generated fields (movie_insert, movies). Strong typing and schema enforcement.
Native SQL (Advanced)PostgreSQL extensions (e.g., PostGIS), window functions (RANK()), complex aggregations, or highly tuned sub-queries.Raw SQL string literals via _select, _execute, etc. Requires strict positional parameters ($1). No type safety.

Development Workflow

Follow this strict workflow to build your application. You must read the linked reference files for each step to understand the syntax and available features.

1. Define Data Model (schema/schema.gql)

Define your GraphQL types, tables, and relationships (which map to a Postgres schema).

Read reference/schema.md for: - @table, @col, @default - Relationships (@ref, one-to-many, many-to-many) - Data types (UUID, Vector, JSON, etc.)

2. Define Authorized Operations (connector/queries.gql, connector/mutations.gql)

Write the queries and mutations your client will use, including authorization logic. SQL Connect is secure by default.

Read reference/operations.md for: - Queries: Filtering (where), Ordering (orderBy), Pagination (limit/offset). - Mutations: Create (_insert), Update (_update), Delete (_delete). - Upserts: Use _upsert to "insert or update" records (CRITICAL for user profiles). - Transactions: Use @transaction for multi-step atomic operations. Use _expr: "response.<prevStep>" to pass data between steps. Read reference/security.md for authorization: - @auth(level:...) for PUBLIC, USER, or NO_ACCESS. - @check and @redact for row-level security and validation. Read reference/native_sql.md for Native SQL operations: - Embedding raw SQL with _select, _selectFirst, _execute - Strict rules for positional parameters ($1, $2), quoting, and CTEs - Advanced PostgreSQL features (PostGIS, Window Functions)

3. Use type-safe SDK in your apps

Generate type-safe code for your client platform.

Read reference/sdks.md for: - Android (Kotlin), iOS (Swift), Web (TypeScript), Flutter (Dart). - How to initialize and call your queries/mutations. - Nested Data: See how to access related fields (e.g., movie.reviews).

4. Add Real-time Subscriptions (Optional)

Enable live data updates to push changes to connected clients.

Read reference/realtime.md for: - @refresh directive for time-based polling and event-driven updates. - CEL conditions to scope refresh triggers precisely.

Feature Capability Map

If you need to implement a specific feature, consult the mapped reference file:

FeatureReference FileKey Concepts
Data Modelingreference/schema.md@table, @unique, @index, Relations
Vector Searchreference/advanced.mdVector, @col(dataType: "vector")
Full-Text Searchreference/advanced.md@searchable
Upserting Datareference/operations.md_upsert mutations
Complex Filtersreference/operations.md_or, _and, _not, eq, contains
Transactionsreference/operations.md@transaction, response binding
Environment Configreference/config.mddataconnect.yaml, connector.yaml
Realtime Subscriptionsreference/realtime.md@refresh, subscribe(), auto-refresh
Starter Templatestemplates.mdCRUD, user-owned resources, many-to-many, SDK init

Deployment & CLI

Read reference/config.md for deep dive on configuration.

Follow these patterns based on your current task:

How to initialize SQL Connect in a Firebase project

  1. Understand the app idea. Ask clarification questions if unclear.
  2. Run npx -y firebase-tools@latest init dataconnect.
  3. Validate that the app template and generated SDK are setup.

How to build apps using SQL Connect locally

  1. Start the emulator: npx -y firebase-tools@latest emulators:start --only dataconnect.
  2. Write schema and operations.
  3. Run npx -y firebase-tools@latest dataconnect:compile or npx -y firebase-tools@latest dataconnect:sdk:generate to validate them.
  4. Use the operations in your app and build it.

How to deploy SQL Connect to Cloud SQL

  1. Run npx -y firebase-tools@latest deploy --only dataconnect.

Examples

For complete, working code examples of schemas and operations, see examples.md.

For ready-to-use starter templates (CRUD, user-owned resources, many-to-many, YAML configs, SDK init), see templates.md.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.55%
按下载量换算105,209

Claude

32.97%
按下载量换算100,398

Cursor

20.03%
按下载量换算60,994

Gemini CLI

10.29%
按下载量换算31,334

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills