Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计通过

firebase-data-connectFirebase 数据 connect

Agent Skill

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

总安装

194

周安装

8

GitHub Stars

537

下载量

63
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/evanca/flutter-ai-rules --skill firebase-data-connect

简介

firebase-data-connect 指导 Flutter 应用使用 Firebase Data Connect 进行类型安全的数据操作。

  • 适用于数据库查询、突变操作、离线处理等后端集成场景,提供 SDK 生成和错误处理方案。
  • 使用时需配置 schema、编写 queries/mutations,并处理网络异常和数据一致性。
  • 安装前请确认仓库权限和维护状态,避免在生产环境直接操作敏感数据,建议先测试环境验证。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Firebase Data Connect Skill

This skill defines how to correctly use Firebase Data Connect in Flutter applications.

When to Use

Use this skill when:

  • Setting up and configuring Firebase Data Connect in a Flutter project.
  • Designing schemas, queries, and mutations for Data Connect.
  • Implementing generated SDK calls for typed queries and mutations.
  • Handling network failures, data inconsistencies, and offline scenarios.
  • Applying security and performance best practices.

1. Setup and Configuration

Step 1: Install the package

flutter pub add firebase_data_connect

Step 2: Import and initialize

import 'package:firebase_data_connect/firebase_data_connect.dart';
import 'package:firebase_core/firebase_core.dart';
import 'firebase_options.dart';

await Firebase.initializeApp(
  options: DefaultFirebaseOptions.currentPlatform,
);

Step 3: Define a schema in dataconnect/schema/schema.gql

type Movie @table {
  id: UUID! @default(expr: "uuidV4()")
  title: String!
  releaseYear: Int
  genre: String
  rating: Float
  description: String
}

Step 4: Define queries and mutations in dataconnect/connector/queries.gql

query ListMovies @auth(level: PUBLIC) {
  movies {
    id
    title
    releaseYear
    genre
    rating
  }
}

mutation CreateMovie($title: String!, $releaseYear: Int, $genre: String) @auth(level: USER) {
  movie_insert(data: {
    title: $title
    releaseYear: $releaseYear
    genre: $genre
  })
}

mutation DeleteMovie($id: UUID!) @auth(level: USER) {
  movie_delete(id: $id)
}

Step 5: Generate the typed Flutter SDK

flutterfire generate

This produces typed Dart classes for each query and mutation.

Platform support:

PlatformSupport
iOSFull
AndroidFull
WebFull
Other platformsNot supported

2. Executing Queries and Mutations

Use the generated SDK to execute typed queries and mutations:

// Execute a query
final result = await ListMoviesQuery().execute();
final movies = result.data.movies;

// Execute a mutation
await CreateMovieMutation(title: 'Inception', releaseYear: 2010, genre: 'Sci-Fi')
    .execute();

// Delete by ID
await DeleteMovieMutation(id: movieId).execute();

Real-Time Listeners

Subscribe to query changes for live updates:

final subscription = ListMoviesQuery().subscribe();
subscription.listen((result) {
  final movies = result.data.movies;
  // Update UI with latest movie list
});

3. Performance and Caching

  • Design efficient queries requesting only the fields needed to minimize data transfer.
  • Implement pagination for large datasets: query ListMoviesPaginated($limit: Int!, $offset: Int!) @auth(level: PUBLIC) {movies(limit: $limit, offset: $offset) {id title releaseYear}}
  • Use real-time listeners judiciously to avoid unnecessary network usage.
  • Consider offline capabilities for critical app functionality by caching query results locally.

4. Error Handling

Wrap Data Connect calls in try/catch to handle network and validation errors:

try {
  final result = await ListMoviesQuery().execute();
  return result.data.movies;
} on FirebaseException catch (e) {
  if (e.code == 'unavailable') {
    // Handle offline — return cached data
    return _localCache.getMovies();
  }
  rethrow;
}
  • Implement retry logic with exponential backoff for transient connection errors.
  • Provide meaningful error messages for data validation failures.
  • Monitor error rates and investigate recurring issues.

5. Security

  • Use @auth directives in schema to control access levels (PUBLIC, USER, NO_ACCESS).
  • Integrate Firebase Authentication for user-based access control.
  • Validate data on both client and server sides.
  • Follow data privacy best practices when handling user information.

References

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

34.5%
按下载量换算22

Claude

30.3%
按下载量换算19

Cursor

21.35%
按下载量换算13

Gemini CLI

9.62%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills