firebase-firestore 是什么?
firebase-firestore 帮助建立和使用Cloud Firestore,覆盖数据库选择、数据模型、索引与不同平台SDK。它首先区分Standard与Enterprise实例,再选相应参考,安全规则的编写也有单独流程。
中文说明由本站依据来源整理;英文原文保留在页面下方。
适合用在
- 应用需要Firestore文档数据库,或要调整现有模型、查询与索引。
这些情况不适合
- 把Data Connect的PostgreSQL模型或其他数据库查询语法直接套到Firestore。
怎么接入你的 Agent?
- 定位完整 Skill 目录
打开本项目来源,核对
SKILL.md及其引用的脚本和资料。 - 交给你正在用的 Agent
在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。
- 确认识别,再做具体任务
让 Agent 回报安装目录和识别到的名称
firebase-firestore,然后按本页使用示例提供材料。
展开并复制给 Codex 的安装指令
安装并检查 firebase-firestore
请在 Codex 的当前工作环境中安装并检查 firebase-firestore 这个 Skill。
项目身份:firebase/agent-skills / firebase-firestore
来源:https://github.com/firebase/agent-skills/blob/99954a30898bb5ddc8152ee10e124dc3b4106bf7/skills/firebase-firestore/SKILL.md
已定位的源文件:skills/firebase-firestore/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Claude Code 的安装指令
安装并检查 firebase-firestore
请在 Claude Code 的当前工作环境中安装并检查 firebase-firestore 这个 Skill。
项目身份:firebase/agent-skills / firebase-firestore
来源:https://github.com/firebase/agent-skills/blob/99954a30898bb5ddc8152ee10e124dc3b4106bf7/skills/firebase-firestore/SKILL.md
已定位的源文件:skills/firebase-firestore/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Cursor 的安装指令
安装并检查 firebase-firestore
请在 Cursor Agent 的当前工作环境中安装并检查 firebase-firestore 这个 Skill。
项目身份:firebase/agent-skills / firebase-firestore
来源:https://github.com/firebase/agent-skills/blob/99954a30898bb5ddc8152ee10e124dc3b4106bf7/skills/firebase-firestore/SKILL.md
已定位的源文件:skills/firebase-firestore/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 当前 Agent 的安装指令
安装并检查 firebase-firestore
请在 当前 Agent 的当前工作环境中安装并检查 firebase-firestore 这个 Skill。
项目身份:firebase/agent-skills / firebase-firestore
来源:https://github.com/firebase/agent-skills/blob/99954a30898bb5ddc8152ee10e124dc3b4106bf7/skills/firebase-firestore/SKILL.md
已定位的源文件:skills/firebase-firestore/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。装好以后,具体怎么用?
准备哪些材料
- 明确项目、数据库ID、edition、区域和客户端平台;需要规则时保留firestore-rules-creation或可用的rules-author工具。
会得到什么
- 针对选定实例的数据模型、SDK或查询改动、索引与规则,以及实际验证范围。
实际使用顺序
- 用CLI列出并检查数据库详情,先确定目标实例及edition。没有实例时先确定创建方式和区域,不默认改现有库。
- 按Standard或Enterprise进入对应参考;写应用代码前先读目标平台的SDK初始化和查询要求。
- 为真实访问模式设计模型和索引;firestore.rules配置进firebase.json,规则编写走对应作者流程并按授权部署。
- 用目标用户场景检查查询和拒绝访问行为,分别记录SDK运行、索引和规则结果。
从一个具体任务开始
本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。
复制一个具体任务
用 firebase-firestore 为现有任务应用设计数据层。先只读列出数据库并确认edition,目标行为是用户仅能读写自己的任务。按真实Web SDK与版本给出模型、查询和规则路线,不套用其他edition示例,不创建或迁移线上数据库。预期得到针对真实实例的实现方案;本站未执行此教学任务。
使用条件与边界
- 来源的默认新建edition是该版本工作流选择,不代表现有项目必须迁移。
- 服务端使用Admin SDK不意味着公开客户端访问规则可以省略;来源仍要求明确部署规则。
常见问题
为什么要先检查edition?
来源为Standard和Enterprise维护不同的数据模型、SDK和索引参考,混用可能导致初始化或查询方式错误。
没有专门的rules-author子Agent怎么办?
源文提供替代路线:读取firestore-rules-creation并按其要求直接编写,不能伪造已委派。
来源原文与资料状态
- 源文件
- 已保存 SKILL.md,抓取于 2026-11-19T19:32:10.677Z
- 中文使用说明
- 已针对下方源文件版本整理用途、用法和常见问题
- 安装与任务测试
- 本站未执行安装或任务测试
- 来源复核
- 本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料
skills/firebase-firestore/SKILL.md · 抓取时间 2026-11-19T19:32:10.677Z
以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。
抓取成功不代表已完成安装或任务测试。
Sets up, manages, queries, and configures Cloud Firestore databases (Standard/Enterprise edition), including data modeling, security rules, indexes, and SDK integrations (Web, Admin, Python, iOS, Android, Flutter). Use when adding or migrating app databases, 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 Data Connect, BigQuery, or standalone Hosting, Auth, Storage/GCS, Crashlytics, or Functions tasks.
查看源文件章节 / Source sections
- 原文:Cloud Firestore Database and Operations
- 原文:1. Instance Selection and Edition Detection
- 原文:A. Instance Found
- 原文:B. No Instance Found (or New Requested)
- 原文:2. Specialized Guides
- 原文:Standard Edition (`references/standard/`)
- 原文:Enterprise Edition / Native Mode (`references/enterprise/`)
原文:Cloud Firestore Database and Operations
> [!IMPORTANT] **Security Rules Authoring (`firestore.rules`)** Whenever setting > up a Firestore-backed app or creating/modifying `firestore.rules`, configure > `"firestore": { "rules": "firestore.rules" }` in `firebase.json` and deploy > `firestore.rules` > (`npx -y firebase-tools@latest deploy --only firestore:rules`), even if server > routes use the Admin SDK: > > - **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> ``` 1. Ask the user which database instance they wish to target or if they would prefer to create a new instance. 1. 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**: See the `firestore-rules-creation` skill - **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)
文件 SHA256:6bf329d38bc9aea8b9103ff06e2d1df43e8bad8b23434ac7db801fcafea98d1d
仓库许可证记录:Apache-2.0;repository-license-recorded-scope-unverified,查看来源。
Sets up, manages, and executes queries against Cloud Firestore database instances, including advanced native full-text search and relational joins using…
这份历史简介在采集时已截断;完整用途和触发条件需打开来源核对。
历史收录数据
| Skill标识 | firebase-firestore |
|---|---|
| 来源仓库 | firebase/agent-skills |
| 榜单快照 | 2026-07-28 |
| 榜单口径 | Skills.sh累计安装量 |
| 快照名次 | 271 |
| 快照累计安装量 | 76426 |
历史资料说明
- 所保留的来源简介在采集时已截断;完整触发条件、依赖及排除项须阅读源文件,本站不补写缺失部分。
- 安装量用于说明当时的收录次序,不是效果、可信度或当前可用性的证明。
此页用于识别项目与来源。安装入口可在该Skill的Skills.sh页面查看;当前目录是否仍存在、附带脚本和账户依赖尚需按具体版本确认。
