[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-firebase-firebase-ai-logic-basics":3,"mdc-1mxpih-key":35,"related-org-firebase-firebase-ai-logic-basics":807,"related-repo-firebase-firebase-ai-logic-basics":993},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":24,"repoUrl":25,"updatedAt":26,"license":27,"forks":28,"topics":29,"repo":30,"sourceUrl":33,"mdContent":34},"firebase-ai-logic-basics","integrate Firebase AI Logic","Official skill for integrating Firebase AI Logic (Gemini API) into web applications. Covers setup, multimodal inference, structured output, and security.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"firebase","Firebase (Google)","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ffirebase.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"Backend","backend","tag",{"name":17,"slug":18,"type":15},"LLM","llm",{"name":20,"slug":21,"type":15},"Gemini","gemini",{"name":23,"slug":8,"type":15},"Firebase",376,"https:\u002F\u002Fgithub.com\u002Ffirebase\u002Fagent-skills","2026-07-31T05:53:23.557174",null,75,[],{"repoUrl":25,"stars":24,"forks":28,"topics":31,"description":32},[],"Agent Skills for Firebase","https:\u002F\u002Fgithub.com\u002Ffirebase\u002Fagent-skills\u002Ftree\u002FHEAD\u002Fskills\u002Ffirebase-ai-logic-basics","---\nname: firebase-ai-logic-basics\ndescription: Official skill for integrating Firebase AI Logic (Gemini API) into web applications. Covers setup, multimodal inference, structured output, and security.\nversion: 1.0.1\n---\n\n# Firebase AI Logic Basics\n\n## Overview\n\nFirebase AI Logic is a product of Firebase that allows developers to add gen AI\nto their mobile and web apps using client-side SDKs. You can call Gemini models\ndirectly from your app without managing a dedicated backend. Firebase AI Logic,\nwhich was previously known as \"Vertex AI for Firebase\", represents the evolution\nof Google's AI integration platform for mobile and web developers.\n\nIt supports the two Gemini API providers:\n\n-   **Gemini Developer API**: It has a free tier ideal for prototyping, and\n    pay-as-you-go for production\n-   **Agent Platform Gemini API** (formerly branded Vertex AI): Ideal for scale\n    with enterprise-grade production readiness, requires Blaze plan\n\nUse the Gemini Developer API as a default, and only Agent Platform Gemini API\n(formerly branded Vertex AI) if the application requires it.\n\n## Setup & Initialization\n\n### Prerequisites\n\n-   Before starting, ensure you have **Node.js 16+** and npm installed. Install\n    them if they aren’t already available.\n-   Identify the platform the user is interested in building on prior to\n    starting: Android, iOS, Flutter or Web.\n-   If their platform is unsupported, Direct the user to Firebase Docs to learn\n    how to set up AI Logic for their application (share this link with the user\n    https:\u002F\u002Ffirebase.google.com\u002Fdocs\u002Fai-logic\u002Fget-started)\n\n### Installation\n\nThe library is part of the standard Firebase Web SDK.\n\n`npm install -g firebase@latest`\n\nIf you're in a firebase directory (with a firebase.json) the currently selected\nproject will be marked with \"current\" using this command:\n\n`npx -y firebase-tools@latest projects:list`\n\nEnsure there's at least one app associated with the current project\n\n`npx -y firebase-tools@latest apps:list`\n\nInitialize AI logic SDK with the init command\n\n`npx -y firebase-tools@latest init ailogic`\n\nThis will automatically enable the Gemini Developer API in the Firebase console.\n\nMore info in\n[Firebase AI Logic Getting Started](https:\u002F\u002Ffirebase.google.com\u002Fdocs\u002Fai-logic\u002Fget-started.md.txt)\n\n## Core Capabilities\n\n> [!WARNING] **CRITICAL: Use current model names:** Always check the\n> [Firebase AI Logic Models documentation](https:\u002F\u002Ffirebase.google.com\u002Fdocs\u002Fai-logic\u002Fmodels.md.txt)\n> for the currently supported model names. Do NOT use `gemini-2.0-pro` or\n> `gemini-2.0-flash` or other older models that are shutdown.\n\n### Text-Only Generation\n\n### Multimodal (Text + Images\u002FAudio\u002FVideo\u002FPDF input)\n\nFirebase AI Logic allows Gemini models to analyze image files directly from your\napp. This enables features like creating captions, answering questions about\nimages, detecting objects, and categorizing images. Beyond images, Gemini can\nanalyze other media types like audio, video, and PDFs by passing them as inline\ndata with their MIME type. For files larger than 20 megabytes (which can cause\nHTTP 413 errors as inline data), store them in Cloud Storage for Firebase and\npass their URLs to the Gemini Developer API.\n\n### Chat Session (Multi-turn)\n\nMaintain history automatically using `startChat`.\n\n### Streaming Responses\n\nTo improve the user experience by showing partial results as they arrive (like a\ntyping effect), use `generateContentStream` instead of `generateContent` for\nfaster display of results.\n\n### Generate Images with Nano Banana\n\n> [!WARNING] **Use current Image model names:** Always check the\n> [Firebase AI Logic Models documentation](https:\u002F\u002Ffirebase.google.com\u002Fdocs\u002Fai-logic\u002Fmodels.md.txt)\n> for the currently supported image generation (Nano Banana) model names.\n\n-   Requires an upgraded Blaze pay-as-you-go billing plan.\n\n### Search Grounding with the built in googleSearch tool\n\n## Supported Platforms and Frameworks\n\nSupported Platforms and Frameworks include Kotlin and Java for Android, Swift\nfor iOS, JavaScript for web apps, Dart for Flutter, and C Sharp for Unity.\n\n## Advanced Features\n\n### Structured Output (JSON)\n\nEnforce a specific JSON schema for the response.\n\n### On-Device AI (Hybrid)\n\nHybrid on-device inference for web apps, where the Firebase Javascript SDK\nautomatically checks for Gemini Nano's availability (after installation) and\nswitches between on-device or cloud-hosted prompt execution. This requires\nspecific steps to enable model usage in the Chrome browser, more info in the\n[hybrid-on-device-inference documentation](https:\u002F\u002Ffirebase.google.com\u002Fdocs\u002Fai-logic\u002Fhybrid-on-device-inference.md.txt).\n\n## Security & Production\n\n### App Check\n\n> [!WARNING] **Critical Safety Requirement:** In order to use AI Logic safely,\n> you MUST set up App Check on your app. This prevents unauthorized clients from\n> using your API quota and accessing your backend resources.\n\nSee\n[App Check with reCAPTCHA Enterprise](https:\u002F\u002Ffirebase.google.com\u002Fdocs\u002Fapp-check\u002Fweb\u002Frecaptcha-enterprise-provider.md.txt)\nfor setup instructions.\n\n#### App Check Debug Tokens for Local Development & CI\u002FCD\n\nBecause App Check attestation providers (like Play Integrity or DeviceCheck)\nreject emulators, simulators, or CI environments, you must use **App Check Debug\nTokens** during development and testing to bypass standard attestation.\n\n##### Local Development (Auto-Generated)\n\n1.  Configure your code's App Check provider to use the debug factory:\n    *   **Web**: Set `self.FIREBASE_APPCHECK_DEBUG_TOKEN = true;` before\n        initializing App Check.\n    *   **Android**: Install `DebugAppCheckProviderFactory.getInstance()`.\n    *   **iOS**: Set provider factory to `AppCheckDebugProviderFactory()`.\n2.  Run your app in the emulator\u002Flocalhost.\n3.  Look at your runtime debugger console \u002F Logcat logs for the generated UUID:\n    *   *Example:* `AppCheck debug token:\n        \"123a4567-b89c-12d3-e456-789012345678\"`\n4.  Register this token in the Firebase Console under **Security > App Check >\n    Apps > Manage debug tokens**.\n\n##### CI\u002FCD Pipelines (Pre-Provisioned)\n\n1.  Generate and register a new debug token in the Firebase Console under\n    **Security > App Check > Apps > Manage debug tokens**.\n2.  Add this token string as an encrypted secret in your CI system (e.g.\n    `APP_CHECK_DEBUG_TOKEN`).\n3.  Configure your build to pass this secret as an environment variable to the\n    SDK during test execution (e.g. `self.FIREBASE_APPCHECK_DEBUG_TOKEN =\n    process.env.APP_CHECK_DEBUG_TOKEN`).\n\n### Remote Config\n\nConsider that you do not need to hardcode model names (e.g., a specific model\nversion string). Use Firebase Remote Config to update model versions dynamically\nwithout deploying new client code. See\n[Changing model names remotely](https:\u002F\u002Ffirebase.google.com\u002Fdocs\u002Fai-logic\u002Fchange-model-name-remotely.md.txt)\n\n> [!WARNING] **CRITICAL: Backend Provisioning Required** For all platforms\n> (Flutter, Android, iOS, Web), you MUST run `npx firebase-tools init ailogic`\n> to provision the service. `flutterfire configure` ONLY handles client\n> configuration and does NOT enable the AI service, leading to\n> `PERMISSION_DENIED` errors.\n\n## Initialization Code References\n\n| Language,   | Gemini API | Context URL                                     |\n: Framework,  : provider   :                                                 :\n: Platform    :            :                                                 :\n| :---------- | :--------- | :---------------------------------------------- |\n| Web Modular | Gemini     | firebase:\u002F\u002Fdocs\u002Fai-logic\u002Fget-started            |\n: API         : Developer  :                                                 :\n:             : API        :                                                 :\n:             : (Developer :                                                 :\n:             : API)       :                                                 :\n| iOS (Swift) | Gemini     | [ios_setup.md](references\u002Fios_setup.md)         |\n:             : Developer  :                                                 :\n:             : API        :                                                 :\n| Flutter     | Gemini     | [flutter_setup.md](references\u002Fflutter_setup.md) |\n: (Dart)      : Developer  :                                                 :\n:             : API        :                                                 :\n\n> [!WARNING] **CRITICAL: Use current model names:** Always check the\n> [Firebase AI Logic Models documentation](https:\u002F\u002Ffirebase.google.com\u002Fdocs\u002Fai-logic\u002Fmodels.md.txt)\n> for the currently supported model names. Do NOT use `gemini-2.0-pro` or\n> `gemini-2.0-flash` or other older models that are shutdown.\n\n## References\n\n[Web SDK code examples and usage patterns](references\u002Fusage_patterns_web.md)\n[iOS SDK code examples and usage patterns](references\u002Fios_setup.md)\n[Flutter SDK code examples and usage patterns](references\u002Fflutter_setup.md)\n\n[Android (Kotlin) SDK usage patterns](references\u002Fusage_patterns_android.md)\n",{"data":36,"body":38},{"name":4,"description":6,"version":37},"1.0.1",{"type":39,"children":40},"root",[41,49,56,62,67,93,98,104,111,146,152,157,167,172,181,186,195,200,209,214,226,232,279,285,291,296,302,315,321,342,348,372,380,386,392,397,403,409,414,420,433,439,445,463,477,484,496,503,607,613,652,658,670,712,718,739,773,779,798],{"type":42,"tag":43,"props":44,"children":45},"element","h1",{"id":4},[46],{"type":47,"value":48},"text","Firebase AI Logic Basics",{"type":42,"tag":50,"props":51,"children":53},"h2",{"id":52},"overview",[54],{"type":47,"value":55},"Overview",{"type":42,"tag":57,"props":58,"children":59},"p",{},[60],{"type":47,"value":61},"Firebase AI Logic is a product of Firebase that allows developers to add gen AI\nto their mobile and web apps using client-side SDKs. You can call Gemini models\ndirectly from your app without managing a dedicated backend. Firebase AI Logic,\nwhich was previously known as \"Vertex AI for Firebase\", represents the evolution\nof Google's AI integration platform for mobile and web developers.",{"type":42,"tag":57,"props":63,"children":64},{},[65],{"type":47,"value":66},"It supports the two Gemini API providers:",{"type":42,"tag":68,"props":69,"children":70},"ul",{},[71,83],{"type":42,"tag":72,"props":73,"children":74},"li",{},[75,81],{"type":42,"tag":76,"props":77,"children":78},"strong",{},[79],{"type":47,"value":80},"Gemini Developer API",{"type":47,"value":82},": It has a free tier ideal for prototyping, and\npay-as-you-go for production",{"type":42,"tag":72,"props":84,"children":85},{},[86,91],{"type":42,"tag":76,"props":87,"children":88},{},[89],{"type":47,"value":90},"Agent Platform Gemini API",{"type":47,"value":92}," (formerly branded Vertex AI): Ideal for scale\nwith enterprise-grade production readiness, requires Blaze plan",{"type":42,"tag":57,"props":94,"children":95},{},[96],{"type":47,"value":97},"Use the Gemini Developer API as a default, and only Agent Platform Gemini API\n(formerly branded Vertex AI) if the application requires it.",{"type":42,"tag":50,"props":99,"children":101},{"id":100},"setup-initialization",[102],{"type":47,"value":103},"Setup & Initialization",{"type":42,"tag":105,"props":106,"children":108},"h3",{"id":107},"prerequisites",[109],{"type":47,"value":110},"Prerequisites",{"type":42,"tag":68,"props":112,"children":113},{},[114,126,131],{"type":42,"tag":72,"props":115,"children":116},{},[117,119,124],{"type":47,"value":118},"Before starting, ensure you have ",{"type":42,"tag":76,"props":120,"children":121},{},[122],{"type":47,"value":123},"Node.js 16+",{"type":47,"value":125}," and npm installed. Install\nthem if they aren’t already available.",{"type":42,"tag":72,"props":127,"children":128},{},[129],{"type":47,"value":130},"Identify the platform the user is interested in building on prior to\nstarting: Android, iOS, Flutter or Web.",{"type":42,"tag":72,"props":132,"children":133},{},[134,136,144],{"type":47,"value":135},"If their platform is unsupported, Direct the user to Firebase Docs to learn\nhow to set up AI Logic for their application (share this link with the user\n",{"type":42,"tag":137,"props":138,"children":142},"a",{"href":139,"rel":140},"https:\u002F\u002Ffirebase.google.com\u002Fdocs\u002Fai-logic\u002Fget-started",[141],"nofollow",[143],{"type":47,"value":139},{"type":47,"value":145},")",{"type":42,"tag":105,"props":147,"children":149},{"id":148},"installation",[150],{"type":47,"value":151},"Installation",{"type":42,"tag":57,"props":153,"children":154},{},[155],{"type":47,"value":156},"The library is part of the standard Firebase Web SDK.",{"type":42,"tag":57,"props":158,"children":159},{},[160],{"type":42,"tag":161,"props":162,"children":164},"code",{"className":163},[],[165],{"type":47,"value":166},"npm install -g firebase@latest",{"type":42,"tag":57,"props":168,"children":169},{},[170],{"type":47,"value":171},"If you're in a firebase directory (with a firebase.json) the currently selected\nproject will be marked with \"current\" using this command:",{"type":42,"tag":57,"props":173,"children":174},{},[175],{"type":42,"tag":161,"props":176,"children":178},{"className":177},[],[179],{"type":47,"value":180},"npx -y firebase-tools@latest projects:list",{"type":42,"tag":57,"props":182,"children":183},{},[184],{"type":47,"value":185},"Ensure there's at least one app associated with the current project",{"type":42,"tag":57,"props":187,"children":188},{},[189],{"type":42,"tag":161,"props":190,"children":192},{"className":191},[],[193],{"type":47,"value":194},"npx -y firebase-tools@latest apps:list",{"type":42,"tag":57,"props":196,"children":197},{},[198],{"type":47,"value":199},"Initialize AI logic SDK with the init command",{"type":42,"tag":57,"props":201,"children":202},{},[203],{"type":42,"tag":161,"props":204,"children":206},{"className":205},[],[207],{"type":47,"value":208},"npx -y firebase-tools@latest init ailogic",{"type":42,"tag":57,"props":210,"children":211},{},[212],{"type":47,"value":213},"This will automatically enable the Gemini Developer API in the Firebase console.",{"type":42,"tag":57,"props":215,"children":216},{},[217,219],{"type":47,"value":218},"More info in\n",{"type":42,"tag":137,"props":220,"children":223},{"href":221,"rel":222},"https:\u002F\u002Ffirebase.google.com\u002Fdocs\u002Fai-logic\u002Fget-started.md.txt",[141],[224],{"type":47,"value":225},"Firebase AI Logic Getting Started",{"type":42,"tag":50,"props":227,"children":229},{"id":228},"core-capabilities",[230],{"type":47,"value":231},"Core Capabilities",{"type":42,"tag":233,"props":234,"children":235},"blockquote",{},[236],{"type":42,"tag":57,"props":237,"children":238},{},[239,245,247,252,254,261,263,269,271,277],{"type":42,"tag":240,"props":241,"children":242},"span",{},[243],{"type":47,"value":244},"!WARNING",{"type":47,"value":246}," ",{"type":42,"tag":76,"props":248,"children":249},{},[250],{"type":47,"value":251},"CRITICAL: Use current model names:",{"type":47,"value":253}," Always check the\n",{"type":42,"tag":137,"props":255,"children":258},{"href":256,"rel":257},"https:\u002F\u002Ffirebase.google.com\u002Fdocs\u002Fai-logic\u002Fmodels.md.txt",[141],[259],{"type":47,"value":260},"Firebase AI Logic Models documentation",{"type":47,"value":262},"\nfor the currently supported model names. Do NOT use ",{"type":42,"tag":161,"props":264,"children":266},{"className":265},[],[267],{"type":47,"value":268},"gemini-2.0-pro",{"type":47,"value":270}," or\n",{"type":42,"tag":161,"props":272,"children":274},{"className":273},[],[275],{"type":47,"value":276},"gemini-2.0-flash",{"type":47,"value":278}," or other older models that are shutdown.",{"type":42,"tag":105,"props":280,"children":282},{"id":281},"text-only-generation",[283],{"type":47,"value":284},"Text-Only Generation",{"type":42,"tag":105,"props":286,"children":288},{"id":287},"multimodal-text-imagesaudiovideopdf-input",[289],{"type":47,"value":290},"Multimodal (Text + Images\u002FAudio\u002FVideo\u002FPDF input)",{"type":42,"tag":57,"props":292,"children":293},{},[294],{"type":47,"value":295},"Firebase AI Logic allows Gemini models to analyze image files directly from your\napp. This enables features like creating captions, answering questions about\nimages, detecting objects, and categorizing images. Beyond images, Gemini can\nanalyze other media types like audio, video, and PDFs by passing them as inline\ndata with their MIME type. For files larger than 20 megabytes (which can cause\nHTTP 413 errors as inline data), store them in Cloud Storage for Firebase and\npass their URLs to the Gemini Developer API.",{"type":42,"tag":105,"props":297,"children":299},{"id":298},"chat-session-multi-turn",[300],{"type":47,"value":301},"Chat Session (Multi-turn)",{"type":42,"tag":57,"props":303,"children":304},{},[305,307,313],{"type":47,"value":306},"Maintain history automatically using ",{"type":42,"tag":161,"props":308,"children":310},{"className":309},[],[311],{"type":47,"value":312},"startChat",{"type":47,"value":314},".",{"type":42,"tag":105,"props":316,"children":318},{"id":317},"streaming-responses",[319],{"type":47,"value":320},"Streaming Responses",{"type":42,"tag":57,"props":322,"children":323},{},[324,326,332,334,340],{"type":47,"value":325},"To improve the user experience by showing partial results as they arrive (like a\ntyping effect), use ",{"type":42,"tag":161,"props":327,"children":329},{"className":328},[],[330],{"type":47,"value":331},"generateContentStream",{"type":47,"value":333}," instead of ",{"type":42,"tag":161,"props":335,"children":337},{"className":336},[],[338],{"type":47,"value":339},"generateContent",{"type":47,"value":341}," for\nfaster display of results.",{"type":42,"tag":105,"props":343,"children":345},{"id":344},"generate-images-with-nano-banana",[346],{"type":47,"value":347},"Generate Images with Nano Banana",{"type":42,"tag":233,"props":349,"children":350},{},[351],{"type":42,"tag":57,"props":352,"children":353},{},[354,358,359,364,365,370],{"type":42,"tag":240,"props":355,"children":356},{},[357],{"type":47,"value":244},{"type":47,"value":246},{"type":42,"tag":76,"props":360,"children":361},{},[362],{"type":47,"value":363},"Use current Image model names:",{"type":47,"value":253},{"type":42,"tag":137,"props":366,"children":368},{"href":256,"rel":367},[141],[369],{"type":47,"value":260},{"type":47,"value":371},"\nfor the currently supported image generation (Nano Banana) model names.",{"type":42,"tag":68,"props":373,"children":374},{},[375],{"type":42,"tag":72,"props":376,"children":377},{},[378],{"type":47,"value":379},"Requires an upgraded Blaze pay-as-you-go billing plan.",{"type":42,"tag":105,"props":381,"children":383},{"id":382},"search-grounding-with-the-built-in-googlesearch-tool",[384],{"type":47,"value":385},"Search Grounding with the built in googleSearch tool",{"type":42,"tag":50,"props":387,"children":389},{"id":388},"supported-platforms-and-frameworks",[390],{"type":47,"value":391},"Supported Platforms and Frameworks",{"type":42,"tag":57,"props":393,"children":394},{},[395],{"type":47,"value":396},"Supported Platforms and Frameworks include Kotlin and Java for Android, Swift\nfor iOS, JavaScript for web apps, Dart for Flutter, and C Sharp for Unity.",{"type":42,"tag":50,"props":398,"children":400},{"id":399},"advanced-features",[401],{"type":47,"value":402},"Advanced Features",{"type":42,"tag":105,"props":404,"children":406},{"id":405},"structured-output-json",[407],{"type":47,"value":408},"Structured Output (JSON)",{"type":42,"tag":57,"props":410,"children":411},{},[412],{"type":47,"value":413},"Enforce a specific JSON schema for the response.",{"type":42,"tag":105,"props":415,"children":417},{"id":416},"on-device-ai-hybrid",[418],{"type":47,"value":419},"On-Device AI (Hybrid)",{"type":42,"tag":57,"props":421,"children":422},{},[423,425,432],{"type":47,"value":424},"Hybrid on-device inference for web apps, where the Firebase Javascript SDK\nautomatically checks for Gemini Nano's availability (after installation) and\nswitches between on-device or cloud-hosted prompt execution. This requires\nspecific steps to enable model usage in the Chrome browser, more info in the\n",{"type":42,"tag":137,"props":426,"children":429},{"href":427,"rel":428},"https:\u002F\u002Ffirebase.google.com\u002Fdocs\u002Fai-logic\u002Fhybrid-on-device-inference.md.txt",[141],[430],{"type":47,"value":431},"hybrid-on-device-inference documentation",{"type":47,"value":314},{"type":42,"tag":50,"props":434,"children":436},{"id":435},"security-production",[437],{"type":47,"value":438},"Security & Production",{"type":42,"tag":105,"props":440,"children":442},{"id":441},"app-check",[443],{"type":47,"value":444},"App Check",{"type":42,"tag":233,"props":446,"children":447},{},[448],{"type":42,"tag":57,"props":449,"children":450},{},[451,455,456,461],{"type":42,"tag":240,"props":452,"children":453},{},[454],{"type":47,"value":244},{"type":47,"value":246},{"type":42,"tag":76,"props":457,"children":458},{},[459],{"type":47,"value":460},"Critical Safety Requirement:",{"type":47,"value":462}," In order to use AI Logic safely,\nyou MUST set up App Check on your app. This prevents unauthorized clients from\nusing your API quota and accessing your backend resources.",{"type":42,"tag":57,"props":464,"children":465},{},[466,468,475],{"type":47,"value":467},"See\n",{"type":42,"tag":137,"props":469,"children":472},{"href":470,"rel":471},"https:\u002F\u002Ffirebase.google.com\u002Fdocs\u002Fapp-check\u002Fweb\u002Frecaptcha-enterprise-provider.md.txt",[141],[473],{"type":47,"value":474},"App Check with reCAPTCHA Enterprise",{"type":47,"value":476},"\nfor setup instructions.",{"type":42,"tag":478,"props":479,"children":481},"h4",{"id":480},"app-check-debug-tokens-for-local-development-cicd",[482],{"type":47,"value":483},"App Check Debug Tokens for Local Development & CI\u002FCD",{"type":42,"tag":57,"props":485,"children":486},{},[487,489,494],{"type":47,"value":488},"Because App Check attestation providers (like Play Integrity or DeviceCheck)\nreject emulators, simulators, or CI environments, you must use ",{"type":42,"tag":76,"props":490,"children":491},{},[492],{"type":47,"value":493},"App Check Debug\nTokens",{"type":47,"value":495}," during development and testing to bypass standard attestation.",{"type":42,"tag":497,"props":498,"children":500},"h5",{"id":499},"local-development-auto-generated",[501],{"type":47,"value":502},"Local Development (Auto-Generated)",{"type":42,"tag":504,"props":505,"children":506},"ol",{},[507,567,572,596],{"type":42,"tag":72,"props":508,"children":509},{},[510,512],{"type":47,"value":511},"Configure your code's App Check provider to use the debug factory:\n",{"type":42,"tag":68,"props":513,"children":514},{},[515,533,550],{"type":42,"tag":72,"props":516,"children":517},{},[518,523,525,531],{"type":42,"tag":76,"props":519,"children":520},{},[521],{"type":47,"value":522},"Web",{"type":47,"value":524},": Set ",{"type":42,"tag":161,"props":526,"children":528},{"className":527},[],[529],{"type":47,"value":530},"self.FIREBASE_APPCHECK_DEBUG_TOKEN = true;",{"type":47,"value":532}," before\ninitializing App Check.",{"type":42,"tag":72,"props":534,"children":535},{},[536,541,543,549],{"type":42,"tag":76,"props":537,"children":538},{},[539],{"type":47,"value":540},"Android",{"type":47,"value":542},": Install ",{"type":42,"tag":161,"props":544,"children":546},{"className":545},[],[547],{"type":47,"value":548},"DebugAppCheckProviderFactory.getInstance()",{"type":47,"value":314},{"type":42,"tag":72,"props":551,"children":552},{},[553,558,560,566],{"type":42,"tag":76,"props":554,"children":555},{},[556],{"type":47,"value":557},"iOS",{"type":47,"value":559},": Set provider factory to ",{"type":42,"tag":161,"props":561,"children":563},{"className":562},[],[564],{"type":47,"value":565},"AppCheckDebugProviderFactory()",{"type":47,"value":314},{"type":42,"tag":72,"props":568,"children":569},{},[570],{"type":47,"value":571},"Run your app in the emulator\u002Flocalhost.",{"type":42,"tag":72,"props":573,"children":574},{},[575,577],{"type":47,"value":576},"Look at your runtime debugger console \u002F Logcat logs for the generated UUID:\n",{"type":42,"tag":68,"props":578,"children":579},{},[580],{"type":42,"tag":72,"props":581,"children":582},{},[583,589,590],{"type":42,"tag":584,"props":585,"children":586},"em",{},[587],{"type":47,"value":588},"Example:",{"type":47,"value":246},{"type":42,"tag":161,"props":591,"children":593},{"className":592},[],[594],{"type":47,"value":595},"AppCheck debug token: \"123a4567-b89c-12d3-e456-789012345678\"",{"type":42,"tag":72,"props":597,"children":598},{},[599,601,606],{"type":47,"value":600},"Register this token in the Firebase Console under ",{"type":42,"tag":76,"props":602,"children":603},{},[604],{"type":47,"value":605},"Security > App Check >\nApps > Manage debug tokens",{"type":47,"value":314},{"type":42,"tag":497,"props":608,"children":610},{"id":609},"cicd-pipelines-pre-provisioned",[611],{"type":47,"value":612},"CI\u002FCD Pipelines (Pre-Provisioned)",{"type":42,"tag":504,"props":614,"children":615},{},[616,627,640],{"type":42,"tag":72,"props":617,"children":618},{},[619,621,626],{"type":47,"value":620},"Generate and register a new debug token in the Firebase Console under\n",{"type":42,"tag":76,"props":622,"children":623},{},[624],{"type":47,"value":625},"Security > App Check > Apps > Manage debug tokens",{"type":47,"value":314},{"type":42,"tag":72,"props":628,"children":629},{},[630,632,638],{"type":47,"value":631},"Add this token string as an encrypted secret in your CI system (e.g.\n",{"type":42,"tag":161,"props":633,"children":635},{"className":634},[],[636],{"type":47,"value":637},"APP_CHECK_DEBUG_TOKEN",{"type":47,"value":639},").",{"type":42,"tag":72,"props":641,"children":642},{},[643,645,651],{"type":47,"value":644},"Configure your build to pass this secret as an environment variable to the\nSDK during test execution (e.g. ",{"type":42,"tag":161,"props":646,"children":648},{"className":647},[],[649],{"type":47,"value":650},"self.FIREBASE_APPCHECK_DEBUG_TOKEN = process.env.APP_CHECK_DEBUG_TOKEN",{"type":47,"value":639},{"type":42,"tag":105,"props":653,"children":655},{"id":654},"remote-config",[656],{"type":47,"value":657},"Remote Config",{"type":42,"tag":57,"props":659,"children":660},{},[661,663],{"type":47,"value":662},"Consider that you do not need to hardcode model names (e.g., a specific model\nversion string). Use Firebase Remote Config to update model versions dynamically\nwithout deploying new client code. See\n",{"type":42,"tag":137,"props":664,"children":667},{"href":665,"rel":666},"https:\u002F\u002Ffirebase.google.com\u002Fdocs\u002Fai-logic\u002Fchange-model-name-remotely.md.txt",[141],[668],{"type":47,"value":669},"Changing model names remotely",{"type":42,"tag":233,"props":671,"children":672},{},[673],{"type":42,"tag":57,"props":674,"children":675},{},[676,680,681,686,688,694,696,702,704,710],{"type":42,"tag":240,"props":677,"children":678},{},[679],{"type":47,"value":244},{"type":47,"value":246},{"type":42,"tag":76,"props":682,"children":683},{},[684],{"type":47,"value":685},"CRITICAL: Backend Provisioning Required",{"type":47,"value":687}," For all platforms\n(Flutter, Android, iOS, Web), you MUST run ",{"type":42,"tag":161,"props":689,"children":691},{"className":690},[],[692],{"type":47,"value":693},"npx firebase-tools init ailogic",{"type":47,"value":695},"\nto provision the service. ",{"type":42,"tag":161,"props":697,"children":699},{"className":698},[],[700],{"type":47,"value":701},"flutterfire configure",{"type":47,"value":703}," ONLY handles client\nconfiguration and does NOT enable the AI service, leading to\n",{"type":42,"tag":161,"props":705,"children":707},{"className":706},[],[708],{"type":47,"value":709},"PERMISSION_DENIED",{"type":47,"value":711}," errors.",{"type":42,"tag":50,"props":713,"children":715},{"id":714},"initialization-code-references",[716],{"type":47,"value":717},"Initialization Code References",{"type":42,"tag":57,"props":719,"children":720},{},[721,723,729,731,737],{"type":47,"value":722},"| Language,   | Gemini API | Context URL                                     |\n: Framework,  : provider   :                                                 :\n: Platform    :            :                                                 :\n| :---------- | :--------- | :---------------------------------------------- |\n| Web Modular | Gemini     | firebase:\u002F\u002Fdocs\u002Fai-logic\u002Fget-started            |\n: API         : Developer  :                                                 :\n:             : API        :                                                 :\n:             : (Developer :                                                 :\n:             : API)       :                                                 :\n| iOS (Swift) | Gemini     | ",{"type":42,"tag":137,"props":724,"children":726},{"href":725},"references\u002Fios_setup.md",[727],{"type":47,"value":728},"ios_setup.md",{"type":47,"value":730},"         |\n:             : Developer  :                                                 :\n:             : API        :                                                 :\n| Flutter     | Gemini     | ",{"type":42,"tag":137,"props":732,"children":734},{"href":733},"references\u002Fflutter_setup.md",[735],{"type":47,"value":736},"flutter_setup.md",{"type":47,"value":738}," |\n: (Dart)      : Developer  :                                                 :\n:             : API        :                                                 :",{"type":42,"tag":233,"props":740,"children":741},{},[742],{"type":42,"tag":57,"props":743,"children":744},{},[745,749,750,754,755,760,761,766,767,772],{"type":42,"tag":240,"props":746,"children":747},{},[748],{"type":47,"value":244},{"type":47,"value":246},{"type":42,"tag":76,"props":751,"children":752},{},[753],{"type":47,"value":251},{"type":47,"value":253},{"type":42,"tag":137,"props":756,"children":758},{"href":256,"rel":757},[141],[759],{"type":47,"value":260},{"type":47,"value":262},{"type":42,"tag":161,"props":762,"children":764},{"className":763},[],[765],{"type":47,"value":268},{"type":47,"value":270},{"type":42,"tag":161,"props":768,"children":770},{"className":769},[],[771],{"type":47,"value":276},{"type":47,"value":278},{"type":42,"tag":50,"props":774,"children":776},{"id":775},"references",[777],{"type":47,"value":778},"References",{"type":42,"tag":57,"props":780,"children":781},{},[782,788,793],{"type":42,"tag":137,"props":783,"children":785},{"href":784},"references\u002Fusage_patterns_web.md",[786],{"type":47,"value":787},"Web SDK code examples and usage patterns",{"type":42,"tag":137,"props":789,"children":790},{"href":725},[791],{"type":47,"value":792},"iOS SDK code examples and usage patterns",{"type":42,"tag":137,"props":794,"children":795},{"href":733},[796],{"type":47,"value":797},"Flutter SDK code examples and usage patterns",{"type":42,"tag":57,"props":799,"children":800},{},[801],{"type":42,"tag":137,"props":802,"children":804},{"href":803},"references\u002Fusage_patterns_android.md",[805],{"type":47,"value":806},"Android (Kotlin) SDK usage patterns",{"items":808,"total":992},[809,825,832,852,867,883,901,917,930,943,961,977],{"slug":810,"name":810,"fn":811,"description":812,"org":813,"tags":814,"stars":24,"repoUrl":25,"updatedAt":824},"extension-to-functions-codebase","convert Firebase Extensions to Cloud Functions","Skill for converting an installed Firebase Extension (or extension source) to a standalone Cloud Functions for Firebase codebase or publishable npm package, including upgrading triggers from V1 to V2 and configuring lifecycle hooks and declarative security",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[815,818,819,822],{"name":816,"slug":817,"type":15},"Cloud Functions","cloud-functions",{"name":23,"slug":8,"type":15},{"name":820,"slug":821,"type":15},"Migration","migration",{"name":823,"slug":823,"type":15},"npm","2026-07-31T06:23:32.436718",{"slug":4,"name":4,"fn":5,"description":6,"org":826,"tags":827,"stars":24,"repoUrl":25,"updatedAt":26},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[828,829,830,831],{"name":13,"slug":14,"type":15},{"name":23,"slug":8,"type":15},{"name":20,"slug":21,"type":15},{"name":17,"slug":18,"type":15},{"slug":833,"name":833,"fn":834,"description":835,"org":836,"tags":837,"stars":24,"repoUrl":25,"updatedAt":851},"firebase-app-hosting-basics","deploy web apps with Firebase App Hosting","Deploys and manages full-stack web applications (Next.js, Angular) with Server-Side Rendering (SSR) using Firebase App Hosting. Use when deploying Next.js\u002FAngular apps, configuring apphosting.yaml or firebase.json apphosting blocks, managing secrets, setting up GitHub CI\u002FCD, or configuring Blaze billing requirements. Don't use for classic static web hosting, Auth, Firestore, Crashlytics, or Xcode.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[838,841,844,845,848],{"name":839,"slug":840,"type":15},"Angular","angular",{"name":842,"slug":843,"type":15},"Deployment","deployment",{"name":23,"slug":8,"type":15},{"name":846,"slug":847,"type":15},"Frontend","frontend",{"name":849,"slug":850,"type":15},"Next.js","next-js","2026-07-31T05:53:19.57287",{"slug":853,"name":853,"fn":854,"description":855,"org":856,"tags":857,"stars":24,"repoUrl":25,"updatedAt":866},"firebase-auth-basics","set up Firebase Authentication","Guide 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.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[858,861,862,863],{"name":859,"slug":860,"type":15},"Auth","auth",{"name":13,"slug":14,"type":15},{"name":23,"slug":8,"type":15},{"name":864,"slug":865,"type":15},"Security","security","2026-07-31T05:53:20.79137",{"slug":868,"name":868,"fn":869,"description":870,"org":871,"tags":872,"stars":24,"repoUrl":25,"updatedAt":882},"firebase-basics","build applications with Firebase","Provides 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\u002Fswitching, or downloading app config files. Don't use for Firebase Hosting deploy, Firestore, Auth, App Hosting, Data Connect, Crashlytics, or Remote Config.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[873,876,877,880,881],{"name":874,"slug":875,"type":15},"Authentication","authentication",{"name":13,"slug":14,"type":15},{"name":878,"slug":879,"type":15},"Database","database",{"name":842,"slug":843,"type":15},{"name":23,"slug":8,"type":15},"2026-07-31T05:53:21.570684",{"slug":884,"name":884,"fn":885,"description":886,"org":887,"tags":888,"stars":24,"repoUrl":25,"updatedAt":900},"firebase-crashlytics","set up and manage Firebase Crashlytics","Comprehensive guide for Firebase Crashlytics, including provisioning and SDK usage. Use this skill when the user needs help setting up Crashlytics, adding crash reporting, or using the Crashlytics SDK in their application.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[889,891,892,894,897],{"name":540,"slug":890,"type":15},"android",{"name":23,"slug":8,"type":15},{"name":557,"slug":893,"type":15},"ios",{"name":895,"slug":896,"type":15},"Mobile","mobile",{"name":898,"slug":899,"type":15},"Observability","observability","2026-05-01T05:54:14.072678",{"slug":902,"name":902,"fn":903,"description":904,"org":905,"tags":906,"stars":24,"repoUrl":25,"updatedAt":916},"firebase-data-connect","build backends with Firebase Data Connect","Builds 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.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[907,908,909,910,913],{"name":13,"slug":14,"type":15},{"name":878,"slug":879,"type":15},{"name":23,"slug":8,"type":15},{"name":911,"slug":912,"type":15},"GraphQL","graphql",{"name":914,"slug":915,"type":15},"PostgreSQL","postgresql","2026-04-06T18:12:07.681031",{"slug":918,"name":918,"fn":919,"description":920,"org":921,"tags":922,"stars":24,"repoUrl":25,"updatedAt":929},"firebase-firestore","manage and query Cloud Firestore databases","Sets up, manages, queries, and configures Cloud Firestore databases (Standard\u002FEnterprise edition), including data modeling, security rules, indexes, and SDK integrations (Web, Python, iOS, Android, Flutter). Use when creating\u002Flisting Firestore databases, defining data models\u002Findexes, writing SDK queries, or integrating Firestore SDKs. Don't use for Firebase Hosting, Data Connect, Auth, Storage\u002FGCS, Crashlytics, Functions, or BigQuery.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[923,924,925,926],{"name":13,"slug":14,"type":15},{"name":878,"slug":879,"type":15},{"name":23,"slug":8,"type":15},{"name":927,"slug":928,"type":15},"NoSQL","nosql","2026-07-31T05:53:17.562137",{"slug":931,"name":931,"fn":932,"description":933,"org":934,"tags":935,"stars":24,"repoUrl":25,"updatedAt":942},"firebase-hosting-basics","deploy static apps with Firebase Hosting","Deploys and configures classic Firebase Hosting for static websites, single-page apps (SPAs), and microservices. Use when deploying static sites\u002FSPAs, 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\u002FSSR), Auth, Firestore queries\u002Frules, Data Connect, or Crashlytics.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[936,937,938,939],{"name":842,"slug":843,"type":15},{"name":23,"slug":8,"type":15},{"name":846,"slug":847,"type":15},{"name":940,"slug":941,"type":15},"Web Development","web-development","2026-07-31T05:53:22.565034",{"slug":944,"name":944,"fn":945,"description":946,"org":947,"tags":948,"stars":24,"repoUrl":25,"updatedAt":960},"firebase-remote-config-basics","manage Firebase Remote Config and feature flags","Manages Firebase Remote Config templates, feature flags, loading strategies, and SDKs (Android, iOS). Use when downloading\u002Fdeploying remoteconfig JSON templates, managing version history\u002Ffeature flags, setting in-app defaults, fetchAndActivate(), real-time listeners, or SDK setup. Don't use for Firebase Hosting, Auth, Firestore, Data Connect, Crashlytics, or App Hosting.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[949,952,955,956,957],{"name":950,"slug":951,"type":15},"Configuration","configuration",{"name":953,"slug":954,"type":15},"Feature Flags","feature-flags",{"name":23,"slug":8,"type":15},{"name":895,"slug":896,"type":15},{"name":958,"slug":959,"type":15},"SDK","sdk","2026-07-31T05:53:18.552749",{"slug":962,"name":962,"fn":963,"description":964,"org":965,"tags":966,"stars":24,"repoUrl":25,"updatedAt":976},"firebase-security-rules-auditor","audit Firestore security rules","Audits Firebase (Firestore, Cloud Storage) security rules for vulnerabilities, privilege escalation, role bypasses, create vs update inconsistencies, resource exhaustion, type safety, size limits, and hasOnly ownership checks. Use when auditing\u002Freviewing rules, running red-team rule assessments, or scoring against auditor checklists. Don't use for Firebase CLI (login, deploy), Auth, Crashlytics, Remote Config, or database queries.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[967,970,973,974,975],{"name":968,"slug":969,"type":15},"Audit","audit",{"name":971,"slug":972,"type":15},"Compliance","compliance",{"name":878,"slug":879,"type":15},{"name":23,"slug":8,"type":15},{"name":864,"slug":865,"type":15},"2026-07-31T05:53:16.588011",{"slug":978,"name":978,"fn":979,"description":980,"org":981,"tags":982,"stars":24,"repoUrl":25,"updatedAt":991},"xcode-project-setup","manage Xcode project dependencies and packages","Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[983,984,985,988],{"name":557,"slug":893,"type":15},{"name":895,"slug":896,"type":15},{"name":986,"slug":987,"type":15},"Swift","swift",{"name":989,"slug":990,"type":15},"Xcode","xcode","2026-05-01T05:54:12.834251",12,{"items":994,"total":992},[995,1002,1009,1017,1024,1032,1040],{"slug":810,"name":810,"fn":811,"description":812,"org":996,"tags":997,"stars":24,"repoUrl":25,"updatedAt":824},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[998,999,1000,1001],{"name":816,"slug":817,"type":15},{"name":23,"slug":8,"type":15},{"name":820,"slug":821,"type":15},{"name":823,"slug":823,"type":15},{"slug":4,"name":4,"fn":5,"description":6,"org":1003,"tags":1004,"stars":24,"repoUrl":25,"updatedAt":26},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1005,1006,1007,1008],{"name":13,"slug":14,"type":15},{"name":23,"slug":8,"type":15},{"name":20,"slug":21,"type":15},{"name":17,"slug":18,"type":15},{"slug":833,"name":833,"fn":834,"description":835,"org":1010,"tags":1011,"stars":24,"repoUrl":25,"updatedAt":851},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1012,1013,1014,1015,1016],{"name":839,"slug":840,"type":15},{"name":842,"slug":843,"type":15},{"name":23,"slug":8,"type":15},{"name":846,"slug":847,"type":15},{"name":849,"slug":850,"type":15},{"slug":853,"name":853,"fn":854,"description":855,"org":1018,"tags":1019,"stars":24,"repoUrl":25,"updatedAt":866},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1020,1021,1022,1023],{"name":859,"slug":860,"type":15},{"name":13,"slug":14,"type":15},{"name":23,"slug":8,"type":15},{"name":864,"slug":865,"type":15},{"slug":868,"name":868,"fn":869,"description":870,"org":1025,"tags":1026,"stars":24,"repoUrl":25,"updatedAt":882},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1027,1028,1029,1030,1031],{"name":874,"slug":875,"type":15},{"name":13,"slug":14,"type":15},{"name":878,"slug":879,"type":15},{"name":842,"slug":843,"type":15},{"name":23,"slug":8,"type":15},{"slug":884,"name":884,"fn":885,"description":886,"org":1033,"tags":1034,"stars":24,"repoUrl":25,"updatedAt":900},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1035,1036,1037,1038,1039],{"name":540,"slug":890,"type":15},{"name":23,"slug":8,"type":15},{"name":557,"slug":893,"type":15},{"name":895,"slug":896,"type":15},{"name":898,"slug":899,"type":15},{"slug":902,"name":902,"fn":903,"description":904,"org":1041,"tags":1042,"stars":24,"repoUrl":25,"updatedAt":916},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1043,1044,1045,1046,1047],{"name":13,"slug":14,"type":15},{"name":878,"slug":879,"type":15},{"name":23,"slug":8,"type":15},{"name":911,"slug":912,"type":15},{"name":914,"slug":915,"type":15}]