firebase-firestore
firebase/agent-skills
Set up, query, and manage Cloud Firestore databases with security rules, indexes, and SDK integrations.
What is firebase-firestore?
Manages Cloud Firestore database provisioning, data modeling, security configuration, and SDK integration across Web, Python, iOS, Android, and Flutter. Use this when creating or configuring Firestore instances, defining data models and indexes, writing queries, or integrating Firestore SDKs into applications.
- List and inspect existing Firestore databases and their editions
- Create new Standard or Enterprise edition Firestore databases in specified locations
- Configure data models and indexes for Standard and Enterprise editions
- Write and integrate Firestore SDK queries for Web, Python, iOS, Android, and Flutter
- Delegate Firestore Security Rules authoring to specialized subagents or use firestore-rules-creation skill
How to install firebase-firestore
npx skills add https://github.com/firebase/agent-skills --skill firebase-firestore- Firebase CLI (npx firebase-tools@latest) for database management commands
- Active Firebase project with appropriate permissions
- Target platform SDK (Web, Python, iOS, Android, or Flutter) for SDK integration
How to use firebase-firestore
- 1.Run 'npx -y firebase-tools@latest firestore:databases:list' to identify existing Firestore instances
- 2.Inspect the edition (Standard or Enterprise) of each database using 'firestore:databases:get'
- 3.If creating a new database, run 'firestore:locations' to select a location, then create with 'firestore:databases:create' specifying edition and location
- 4.Read the appropriate reference guide (Standard or Enterprise) for provisioning, data modeling, and SDK setup
- 5.For Security Rules, delegate to firestore-rules-author subagent if available, otherwise follow firestore-rules-creation skill
- 6.Implement SDK queries and integrations using the platform-specific reference guides (web_sdk_usage.md, python_sdk_usage.md, etc.)
- 7.Configure indexes following the indexes.md guide for your database edition
Use cases
- Provisioning a new Firestore database for a mobile or web application
- Querying and managing data across multiple Firestore collections
- Setting up indexes to optimize query performance on large datasets
- Integrating Firestore SDKs into existing Web, Python, or mobile applications
- Configuring database-level settings and security rules for different editions
- Backend developers building applications with Firestore
- Mobile developers integrating Firestore into iOS, Android, or Flutter apps
- Full-stack developers setting up real-time databases for web applications
- DevOps engineers provisioning and managing Firestore infrastructure
firebase-firestore FAQ
Standard edition is for smaller workloads with automatic scaling and pay-per-use pricing. Enterprise edition supports larger-scale applications with dedicated capacity, advanced features, and native mode support. The skill defaults to Enterprise when creating new databases.
No, the skill does not require pre-installation of Firebase CLI. It accesses Firebase CLI via 'npx -y firebase-tools@latest' commands, which download and run the latest version on demand.
If subagent delegation is available, delegate to the firestore-rules-author subagent. Otherwise, follow the firestore-rules-creation skill to author firestore.rules directly.
Read the reference guide matching your target platform: web_sdk_usage.md for Web, python_sdk_usage.md for Python, android_sdk_usage.md for Android, ios_setup.md for iOS, or flutter_setup.md for Flutter.
This skill does not cover Firebase Hosting, Data Connect, Authentication, Cloud Storage/GCS, Crashlytics, Cloud Functions, or BigQuery integration.
Full instructions (SKILL.md)
Source of truth, from firebase/agent-skills.
name: firebase-firestore
description: >-
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.
compatibility: This skill is best used with the Firebase CLI, but does not require it. Firebase CLI can be accessed through npx -y firebase-tools@latest.
metadata:
category: Databases
Cloud Firestore Database and Operations
[!IMPORTANT] Security Rules Authoring (
firestore.rules) Whenever your task requires creating, authoring, or modifyingfirestore.rules:
- If subagent delegation AND the
firestore-rules-authorsubagent are available: delegate authoringfirestore.rulesto thefirestore-rules-authorsubagent rather than writingfirestore.rulesdirectly in the main agent.- If subagent delegation is unavailable (e.g., subagents not enabled in the IDE) OR
firestore-rules-authoris not installed: read and follow thefirestore-rules-creationskill to writefirestore.rulesdirectly.
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:
npx -y firebase-tools@latest firestore:databases:list
A. Instance Found
-
For each database found, inspect its edition and details:
npx -y firebase-tools@latest firestore:databases:get <database-id> -
Ask the user which database instance they wish to target or if they would prefer to create a new instance.
-
Once the target instance is established:
- If the
editionisSTANDARD, follow the guides underreferences/standard/. - If the
editionisENTERPRISEor native mode, follow the guides underreferences/enterprise/.
- If the
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:
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
- Security Rules: See the
firestore-rules-creationskill - SDK Usage: Read web_sdk_usage.md, android_sdk_usage.md, ios_setup.md, or flutter_setup.md
- Indexes: Read indexes.md
Enterprise Edition / Native Mode (references/enterprise/)
-
Provisioning: Read provisioning.md
-
Data Model: Read data_model.md
-
Security Rules: See the
firestore-rules-creationskill -
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, python_sdk_usage.md, android_sdk_usage.md, ios_setup.md, or flutter_setup.md
-
Indexes: Read indexes.md
Related skills
More from firebase/agent-skills and the wider catalog.

firebase-firestore-basics
Complete guide to Cloud Firestore setup, security rules, and SDK integration.

firebase-firestore-enterprise-native-mode
Set up and manage Firestore Enterprise Native Mode with provisioning, security rules, and SDK integration.

firebase-firestore-standard
Complete guide for setting up, securing, and using Cloud Firestore Standard Edition

firebase-hosting-basics
Deploy static sites, SPAs, and microservices to Firebase Hosting with custom domains and preview channels.

firebase-local-env-setup
Bare minimum initial setup for Firebase: Node.js, CLI, and first-time login.

firebase-remote-config-basics
Manage Firebase Remote Config templates, feature flags, and SDK setup for Android and iOS.