Firebase Firestore

by firebaseeba80a3dc825No licenseListed Oct 8, 2026Updated Oct 8, 2026

Sets up, manages, queries, and configures Cloud Firestore databases (Standard/Enterprise edition), including data modeling, security rules, indexes, and SDK integrations (Web, Python, iOS, Android, Flutter). Use when creating/listing Firestore databases, defining data models/indexes, writing SDK queries, or integrating Firestore SDKs. For authoring or modifying Firestore Security Rules (firestore.rules), delegate to the firestore-rules-author subagent if subagent delegation is available, or use firestore-rules-creation otherwise. Don't use for Firebase Hosting, Data Connect, Auth, Storage/GCS, Crashlytics, Functions, or BigQuery.

AI-generated overview

Guides setting up, querying and configuring Cloud Firestore databases, including data models, indexes and SDK integration.

What it does
This skill walks an agent through identifying or creating a Cloud Firestore database and detecting whether it uses Standard or Enterprise edition. It then directs the agent to bundled reference guides covering provisioning, data modeling, indexes, and SDK usage for Web, Python, iOS, Android and Flutter. Security rules authoring is delegated to a separate subagent or skill rather than handled here.
When to use it
Use it when creating or listing Firestore databases, defining data models or indexes, writing SDK queries, or integrating Firestore SDKs into an application. It is not intended for Firebase Hosting, Data Connect, Auth, Storage, Crashlytics, Functions or BigQuery.
Requirements
Instructions only, with no bundled scripts. It expects the Firebase CLI, which can be run through npx with firebase-tools, and network access for that command; a Firebase project and credentials are needed to list, inspect or create databases.

Cloud Firestore Database and Operations

[!IMPORTANT] Security Rules Authoring (firestore.rules) Whenever your task requires creating, authoring, or modifying firestore.rules:

  • If subagent delegation AND the firestore-rules-author subagent are available: delegate authoring firestore.rules to the firestore-rules-author subagent rather than writing firestore.rules directly in the main agent.
  • If subagent delegation is unavailable (e.g., subagents not enabled in the IDE) OR firestore-rules-author is not installed: read and follow the firestore-rules-creation skill to write firestore.rules directly.

Before setting up dependencies, writing data models, or configuring security rules, you MUST always identify the Firestore instance edition.

1. Instance Selection and Edition Detection

Run the following command to list current Firestore databases:

bash
npx -y firebase-tools@latest firestore:databases:list

A. Instance Found

  1. For each database found, inspect its edition and details:

    bash
    npx -y firebase-tools@latest firestore:databases:get <database-id>
  2. Ask the user which database instance they wish to target or if they would prefer to create a new instance.

  3. Once the target instance is established:

    • If the edition is STANDARD, follow the guides under references/standard/.
    • If the edition is ENTERPRISE or native mode, follow the guides under references/enterprise/.

B. No Instance Found (or New Requested)

If no databases exist or the user requests a new one, default to provisioning an Enterprise edition database and ask the user what location to use. Run npx -y firebase-tools@latest firestore:locations to get the list of options. Suggest colocating with other resources if applicable.

Once the location is determined, create the database:

bash
npx -y firebase-tools@latest firestore:databases:create <database-id> --edition="enterprise" --location="<selected-location>"

Proceed with using the guides under references/enterprise/.


2. Specialized Guides

Based on the identified or created instance edition, open and read the corresponding reference guides:

Standard Edition (references/standard/)

  • Provisioning: Read provisioning.md [blocked]
  • Security Rules: See the firestore-rules-creation skill
  • SDK Usage: Read web_sdk_usage.md [blocked], android_sdk_usage.md [blocked], ios_setup.md [blocked], or flutter_setup.md [blocked]
  • Indexes: Read indexes.md [blocked]

Enterprise Edition / Native Mode (references/enterprise/)

  • Provisioning: Read provisioning.md [blocked]

  • Data Model: Read data_model.md [blocked]

  • Security Rules: See the firestore-rules-creation skill

  • SDK Usage:

    [!CRITICAL] Mandatory Reference Reading Before writing or modifying any application code for Firestore Enterprise Edition, you MUST read at least one of the relevant reference documents below for the target platform/language to understand specific architectural requirements and pipeline initialization patterns.

    Read web_sdk_usage.md [blocked], python_sdk_usage.md [blocked], android_sdk_usage.md [blocked], ios_setup.md [blocked], or flutter_setup.md [blocked]

  • Indexes: Read indexes.md [blocked]

Source and attribution

Source:firebase/agent-skillsinskills/firebase-firestoreat commiteba80a3

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal

More from firebase/agent-skills

Firebase Remote Config Basics

firebase

Guides Firebase Remote Config setup, template management, feature flags, and loading strategies for Android and iOS apps.

Software DevelopmentOct 8, 2026

Firestore Rules Creation

firebase

Designs, authors, refactors, and hardens production-grade Cloud Firestore Security Rules (firestore.rules). IMPORTANT: If subagent delegation AND the firestore-rules-author subagent are available in your environment, delegate authoring firestore.rules to the firestore-rules-author subagent. If subagent delegation is unavailable (e.g. not enabled in the IDE), firestore-rules-author is not installed, or you are running inside firestore-rules-author, follow this skill directly.

Awaiting classificationOct 8, 2026

Firebase Security Rules Auditor

firebase

Audits Firebase (Firestore, Cloud Storage) security rules for vulnerabilities, privilege escalation, role bypasses, create vs update inconsistencies, resource exhaustion, type safety, size limits, and hasOnly ownership checks. Use when auditing/reviewing rules, running red-team rule assessments, or scoring against auditor checklists. Don't use for Firebase CLI (login, deploy), Auth, Crashlytics, Remote Config, or database queries.

Awaiting classificationOct 8, 2026

Firebase Basics

firebase

Provides foundational Firebase CLI setup, CLI installation, version checks (`firebase-tools@latest --version`), CLI login (including --no-localhost), project creation, project selection (`firebase use`), and app config file downloads (`google-services.json`, `GoogleService-Info.plist`). Use ONLY for CLI login, project creation/switching, or downloading app config files. Don't use for Firebase Hosting deploy, Firestore, Auth, App Hosting, Data Connect, Crashlytics, or Remote Config.

Awaiting classificationOct 8, 2026

Firebase Hosting Basics

firebase

Guides deploying and configuring classic Firebase Hosting for static sites, SPAs, and microservices.

DevOps & CloudOct 8, 2026

Firebase App Hosting Basics

firebase

Guides deploying and managing full-stack Next.js or Angular apps with SSR on Firebase App Hosting.

DevOps & CloudOct 8, 2026