Skills Learn Benchmarks Tools News
Skills · Firebase · Back-end & APIs · Data & ML · Firestore

Firestore

Firestore data modeling and access patterns across collections, queries, security rules, and indexing.

View on GitHub → Read SKILL.md
firebase/agent-skills 2026-06-01
323 GitHub stars
58 Forks
2026-05-29 Updated
Apache-2.0 License

The full SKILL.md

Synced June 1, 2026 — view latest on GitHub
SKILL.md
---
name: firebase-firestore
description: >-
  Sets up, manages, and executes queries against Cloud Firestore database
  instances. You MUST unconditionally activate this skill if you plan to use
  Firestore in any way. Use when listing or creating Firestore databases,
  configuring security rules, designing data models, writing client SDK
  queries, or checking indexes.
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`.
---

# Cloud Firestore Database and Operations

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](references/standard/provisioning.md)
-   **Security Rules**: Read [security_rules.md](references/standard/security_rules.md)
-   **SDK Usage**: Read [web_sdk_usage.md](references/standard/web_sdk_usage.md), [android_sdk_usage.md](references/standard/android_sdk_usage.md), [ios_setup.md](references/standard/ios_setup.md), or [flutter_setup.md](references/standard/flutter_setup.md)
-   **Indexes**: Read [indexes.md](references/standard/indexes.md)

### Enterprise Edition / Native Mode (`references/enterprise/`)

-   **Provisioning**: Read [provisioning.md](references/enterprise/provisioning.md)
-   **Data Model**: Read [data_model.md](references/enterprise/data_model.md)
-   **Security Rules**: Read [security_rules.md](references/enterprise/security_rules.md)
-   **SDK Usage**: Read [web_sdk_usage.md](references/enterprise/web_sdk_usage.md), [python_sdk_usage.md](references/enterprise/python_sdk_usage.md), [android_sdk_usage.md](references/enterprise/android_sdk_usage.md), [ios_setup.md](references/enterprise/ios_setup.md), or [flutter_setup.md](references/enterprise/flutter_setup.md)
-   **Indexes**: Read [indexes.md](references/enterprise/indexes.md)
Install

Add Firestore to your agent

Pick your tool, then drop the file in or run the one-line fetch command.

1Drop this in

Project: .cursor/skills/firebase-firestore.md

2Or fetch it from the repo
curl -fsSL https://raw.githubusercontent.com/firebase/agent-skills/main/skills/firebase-firestore/SKILL.md -o .cursor/skills/firebase-firestore.md

Restart Cursor. The agent now follows this skill on every relevant task.

1Drop this in

User-level: ~/.claude/skills/firebase-firestore/SKILL.md

2Or fetch it from the repo
mkdir -p ~/.claude/skills/firebase-firestore && curl -fsSL https://raw.githubusercontent.com/firebase/agent-skills/main/skills/firebase-firestore/SKILL.md -o ~/.claude/skills/firebase-firestore/SKILL.md

Claude Code auto-discovers skills in ~/.claude/skills/.

1Drop this in

Project: AGENTS.md (append the SKILL contents)

2Or fetch it from the repo
curl -fsSL https://raw.githubusercontent.com/firebase/agent-skills/main/skills/firebase-firestore/SKILL.md >> AGENTS.md

Codex CLI reads AGENTS.md automatically from the project root.

1Drop this in

Project: .windsurf/rules/firebase-firestore.md

2Or fetch it from the repo
mkdir -p .windsurf/rules && curl -fsSL https://raw.githubusercontent.com/firebase/agent-skills/main/skills/firebase-firestore/SKILL.md -o .windsurf/rules/firebase-firestore.md

Windsurf loads project rules on every Cascade run.

1Drop this in

Project: .github/copilot-instructions.md (append)

2Or fetch it from the repo
mkdir -p .github && curl -fsSL https://raw.githubusercontent.com/firebase/agent-skills/main/skills/firebase-firestore/SKILL.md >> .github/copilot-instructions.md

Copilot reads .github/copilot-instructions.md as project-wide context.

1Drop this in

Project: .gemini/skills/firebase-firestore.md

2Or fetch it from the repo
mkdir -p .gemini/skills && curl -fsSL https://raw.githubusercontent.com/firebase/agent-skills/main/skills/firebase-firestore/SKILL.md -o .gemini/skills/firebase-firestore.md

Gemini CLI auto-loads project skills on the next run.

This is third-party code your agent will execute. Web Developer is independent and not affiliated with Firebase. Review the SKILL.md above and the source repository before installing.

Pair it

Related skills.

AI & Agents01 AI SDK

Builds with the Vercel AI SDK using streaming, tool calling, structured output, and clean provider integration.

↗
Back-end & APIs02 Supabase Postgres Best Practices

Best practices for Postgres on Supabase covering schema design, row-level security, indexing, and fast queries.

↗
Back-end & APIs03 Supabase

Builds on the Supabase platform by wiring auth, database, storage, and edge functions together correctly.

↗
STATUS ● BUILDING THE FUTURE
MISSION MAKE AI SHIP BETTER CODE.
VERSION BETA 3.0

MAKE AI SHIP BETTER CODE.

@WEBDEVELOPERHQ ↗
TERMS / PRIVACY
FRIENDS
Authentic Jobs
Authentic Jobs ↗
Web Reference
Web Reference ↗
Ready.dev
Ready.dev ↗
Design.dev
Design.dev ↗
© 2026 WEB DEVELOPER / ALL RIGHTS RESERVED