firebase-data-connect
Use when setting up Data Connect, writing GraphQL queries/mutations, configuring generated SDKs, handling offline, or applying security rules.
Install / Use
npx skills add evanca/flutter-ai-rules --skill firebase-data-connectInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
SecuritySupported Platforms
Our assessment of firebase-data-connect
firebase-data-connect scores 87/100 on our quality scale, 615th of 1,086 Security skills we index.
Its SKILL.md is 4.3 KB long, well organised into 14 sections with 8 code examples: a solid amount of guidance for an agent.
It has 646 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated 19 days ago, so firebase-data-connect is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
firebase-data-connect compared with similar skills
All 4 of these similar skills score higher than firebase-data-connect; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| firebase-data-connect (this skill)by evanca | 87 | 646 | 19d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 12d ago | SKILL.md |
| ui-ux-pro-maxby nextlevelbuilder | 100 | 130.2k | 12d ago | SKILL.md |
Frequently asked questions
- How do I install firebase-data-connect?
- Run
npx skills add evanca/flutter-ai-rules --skill firebase-data-connect. The install tabs above show the steps for each supported agent. - Which AI agents does firebase-data-connect work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is firebase-data-connect safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is firebase-data-connect still maintained?
- The repository was last updated 19 days ago, so firebase-data-connect is actively maintained.
Skill content
View source on GitHubname: firebase-data-connect description: "Use when setting up Data Connect, writing GraphQL queries/mutations, configuring generated SDKs, handling offline, or applying security rules." license: MIT
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:
| Platform | Support | |---|---| | iOS | Full | | Android | Full | | Web | Full | | Other platforms | Not 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
@authdirectives 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
Related Skills
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
ui-ux-pro-max
130.2kUI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing, or fixing interfaces, including pages, components, design systems, accessibility, interaction, responsive layout, typography, color, charts, and stack-specific UI implementation.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
