Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

firebase-ai-logic-basics

Skill by firebase

Adds Firebase AI Logic to Android, iOS, Web and Flutter apps so client code can call Gemini models. It is for developers who want gen AI features in an app without managing a dedicated backend.

  • Score 87
  • 535 stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install firebase-ai-logic-basics

Built from the published package, never by AI.

git clone --depth 1 https://github.com/firebase/agent-skills /tmp/agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/agent-skills/skills/firebase-ai-logic-basics ~/.claude/skills/firebase-ai-logic-basics

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install firebase-ai-logic-basics in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

Firebase AI Logic lets developers add gen AI to mobile and web apps using client-side SDKs. The app calls Gemini models directly, so the developer does not need to manage a dedicated backend. The skill covers provisioning the service with the Firebase CLI, adding the SDK, and initializing it on Android, iOS, Web and Flutter, with a reference file for each platform.

It covers text generation, multimodal input, chat, streaming, text-to-speech, structured output and hybrid on-device inference. It also covers App Check protection and switching model names with Firebase Remote Config. The source defaults to the Gemini Developer API and names the Agent Platform Gemini API as an option for enterprise scale. It is aimed at developers building Gemini features into client apps.

Written from the project's SKILL.md and checked against it.

What it can do

  • Text generationCalls Gemini models from client code to generate text in a mobile or web app.
  • Multimodal inputSends images, audio, video and PDFs to Gemini as inline data with a MIME type.
  • Chat sessionsKeeps multi-turn conversation history using startChat.
  • Streaming responsesUses generateContentStream to show partial results as they arrive.
  • Text-to-speechGenerates spoken audio with Gemini TTS models, with up to 2 speakers in dialogues.
  • Structured outputEnforces a specific JSON schema for the model response.
  • Hybrid on-device inferenceRuns prompts on an on-device model when one is available, with a cloud fallback.
  • App Check setupGuides App Check protection and the use of debug tokens for local development and CI.

What you need

  • Node.js 20+ and npm
  • Firebase CLI access to a Firebase project
  • Blaze pay-as-you-go plan for image generation
  • Firebase app registered for Android, iOS, Web or Flutter

Try asking

  • Add Gemini text generation to my Flutter app with Firebase AI Logic
  • Set up streaming chat with Gemini in my Android app
  • Add App Check and Remote Config model switching to my Firebase AI Logic setup

Good to know

  • Image generation requires an upgraded Blaze pay-as-you-go billing plan.
  • Inline files larger than 20 MB can cause HTTP 413 errors, so the source suggests Cloud Storage for them.
  • Gemini 1.x and 2.x models should not be used, as the source says they are deprecated or shut down.
  • Debug tokens must never be committed or hardcoded in client code.

Security check

C
  • Asks for administrator rights (sudo)In skills/firebase-ai-logic-basics/SKILL.md: `sudo

Checked automatically: skills/firebase-ai-logic-basics/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md12 KB
  • references/flutter_setup.md5 KB
  • references/ios_setup.md8 KB
  • references/tts_generation.md22 KB
  • references/usage_patterns_android.md7 KB
Show all 6 files
  • references/usage_patterns_web.md9 KB

Alternatives to firebase-ai-logic-basics

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

firebase-ai-logic-basics: common questions

Which Gemini API provider does it use by default?

The source says to use the Gemini Developer API as a default. It says to use the Agent Platform Gemini API, formerly Vertex AI, only if the application requires it.

Does the app need its own backend?

No. The source says the app can call Gemini models directly through client-side SDKs without the developer managing a dedicated backend.

Why does the skill insist on App Check?

The source says App Check prevents unauthorized clients from using your API quota and accessing your backend resources.

How do I install firebase-ai-logic-basics?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is firebase-ai-logic-basics free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is firebase-ai-logic-basics safe to use?

It scores 87 of 100. Grades: maintenance A, licence A, quality A. Security check: grade C (asks for administrator rights (sudo)). Review the code before you install. How grades work.

What are alternatives to firebase-ai-logic-basics?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

firebase-ai-logic-basics Install

Add to stack

Loading.