firebase-firestore

作者: firebase

在設定依賴項、編寫資料模型或配置安全規則之前,您必須始終識別 Firestore 實例版本。

npx skills add https://github.com/firebase/agent-skills --skill firebase-firestore

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/)

Enterprise Edition / Native Mode (references/enterprise/)

來自 firebase 的更多技能

developing-genkit-dart
firebase
統一AI SDK for Dart,支援程式碼生成、結構化輸出、工具、流程與代理。提供核心API用於生成、工具定義、流程編排、嵌入與串流,並具備單一介面。包含8個以上外掛程式,支援LLM提供者(Google Gemini、Anthropic Claude、OpenAI GPT)、Firebase AI、模型上下文協定、Chrome瀏覽器整合,以及透過Shelf進行HTTP伺服器託管。內建CLI與本地開發UI,用於流程執行、追蹤、模型實驗等。
official
developing-genkit-js
firebase
使用 Genkit 流程、工具及多模型支援,建構 AI 驅動的 Node.js/TypeScript 應用程式。Genkit 與供應商無關;透過外掛支援 Google AI、OpenAI、Anthropic、Ollama 及其他 LLM 供應商。使用 Zod 定義型別安全的結構化流程,執行生成請求,並在 TypeScript 中組合多步驟 AI 工作流程。需要 Genkit CLI v1.29.0 以上版本;近期重大 API 變更,請務必查閱 genkit 文件:read 與 common-errors.md 以取得當前模式,而非依賴先前知識...
official
extension-to-functions-codebase
firebase
將已安裝的 Firebase Extension(或擴充功能原始碼)轉換為獨立的 Cloud Functions for Firebase 程式碼庫或可發行的 npm 套件的技能,……
official
firebase-ai-logic
firebase
客戶端Gemini整合,適用於網頁應用程式,支援多模態推論、串流及裝置端混合執行。支援純文字與多模態輸入(圖片、音訊、影片、PDF);超過20 MB的檔案會透過Cloud Storage路由。包含自動記錄歷史的聊天會話、即時顯示的串流回應,以及強制結構化JSON輸出。透過Chrome中的Gemini Nano提供裝置端混合推論,並自動備援至雲端執行。正式環境需啟用App Check...
official
firebase-ai-logic-basics
firebase
用於將 Firebase AI Logic(Gemini API)整合至網頁應用程式的官方技能,涵蓋設定、多模態推論、結構化輸出及安全性。
official
firebase-app-hosting-basics
firebase
使用 Firebase App Hosting 搭配 Next.js、Angular 及其他支援的框架,部署與管理全端網頁應用程式。需使用 Blaze 計費方案的 Firebase 專案;支援伺服器端渲染(SSR)與增量靜態再生(ISR)工作流程。可透過 firebase.json 設定檔進行部署,並選擇性使用 apphosting.yaml 設定後端,或啟用 GitHub 整合的自動化「git push 部署」。包含透過 CLI 指令管理機密資訊,以安全存取敏感金鑰...
official
firebase-auth-basics
firebase
設定 Firebase Authentication,整合多種身分提供者與安全的資料存取規則。支援電子郵件/密碼、電話號碼、匿名、聯合提供者(Google、Facebook、Twitter、GitHub、Microsoft、Apple)以及自訂驗證整合。每位通過驗證的使用者會獲得一組唯一 ID 與基於 JWT 的令牌(短效 ID 令牌與長效更新令牌),用於存取 Firebase 服務。可透過 CLI 啟用 Google 登入、匿名及電子郵件/密碼等提供者;使用 Firebase Console...
official
firebase-basics
firebase
Firebase 專案設定與 CLI 工作流程,用於 AI 代理整合。需先完成 firebase-local-env-setup 技能及 Firebase CLI 安裝。核心工作流程涵蓋透過 firebase login 進行驗證、使用唯一 ID 建立專案,以及透過互動式 firebase init 指令初始化服務。支援在設定過程中選取功能,包括 Firestore、Functions 與 Hosting,並自動產生設定檔。具備自我說明功能的 CLI 可透過 --help 旗標...
official