AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Firebase Data Connect

skill-evanca-flutter-ai-rules-firebase-data-connect · by evanca

Use when setting up Data Connect, writing GraphQL queries/mutations, configuring generated SDKs, handling offline, or applying security rules.

No reviews yet
0 installs
11 views
0.0% view→install

Install

$ agentstack add skill-evanca-flutter-ai-rules-firebase-data-connect

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-evanca-flutter-ai-rules-firebase-data-connect)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
11d ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Firebase Data Connect? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

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:

``graphql 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

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.