firebase-firestore
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.
Overview
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:listA. 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
Files 15 files
- SKILL.mdMarkdown
- references/enterprise/android_sdk_usage.mdMarkdown
- references/enterprise/data_model.mdMarkdown
- references/enterprise/flutter_setup.mdMarkdown
- references/enterprise/indexes.mdMarkdown
- references/enterprise/ios_setup.mdMarkdown
- references/enterprise/provisioning.mdMarkdown
- references/enterprise/python_sdk_usage.mdMarkdown
- references/enterprise/web_sdk_usage.mdMarkdown
- references/standard/android_sdk_usage.mdMarkdown
- references/standard/flutter_setup.mdMarkdown
- references/standard/indexes.mdMarkdown
Install it by hand
Deska runs this for you, for every agent you pick. To run it yourself in a terminal:
npx skills add firebase/agent-skills --skill firebase-firestoreMore from firebase
- firebase-basicsfirebaseOfficialProvides 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.165.7K installs on skills.sh0
- firebase-auth-basicsfirebaseOfficialGuide for setting up and using Firebase Authentication. Use this skill when the user's app requires user sign-in, user management, or secure data access using auth rules.164.7K installs on skills.sh0
- firebase-hosting-basicsfirebaseOfficialDeploys and configures classic Firebase Hosting for static websites, single-page apps (SPAs), and microservices. Use when deploying static sites/SPAs, setting up custom domains, configuring firebase.json hosting settings (redirects, rewrites, headers, multi-site), or managing preview channels. Don't use for Firebase App Hosting (Next.js/SSR), Auth, Firestore queries/rules, Data Connect, or Crashlytics.160.5K installs on skills.sh0
- firebase-app-hosting-basicsfirebaseOfficialDeploys and manages full-stack web applications (Next.js, Angular) with Server-Side Rendering (SSR) using Firebase App Hosting. Use when deploying Next.js/Angular apps, configuring apphosting.yaml or firebase.json apphosting blocks, managing secrets, setting up GitHub CI/CD, or configuring Blaze billing requirements. Don't use for classic static web hosting, Auth, Firestore, Crashlytics, or Xcode.159.9K installs on skills.sh0
- firebase-data-connectfirebaseOfficialBuilds and deploys Firebase SQL Connect (aka Firebase Data Connect) backends with PostgreSQL securely. Use when designing schemas with tables and relations, writing authorized queries and mutations, configuring real-time data updates, or generating type-safe SDKs. Use when you need a relational database with Firebase, or when the user mentions SQL Connect or Data Connect.159.1K installs on skills.sh0