firebase-cloud-firestore

firebase-cloud-firestore is a skill for Claude Code from evanca/flutter-ai-rules. It costs 37 tokens per session (1,922 once invoked), scanned A, original, MIT.

A set of instructions for using Cloud Firestore in Flutter, a cloud database that stores application data in documents and collections. It covers data structures, create/read/update/delete operations, live updates, pagination, offline use, scaling, and security rules.

In plain words
What is it for?
Use it to design collections and subcollections, build database operations and transactions, add real-time listeners and paginated queries, configure indexes, and write security rules.
Why use it?
It helps prevent poorly structured data, inefficient queries, unsafe access, and problems as an app grows or loses its network connection.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the flutter-ai-skills plugin — 36 skills shipped together

Good fit Use it to design collections and subcollections, build database operations and transactions, add real-time listeners and paginated queries, configure indexes, and write security rules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/evanca/flutter-ai-rules/firebase-cloud-firestore
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add evanca/flutter-ai-rules --skill firebase-cloud-firestore
Clone the repo
git clone --depth 1 https://github.com/evanca/flutter-ai-rules

Made for: Claude Code.

Or install flutter-ai-skills, the plugin that ships this one along with the rest of its 36 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for firebase-cloud-firestore

README.md
[![agentmods](https://agentmods.dev/badge/skills/evanca/flutter-ai-rules/firebase-cloud-firestore/github.svg)](https://agentmods.dev/skills/evanca/flutter-ai-rules/firebase-cloud-firestore)
Your own site
<a href="https://agentmods.dev/skills/evanca/flutter-ai-rules/firebase-cloud-firestore"><img src="https://agentmods.dev/badge/skills/evanca/flutter-ai-rules/firebase-cloud-firestore/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for firebase-cloud-firestore

Your own site · 80×15
<a href="https://agentmods.dev/skills/evanca/flutter-ai-rules/firebase-cloud-firestore"><img src="https://agentmods.dev/badge/skills/evanca/flutter-ai-rules/firebase-cloud-firestore.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,922 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.01922
Opus 5.5 $0.00015 $0.00769
Sonnet 5.5 $0.00007 $0.00384
Haiku 4.5 $0.00004 $0.00192

Measured 1mo ago against content hash 56e64fe49847, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

firebase-cloud-firestore scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/firebase-cloud-firestore/SKILL.md · 257 lines

How it starts

The opening of the file, as written. The whole thing — 257 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Firebase Cloud Firestore Skill

This skill defines how to correctly implement Cloud Firestore in Flutter applications, covering data modeling, queries, real-time updates, security rules, and scale optimization.

When to Use

Use this skill when:

  • Setting up and configuring Cloud Firestore in a Flutter project.
  • Designing document and collection structure or planning subcollections.
  • Performing read, write, batch, or transaction operations.
  • Implementing real-time listeners or paginated queries.
  • Optimizing for scale and avoiding write hotspots.
  • Writing or debugging Firestore security rules.

1. Database Selection

Choose Cloud Firestore when the app needs:

  • Rich, hierarchical data models with subcollections.
  • Complex queries: chaining filters, combining filtering and sorting on a property.
  • Transactions that atomically read and write data from any part of the database.
  • High availability (typical uptime 99.999%) or critical-level reliability.
  • Automatic scaling to millions of concurrent users.

Use Realtime Database instead for simple data models requiring simple lookups and extremely low-latency synchronization (typical response times under 10ms).


2. Setup and Configuration

flutter pub add cloud_firestore
import 'package:cloud_firestore/cloud_firestore.dart';

final db = FirebaseFirestore.instance; // after Firebase.initializeApp()

Location:

  • Select the database location closest to users and compute resources.
  • Use multi-region locations for critical apps (maximum availability and durability).
  • Use regional locations for lower costs and lower write latency.

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,
);

Read the full file on GitHub · 257 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 257 lines · 37 tokens per session scan A 56e64fe49847

Subscribe to this mod's changes

firebase-cloud-firestore is a skill published in the GitHub repository evanca/flutter-ai-rules (653 stars, last pushed 11d ago), licensed MIT. It adds 37 tokens to every session and 1,922 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

dart-expert

Expert-level Dart, Flutter, mobile development, and cross-platform apps. Use when the user mentions Flutter, mobile, cross platform, or widgets, or when the task involves Dart Language or Flutter Framework.

personamanagmentlayer/pcl · 44 tokens

dart-sdk-changelog

Authoritative guide for Dart SDK language specifications, syntax availability, minimum SDK constraints (minSdk), and version changelogs from Dart 1.x through Dart 3.x. Use this skill whenever authoring or refactoring Dart code, inspecting pubspec.yaml sdk constraints, writing control flow (switch statements, pattern…

RandalSchwartz/dart-sdk-skills · 107 tokens

flutter-sdk-changelog

Authoritative guide for Flutter framework APIs, widget lifecycle deprecations, design package unbundling, and version changelogs from Flutter 1.0 through Flutter 3.x+. Use this skill whenever authoring Flutter widgets, inspecting flutter sdk constraints, handling deprecated widgets (WillPopScope, withOpacity…

RandalSchwartz/dart-sdk-skills · 103 tokens

audit-db-schema

Audit a database schema for consistency, constraints, naming, indexes, and migrations. Use when reviewing schema design. Destructive-op gates → plan-data-integrity. RLS → plan-rls-audit. Restore/RPO → plan-backup-dr.

kensaurus/cursor-kenji · 55 tokens

backend-db-performance

Optimize slow queries, indexes, and N+1s. Use when "slow query", "database performance", "add an index", or "N+1". Schema consistency → audit-db-schema. RLS access control → plan-rls-audit.

kensaurus/cursor-kenji · 56 tokens

plan-rls-audit

Audit a Supabase/Postgres project for Row-Level Security and access-control gaps, then produce a phased remediation plan. Use when "RLS", "is my Supabase secure", "anyone can read my data", "lock down my tables". App-layer session/route gates → audit-auth-flows.

kensaurus/cursor-kenji · 69 tokens