elmm-programing/opencode/flutter-firebase
Claude Code and agent skill by elmm-programing/opencode
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Firebase Auth, Firestore, FCM, Crashlytics & Analytics Patterns
Install
npx vskill@latest install elmm-programing/opencode/flutter-firebaseSKILL.md
The same SKILL.md was published earlier as elmm-programing/opencode/flutter-firebase.
Firebase Setup
- Use
firebase_corefor initialization — callFirebase.initializeApp()beforerunApp() - Use
flutterfire configurefor platform-specific setup - Use separate Firebase projects per flavor (see
app-configskill) - Register Firebase services via
injectablefor consistent DI
Authentication
- Use
firebase_authfor user management - Wrap all auth calls in an
AuthRepository— no directFirebaseAuthusage in BLoCs or UI - Support email/password, Google Sign-In, and Apple Sign-In at minimum
- Handle auth state changes via
FirebaseAuth.instance.authStateChanges()stream inAuthBloc - Store auth tokens via
flutter_secure_storage— never inSharedPreferencesor source code - Implement proper sign-out: clear local cache, navigate to login, dispose user-specific BLoCs
Firestore
- Use
cloud_firestorefor remote data persistence - DataSources wrap all Firestore calls (
get,set,update,delete,snapshots) - Use typed model classes with
fromFirestore/toFirestorefactory methods - Prefer
.withConverter<T>()for type-safe collection references - Use batch writes for multi-document operations — never multiple sequential writes
- Implement offline persistence (enabled by default on mobile)
Security Rules
- NEVER rely on client-side validation alone — enforce rules in Firestore Security Rules
- Default deny: start with
allow read, write: if false;and open only what's needed - Always validate
request.auth != nullfor authenticated-only collections - Test rules with the Firebase Emulator Suite before deploying
Push Notifications (FCM)
- Use
firebase_messagingfor push notifications - Request notification permissions early but gracefully (explain value before requesting)
- Handle foreground, background, and terminated-state messages separately
- Store FCM token in Firestore user document for server-side targeting
- Re-register token on
onTokenRefreshstream
Crashlytics
- Use
firebase_crashlyticsfor crash reporting - Enable in staging and production flavors only — disable in dev
- Record Flutter errors:
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError - Catch async errors via
PlatformDispatcher.instance.onError - Add custom keys for user context:
Crashlytics.instance.setCustomKey('userId', id)
Analytics
- Use
firebase_analyticsfor user behavior tracking - Log meaningful events with descriptive names:
analytics.logEvent(name: 'purchase_completed') - Set user properties for segmentation:
analytics.setUserProperty(name: 'plan', value: 'premium') - Track screen views via
FirebaseAnalyticsObserverinGoRouter - NEVER log PII (emails, passwords, phone numbers) in analytics events
Remote Config
- Use
firebase_remote_configfor feature flags and A/B testing - Set sensible defaults locally — app MUST work without Remote Config fetched
- Fetch and activate on app start with a timeout fallback
- Cache values and respect minimum fetch intervals to avoid throttling
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/flutter-firebase/SKILL.md
Popularity
- 7-day trend score
- 0
Refreshed 19 Nov 2026, 11 days ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/elmm-programing/opencode/flutter-firebase)