firebase-ai-logic-basics

firebase-ai-logic-basics is a skill for Claude Code from firebase/agent-skills. It costs 36 tokens per session (1,927 once invoked), scanned A, original, Apache-2.0.

A guide for adding Firebase AI Logic to web and mobile applications. Firebase AI Logic is a Firebase service that lets an app call Gemini artificial-intelligence models through client-side software.

In plain words
What is it for?
Use it to set up Gemini in Android, iOS, Flutter, or web apps, handle multimodal input and structured results, and apply the documented security setup.
Why use it?
It explains how to choose and configure the supported Gemini API options without managing a separate backend for model calls.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the firebase plugin — 12 skills, 1 MCP server shipped together

Good fit Use it to set up Gemini in Android, iOS, Flutter, or web apps, handle multimodal input and structured results, and apply the documented security setup.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/firebase/agent-skills/firebase-ai-logic-basics
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add firebase/agent-skills --skill firebase-ai-logic-basics
Clone the repo
git clone --depth 1 https://github.com/firebase/agent-skills

Made for: Claude Code.

Or install firebase, the plugin that ships this one along with the rest of its 12 skills, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for firebase-ai-logic-basics

README.md
[![agentmods](https://agentmods.dev/badge/skills/firebase/agent-skills/firebase-ai-logic-basics.svg)](https://agentmods.dev/skills/firebase/agent-skills/firebase-ai-logic-basics)
Your own site
<a href="https://agentmods.dev/skills/firebase/agent-skills/firebase-ai-logic-basics"><img src="https://agentmods.dev/badge/skills/firebase/agent-skills/firebase-ai-logic-basics.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,927 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 3 May 2026
  • Snyk warn 3 May 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 50
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 54
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 58
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 173
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.01927
Opus 5 $0.00018 $0.00963
Sonnet 5 $0.00007 $0.00385
Haiku 4.5 $0.00004 $0.00193

Measured 8d ago against content hash f19b7e457259, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

firebase-ai-logic-basics scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/firebase-ai-logic-basics/SKILL.md · 208 lines

How it starts

The opening of the file, as written. The whole thing — 208 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Firebase AI Logic Basics

Overview

Firebase AI Logic is a product of Firebase that allows developers to add gen AI to their mobile and web apps using client-side SDKs. You can call Gemini models directly from your app without managing a dedicated backend. Firebase AI Logic, which was previously known as "Vertex AI for Firebase", represents the evolution of Google's AI integration platform for mobile and web developers.

It supports the two Gemini API providers:

  • Gemini Developer API: It has a free tier ideal for prototyping, and pay-as-you-go for production
  • Agent Platform Gemini API (formerly branded Vertex AI): Ideal for scale with enterprise-grade production readiness, requires Blaze plan

Use the Gemini Developer API as a default, and only Agent Platform Gemini API (formerly branded Vertex AI) if the application requires it.

Setup & Initialization

Prerequisites

  • Before starting, ensure you have Node.js 16+ and npm installed. Install them if they aren’t already available.
  • Identify the platform the user is interested in building on prior to starting: Android, iOS, Flutter or Web.
  • If their platform is unsupported, Direct the user to Firebase Docs to learn how to set up AI Logic for their application (share this link with the user https://firebase.google.com/docs/ai-logic/get-started)

Installation

The library is part of the standard Firebase Web SDK.

npm install -g firebase@latest

If you're in a firebase directory (with a firebase.json) the currently selected project will be marked with "current" using this command:

npx -y firebase-tools@latest projects:list

Ensure there's at least one app associated with the current project

npx -y firebase-tools@latest apps:list

Initialize AI logic SDK with the init command

npx -y firebase-tools@latest init ailogic

This will automatically enable the Gemini Developer API in the Firebase console.

More info in Firebase AI Logic Getting Started

Read the full file on GitHub · 208 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 208 lines · 36 tokens per session scan A f19b7e457259

Subscribe to this mod's changes

firebase-ai-logic-basics is a skill published in the GitHub repository firebase/agent-skills (435 stars, last pushed 4d ago), licensed Apache-2.0. It adds 36 tokens to every session and 1,927 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

gemini-api-agent-platform

Guides the usage of the Gemini API on Agent Platform with the Google Gen AI SDK for enterprise AI applications. Covers SDK usage (Python, JS/TS, Go, Java, C#), capabilities like Live API, tools, multimedia generation, caching, and batch prediction.

davila7/claude-code-templates · 61 tokens

open-source

Documentation reference for writing Python code using the browser-use open-source library. Use this skill whenever the user needs help with Agent, Browser, or Tools configuration, is writing code that imports from browseruse, asks about @sandbox deployment, supported LLM models, Actor API, custom tools, lifecycle…

browser-use/browser-use · 137 tokens

gemini-api-dev

Use this skill when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, streaming responses, background research tasks, function calling, structured output, or migrating from the old generateContent API. Covers SDK usage and best…

google-gemini/gemini-skills · 73 tokens

deepstream-sop

Use this skill when building, deploying, evaluating, debugging, or measuring latency for the DeepStream SOP Inference Microservice — a GPU-accelerated FastAPI service that detects whether operators perform assembly-line steps in order via event boundary detection (GEBD) plus VLM classification. Trigger even if the…

NVIDIA/skills · 219 tokens

azure-search-documents-dotnet

Azure AI Search SDK for .NET (Azure.Search.Documents). Use for building search applications with full-text, vector, semantic, and hybrid search. Covers SearchClient (queries, document CRUD), SearchIndexClient (index management), and SearchIndexerClient (indexers, skillsets). Triggers: "Azure Search .NET"…

microsoft/skills · 102 tokens

azure-search-documents-ts

Build search applications using Azure AI Search SDK for JavaScript (@azure/search-documents). Use when creating/managing indexes, implementing vector/hybrid search, semantic ranking, or building agentic retrieval with knowledge bases.

microsoft/skills · 48 tokens