mobile-flutter-firebase

Connects Flutter apps to Firebase and generates decoupled Auth, Firestore, and Storage repositories with default-deny security rules.

1|Updated Jul 7, 2026
One-click install
npx skills add https://github.com/codjeremias-cell/Orquestrador-fable --skill mobile-flutter-firebase-codjeremias-cell
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mobile-flutter-firebase
Source: https://github.com/codjeremias-cell/Orquestrador-fable/tree/main/skills/mobile-flutter-firebase
Command: npx skills add https://github.com/codjeremias-cell/Orquestrador-fable --skill mobile-flutter-firebase-codjeremias-cell

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Wiring Firebase into a Flutter app by hand is error-prone: hand-edited firebase_options.dart files, auth streams chosen at random, SDK types leaking into the UI, and Firestore security rules left wide open. This Skill connects a Flutter app to Firebase deterministically and generates repository layers plus security rules that act as the real backend firewall. ## Core Features & Use Cases - Deterministic Firebase setup: Runs flutterfire configure to generate firebase_options.dart and registers apps per platform, initializing Firebase in main.dart. - Decoupled repositories: Generates AuthRepository (with the correct stream chosen per use case: authStateChanges, idTokenChanges, or userChanges), FirestoreRepository with withConverter typing, and StorageRepository — no Firebase SDK types leak beyond the repository layer. - Default-deny security rules: Writes firestore.rules and storage.rules with owner-scoped access, separating create from read/update/delete, plus verification via flutter analyze, mocktail repository tests, and rules unit tests in the emulator. - Use Case: You have a Flutter app scaffolded with Riverpod and need login plus cloud data storage. This Skill configures Firebase Auth and Firestore, generates the repositories, and ships audited security rules. ## Quick Start Connect this Flutter app to Firebase with authentication and Firestore, generating the repositories and default-deny security rules.

Frequently Asked Questions about mobile-flutter-firebase

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect Firebase to a Flutter app?▼

Run flutterfire configure with the FlutterFire CLI to generate firebase_options.dart and register apps per platform, then call Firebase.initializeApp with DefaultFirebaseOptions.currentPlatform in main.dart. Never edit firebase_options.dart by hand; regenerate it via the CLI.

Which Firebase Auth stream should I use in Flutter?▼

Use authStateChanges for basic login/logout route guards, idTokenChanges when you read custom claims or need fresh tokens, and userChanges when the UI reflects profile fields like displayName or photo. Choosing the wrong stream causes missed updates or excessive rebuilds.

How do I write secure Firestore security rules?▼

Start with default deny, require request.auth != null, and scope access by owner. Separate create from read/update/delete because on create the document does not exist yet, so the owner must be read from request.resource.data instead of resource.data.

Should Firebase SDK types appear in Flutter UI code?▼

No. Map Firebase User to a domain AppUser in the AuthRepository and use withConverter in the FirestoreRepository so no User, DocumentSnapshot, or raw Map leaks beyond the repository layer. This keeps provider swaps from requiring app-wide refactors.

How do I test Firestore security rules locally?▼

Run rules unit tests in the Firebase emulator using firebase emulators:exec with @firebase/rules-unit-testing. If Node tooling is unavailable, declare an explicit skip with a reason rather than claiming the rules passed untested.

When should I not use this Firebase connector skill?▼

Do not use it to scaffold a new Flutter project or to build the feature screens that consume the repositories; those belong to the scaffold and feature skills. It also does not cover Supabase backends for Flutter, only Firebase.