accessibility
Use when working on accessibility, a11y, WCAG, ARIA, screen readers, keyboard nav, focus order, contrast, alt text, captions, reduced motion, or target sizes;…
Use when setting up Firestore, designing schemas, doing CRUD, creating listeners, paginating queries, configuring indexes, enabling offline persistence, or writing security rules.
$ npx -y skills add evanca/flutter-ai-rules --skill firebase-cloud-firestore --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/firebase-cloud-firestoreContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when setting up Firestore, designing schemas, doing CRUD, creating listeners, paginating queries, configuring indexes, enabling offline persistence, or writing security rules.
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
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, reduced motion, or target sizes;…
Use when creating a feature, designing folder structure, adding repositories/services/view models, wiring dependency injection, or deciding which layer owns…
Use when creating a Cubit or Bloc, modeling state with sealed classes or status enums, wiring BlocBuilder/BlocListener/BlocProvider, writing bloc tests, or…
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 values, or modernizing…
Use when building AI agents in Dart, implementing Genkit flows or tools, integrating LLMs into Dart or Flutter applications, or using Genkit Dart plugins.