firebase-ai-logic
Installation
SKILL.md
Firebase AI Logic
Overview
Firebase AI Logic enables secure, client-side integration with Google's Gemini AI models through Firebase SDKs. This skill provides production-ready patterns for implementing AI features including chat, structured output (JSON), streaming responses, cost optimization, and security best practices. Renamed from "Vertex AI in Firebase" in May 2025.
When to Use This Skill
This skill should be used when working with:
- Gemini API integration via Firebase (Web, Android, iOS, Flutter, React Native, Unity)
- Structured JSON output with responseSchema (saving to Firestore/databases)
- Multi-turn chat conversations with automatic history management
- Streaming responses for real-time UI updates
- System instructions for model behavior customization
- Security configuration (App Check, API key protection, rate limiting)
- Cost optimization (token counting, prompt optimization, batch processing)
- Troubleshooting AI Logic errors (429 rate limits, schema validation, location mismatches)