accessibility
Use when working on accessibility, a11y, WCAG, ARIA, screen readers, keyboard nav, focus order, contrast, alt text, captions,…
Use when setting up Firestore, designing schemas, doing CRUD, creating listeners, paginating queries, configuring indexes, enabling offline persistence, or writing security rules.
Claude Code
$ npx -y skills add evanca/flutter-ai-rules --skill firebase-cloud-firestore --agent claude-code
Codex
$ npx skills add evanca/flutter-ai-rules --skill firebase-cloud-firestore -a codex -y
Cursor
$ npx skills add evanca/flutter-ai-rules --skill firebase-cloud-firestore -a cursor -y
Gemini CLI
$ npx skills add evanca/flutter-ai-rules --skill firebase-cloud-firestore -a gemini-cli -y
GitHub Copilot
$ npx skills add evanca/flutter-ai-rules --skill firebase-cloud-firestore -a github-copilot -y
OpenCode
$ npx skills add evanca/flutter-ai-rules --skill firebase-cloud-firestore -a opencode -y
Windsurf
$ npx skills add evanca/flutter-ai-rules --skill firebase-cloud-firestore -a windsurf -y
name: firebase-cloud-firestore description: "Use when setting up Firestore, designing schemas, doing CRUD, creating listeners, paginating queries, configuring indexes, enabling offline persistence, or writing security rules." license: MIT
This skill defines how to correctly implement Cloud Firestore in Flutter applications, covering data modeling, queries, real-time updates, security rules, and scale optimization.
Use this skill when:
---
Choose **Cloud Firestore** when the app needs:
Use **Realtime Database** instead for simple data models requiring simple lookups and extremely low-latency synchronization (typical response times under 10ms).
---
flutter pub add cloud_firestore
> **Security (eMudhra CA fix):** Use Dart ≥ 3.13.7 and Flutter ≥ 3.47.8 > (advisory [GHSA-frr6-h895-5pxp](https://github.com/dart-lang/sdk/security/advisories/GHSA-frr6-h895-5pxp)). > For **Apple or Windows targets using Firestore**, also upgrade > `cloud_firestore` to **≥ 7.1.0** (FlutterFire BoM ≥ 5.1.0) and run > `flutter pub upgrade`, then rebuild and redeploy.
import 'package:cloud_firestore/cloud_firestore.dart'; final db = FirebaseFirestore.instance; // after Firebase.initializeApp()
**Location:**
**iOS/macOS:** Consider pre-compiled frameworks to improve build times:
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => 'IOS_SDK_VERSION'
**Offline persistence** is enabled by default on mobile. Configure cache size:
FirebaseFirestore.instance.settings = const Settings( persistenceEnabled: true, cacheSizeBytes: Settings.CACHE_SIZE_UNLIMITED, );
---
final docRef = await db.collection("users").add({
'name': 'Ada Lovelace',
'email': 'ada@example.com',
'created_at': FieldValue.serverTimestamp(),
});
print('Created document with ID: ${docRef.id}');---
---
final querySnapshot = await db.collection("users").get();
for (var doc in querySnapshot.docs) {
print("${doc.id} => ${doc.data()}");
}final query = db.collection("users")
.where("age", isGreaterThanOrEqualTo: 18)
.orderBy("age")
.limit(20);
final results = await query.get();// First page
final first = db.collection("cities").orderBy("name").limit(25);
final firstSnapshot = await first.get();
// Next page using last document as cursor
final lastDoc = firstSnapshot.docs.last;
final next = db.collection("cities")
.orderBy("name")
.startAfterDocument(lastDoc)
.limit(25);await db.collection("users").doc("user_1").set({
'name': 'Grace Hopper',
'updated_at': FieldValue.serverTimestamp(),
});final batch = db.batch();
batch.set(db.collection("cities").doc("LA"), {'name': 'Los Angeles'});
batch.update(db.collection("cities").doc("SF"), {'population': 860000});
batch.delete(db.collection("cities").doc("OLD"));
await batch.commit();await db.runTransaction((transaction) async {
final snapshot = await transaction.get(db.collection("counters").doc("visits"));
final currentCount = snapshot.get("count") as int;
transaction.update(snapshot.reference, {"count": currentCount + 1});
});36 Flutter and Dart skills your coding agent loads by itself, sourced only from official documentation. A skill is a folder with a SKILL.md file.
Use when working on accessibility, a11y, WCAG, ARIA, screen readers, keyboard nav, focus order, contrast, alt text, captions,…
Use when creating a feature, designing folder structure, adding repositories/services/view models, wiring dependency injection,…
Use when creating a Cubit or Bloc, modeling state with sealed classes or status enums, wiring…
Use when asked to review a PR, MR, branch, or diff, audit changed files, or check code quality.
Use when writing switch statements, refactoring if-else chains, creating data classes, choosing records vs classes, destructuring…
Use when building AI agents in Dart, implementing Genkit flows or tools, integrating LLMs into Dart or Flutter applications, or…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.