Skip to content
Back to search

flutter-firebase-bloc-marketplace

MarketplaceWorks with Claude CodeGitHub

Ship production Flutter with agents, from the first screen down to Firestore rules.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/anwarsafy--flutter-firebase-bloc-skill/badge.svg)](/listings/anwarsafy--flutter-firebase-bloc-skill)

HTML

<a href="/listings/anwarsafy--flutter-firebase-bloc-skill"><img src="/api/listings/anwarsafy--flutter-firebase-bloc-skill/badge.svg" alt="findsafeskills safety rating" /></a>

Install

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 28 lines
  1. {
  2. "name": "flutter-firebase-bloc-marketplace",
  3. "owner": {
  4. "name": "anwarsafy"
  5. },
  6. "metadata": {
  7. "description": "Production Flutter + Firebase + BLoC AI Agent Skill with Clean Architecture, Offline-First Firestore, Hardened Security Rules, RTL l10n, and CI/CD.",
  8. "version": "1.1.0"
  9. },
  10. "plugins": [
  11. {
  12. "name": "flutter-firebase-bloc",
  13. "source": "./",
  14. "description": "Production Flutter + Firebase + BLoC architecture, anti-hacking rules, offline-first writes, single-state BLoCs, flavors, and CI/CD.",
  15. "version": "1.1.0",
  16. "keywords": [
  17. "flutter",
  18. "firebase",
  19. "bloc",
  20. "clean-architecture",
  21. "firestore-rules",
  22. "security",
  23. "rtl",
  24. "dart"
  25. ]
  26. }
  27. ]
  28. }
README.md · README · 124 lines
  1. <div align="center">
  2. **English** · [العربية](README.ar.md)
  3. # Flutter Firebase BLoC
  4. ### Ship production Flutter with agents, from the first screen down to Firestore rules.
  5. [![Skill check](https://img.shields.io/github/actions/workflow/status/anwarsafy/flutter-firebase-bloc-skill/validate-skill.yml?style=flat-square&label=skill%20check)](https://github.com/anwarsafy/flutter-firebase-bloc-skill/actions)
  6. [![License: MIT](https://img.shields.io/badge/license-MIT-f4c430?style=flat-square)](LICENSE)
  7. [![Agent skill](https://img.shields.io/badge/agent%20skill-standard-5c4ee5?style=flat-square)](https://skills.sh)
  8. **[Website](https://anwarsafy.github.io/flutter-firebase-bloc-skill/)** · **[Blueprint](https://anwarsafy.github.io/flutter-firebase-bloc-skill/Flutter_Firebase_BLoC_Blueprint_ULTIMATE.html)** · **[Install guide](skills/flutter-firebase-bloc/INSTALL.md)**
  9. <code>npx skills add anwarsafy/flutter-firebase-bloc-skill</code>
  10. </div>
  11. > [!IMPORTANT]
  12. > Install from [anwarsafy/flutter-firebase-bloc-skill](https://github.com/anwarsafy/flutter-firebase-bloc-skill) or the [website](https://anwarsafy.github.io/flutter-firebase-bloc-skill/). The skill makes Cursor, Claude Code, Copilot, and the rest hold one bar: Clean Architecture, single-state BLoC, offline-first Firestore, hardened rules, and CI.
  13. ---
  14. ## ⚡ One-Command Install (Works Everywhere)
  15. Install into **Claude Code, Cursor, Windsurf, GitHub Copilot, Codex CLI, Gemini CLI, Cline, Roo Code**, and 35+ AI coding tools in seconds:
  16. ```bash
  17. npx skills add anwarsafy/flutter-firebase-bloc-skill
  18. ```
  19. <details>
  20. <summary><strong>Alternative Install Methods (Claude Code Marketplace, Manual Copy, Chat UIs)</strong></summary>
  21. ### Claude Code Plugin Marketplace
  22. ```text
  23. /plugin marketplace add anwarsafy/flutter-firebase-bloc-skill
  24. /plugin install flutter-firebase-bloc@flutter-firebase-bloc-marketplace
  25. ```
  26. ### Git Clone (Global Install)
  27. ```bash
  28. # Claude Code
  29. git clone https://github.com/anwarsafy/flutter-firebase-bloc-skill.git /tmp/ffb-skill && \
  30. mkdir -p ~/.claude/skills && cp -r /tmp/ffb-skill/skills/flutter-firebase-bloc ~/.claude/skills/ && rm -rf /tmp/ffb-skill
  31. # Codex CLI
  32. git clone https://github.com/anwarsafy/flutter-firebase-bloc-skill.git /tmp/ffb-skill && \
  33. mkdir -p ~/.codex/skills && cp -r /tmp/ffb-skill/skills/flutter-firebase-bloc ~/.codex/skills/ && rm -rf /tmp/ffb-skill
  34. # Gemini CLI / Antigravity
  35. git clone https://github.com/anwarsafy/flutter-firebase-bloc-skill.git /tmp/ffb-skill && \
  36. mkdir -p ~/.gemini/skills && cp -r /tmp/ffb-skill/skills/flutter-firebase-bloc ~/.gemini/skills/ && rm -rf /tmp/ffb-skill
  37. ```
  38. ### ChatGPT / Claude.ai / Gemini Web
  39. Upload `skills/flutter-firebase-bloc/SKILL.md` and `skills/flutter-firebase-bloc/references/*.md` as Knowledge files and paste `SKILL.md` into Custom Instructions.
  40. </details>
  41. ---
  42. ## 🚨 Why Most AI-Generated Flutter + Firebase Code Fails in Production
  43. | Problem Without This Skill | What This Skill Enforces Automatically |
  44. |---|---|
  45. | `await firestore.set(...)` hangs forever offline | **True Offline-First:** Unawaited writes via `_fireAndLog` + `snapshots(includeMetadataChanges: true)` + `hasPendingWrites` sync UI |
  46. | Clients can self-upgrade `isPro: true` / `role: "admin"` / any new field | **Anti-Hacking Rules:** Allow-list of client fields on `users/{uid}` (`hasOnly` on create, `affectedKeys().hasOnly` on update), enforced server timestamps, `allow list: if false` on `publicProfiles` — every rule backed by an emulator test |
  47. | Token/Secret leakage & replay attacks | **Defense in Depth:** `App Check` (`Play Integrity` / `App Attest` / `reCAPTCHA Enterprise`), `flutter_secure_storage`, and Hosting security headers |
  48. | Login screen flashes for 500ms on app cold start | **`AuthStatus.unknown` Splash Guard:** Clean `GoRouter` redirect priority (`Ops` → `Unknown` → `Auth` → `Home`) |
  49. | `FcmService` leaks listeners & crashes on Web | **Leak-Free Messaging:** Cancelled `StreamSubscription`s on `dispose()`, Web VAPID + Service Worker, `NotificationNavigator` payload safety |
  50. | BLoC stuck on a spinner after a Firestore error, or a silent rollback of an offline write | **Mapped stream errors:** `catchFailures()` on every repository stream, `restartable()` watchers, and `WriteErrorBus` for server-rejected offline writes |
  51. | Raw English `e.toString()` shown to users | **Sealed `AppFailure` + EN/AR `l10n`:** Maps `FirebaseAuthException` → `FirebaseException` → localized ARB strings with full RTL layout support |
  52. | Crashlytics reports unreadable obfuscated stack traces | **Production CI/CD:** Automated `--obfuscate --split-debug-info` + `firebase crashlytics:symbols:upload` + keyless WIF deploys |
  53. ---
  54. ## 📦 What's Inside This Skill
  55. ### 1. Core Manifest & Progressive Disclosure (`SKILL.md`)
  56. - **Decision Matrix:** Enforces one clear choice per concern (`Equatable` vs `Freezed`, offline writes vs `onCall` Functions, `SharedPreferences` vs `flutter_secure_storage`).
  57. - **The 10 Laws:** Zero Firebase/Flutter imports in `domain/`, single-state BLoCs (`enum status` + `copyWith`), zero `print()`, zero hardcoded colors/strings/directional padding.
  58. - **Exact `bootstrap()` Startup Sequence** & **Mandatory Verification Gate** (`gen-l10n` → `build_runner` → `dart format` → `flutter analyze` → `flutter test` → Emulator tests).
  59. ### 2. Full Unabridged Code References (`skills/flutter-firebase-bloc/references/`)
  60. | File | Coverage |
  61. |---|---|
  62. | [`architecture-and-di.md`](skills/flutter-firebase-bloc/references/architecture-and-di.md) | `pubspec.yaml`, `UseCase`/`StreamUseCase`, `GetIt` + `Injectable` (`@preResolve`), Firestore `100 MB` cache, `ConnectivityCubit`, `OfflineBanner`, null-safe `Model`, Cursor Pagination, `StorageService`, `DraftStore` |
  63. | [`auth-and-security.md`](skills/flutter-firebase-bloc/references/auth-and-security.md) | Google (`google_sign_in` 7.x), Apple (SHA-256 Nonce), Phone OTP, Email, `deleteAccount` + server-side data erasure (App Store 5.1.1(v)), `AuthBloc`, `App Check`, hardened `firestore.rules` & `storage.rules`, `@firebase/rules-unit-testing`, Fintech RASP |
  64. | [`bloc-errors-l10n.md`](skills/flutter-firebase-bloc/references/bloc-errors-l10n.md) | Single-state `BoardsBloc`, `AppBlocObserver`, 9 sealed `AppFailure` classes, static `AppLogger`, `ErrorReporter` (Mobile + Web), `installGlobalErrorHandlers`, `AppTheme`, `AdaptiveScaffold`, EN/AR RTL `l10n` |
  65. | [`notifications-and-links.md`](skills/flutter-firebase-bloc/references/notifications-and-links.md) | `AndroidManifest`, Notification Channels, `LocalNotificationService`, `fcm_background.dart`, `App` widget, leak-free `FcmService`, `web/firebase-messaging-sw.js`, Cloud Functions v2, `GoRouter` + Deep Links |
  66. | [`flavors-perf-rc-cicd.md`](skills/flutter-firebase-bloc/references/flavors-perf-rc-cicd.md) | `dev`/`staging`/`prod` Flavors, Xcode 6-step setup, `flutterfire configure`, `PerfService` + `PerfInterceptor`, `RemoteConfigService` + A/B + KSA PDPL consent, 5 GitHub Actions workflows + Crashlytics symbols, Unit/BLoC/Widget/Integration tests |
  67. ### 3. 10 Drop-In Templates (`skills/flutter-firebase-bloc/templates/`)
  68. Copy-paste-ready starter files: `pubspec.yaml`, `analysis_options.yaml`, `l10n.yaml`, `app_en.arb`, `app_ar.arb`, `firebase.json` (with CSP, HSTS and other Hosting security headers), `firestore.indexes.json`, `.firebaserc`, `dependabot.yml`, and `ExportOptions.plist`.
  69. ### 4. Interactive Visual Blueprint (`docs/`)
  70. [Open the blueprint](https://anwarsafy.github.io/flutter-firebase-bloc-skill/) — a searchable visual reference with one-click copy buttons, generated from the skill's Markdown by `scripts/build_blueprint.py` (CI fails if it drifts).
  71. See [CHANGELOG.md](CHANGELOG.md) for what changed in each release.
  72. ---
  73. ## 💬 Example Prompts to Try Right Away
  74. Once installed, prompt your AI assistant naturally:
  75. - *"Use the flutter-firebase-bloc skill to scaffold a complete `orders` feature (domain, offline-first datasource, single-state BLoC, GoRouter route, EN/AR ARB keys, Firestore rules & indexes, and blocTests)."*
  76. - *"Audit my `firebase/firestore.rules` and `storage.rules` against the skill's anti-hacking checklist and add `@firebase/rules-unit-testing` coverage."*
  77. - *"Refactor my `main.dart` and `FcmService` to follow the skill's `bootstrap()`, `AuthStatus.unknown` splash guard, and zero-leak subscription pattern."*
  78. ---
  79. ## 🤝 Contributing & Support
  80. Found a security edge case or an improvement? Pull requests and issues are very welcome — see [CONTRIBUTING.md](CONTRIBUTING.md).
  81. If this skill saved you hours of debugging or prevented a security bug in production, **please drop a ⭐ Star on the repo** so more Flutter engineers can discover it!
  82. ---
  83. <div align="center">
  84. Released under the <a href="LICENSE">MIT License</a>.
  85. </div>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.