firebase-ai-logic

firebase-ai-logic is a skill for Claude Code, Codex from GDvega/super-android-kotlin-firebase-skill. It costs 33 tokens per session (595 once invoked), scanned A, original, MIT.

A design and implementation guide for adding Firebase AI Logic or Gemini features to Android apps. It covers model choice, prompts, privacy, errors, fallbacks, and keeping private keys out of the app.

In plain words
What is it for?
Use it to plan AI features, choose cloud or on-device processing, validate model output, handle limits and failures, add deterministic fallback behavior, and test the AI boundary.
Why use it?
It helps define what data is sent to an AI model and what happens when the model is unavailable or wrong, while protecting sensitive information.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: $skill-name invocation.

Good fit Use it to plan AI features, choose cloud or on-device processing, validate model output, handle limits and failures, add deterministic fallback behavior, and test the AI boundary.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gdvega/super-android-kotlin-firebase-skill/firebase-ai-logic
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 GDvega/super-android-kotlin-firebase-skill --skill firebase-ai-logic
Clone the repo
git clone --depth 1 https://github.com/GDvega/super-android-kotlin-firebase-skill

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/gdvega/super-android-kotlin-firebase-skill/firebase-ai-logic/github.svg)](https://agentmods.dev/skills/gdvega/super-android-kotlin-firebase-skill/firebase-ai-logic)
Your own site
<a href="https://agentmods.dev/skills/gdvega/super-android-kotlin-firebase-skill/firebase-ai-logic"><img src="https://agentmods.dev/badge/skills/gdvega/super-android-kotlin-firebase-skill/firebase-ai-logic/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for firebase-ai-logic

Your own site · 80×15
<a href="https://agentmods.dev/skills/gdvega/super-android-kotlin-firebase-skill/firebase-ai-logic"><img src="https://agentmods.dev/badge/skills/gdvega/super-android-kotlin-firebase-skill/firebase-ai-logic.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 595 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.
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.00033 $0.00595
Opus 5 $0.00016 $0.00298
Sonnet 5 $0.00007 $0.00119
Haiku 4.5 $0.00003 $0.00060

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

Security

Grade A, and why

firebase-ai-logic 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 12d 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.

skills/firebase-ai-logic/SKILL.md · 101 lines

How it starts

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

Purpose

Add Gemini/AI features to Android apps safely, with clear privacy and fallback behavior.

When to use

  • Adding Firebase AI Logic or Gemini features.
  • Designing prompts or multimodal input.
  • Choosing cloud vs on-device AI.
  • Handling model errors, limits and fallback UX.

Inputs to inspect

  • AI use case and user value.
  • Data sent to model and privacy classification.
  • Firebase/Google AI provider choice.
  • Fallback and human review requirements.

Required workflow

  1. Classify data and decide if AI is appropriate.
  2. Choose Firebase AI Logic, backend proxy or on-device path.
  3. Design prompts and output validation.
  4. Handle rate limits, safety and offline fallback.
  5. Add fakes/tests for AI boundaries.

Rules

  • Do not expose private API keys in the client.
  • Minimize sensitive data sent to models.
  • Do not rely on AI for critical irreversible decisions without review.
  • Validate structured outputs.
  • Provide deterministic fallback.

Local skills to invoke

  • firebase-core
  • security-privacy
  • networking-retrofit-ktor
  • ui-state-design
  • testing

External companion skills to use when installed

Do not assume these companion skills are installed. Prefer the local skills above first, then consult Companion Skills for install and verification commands.

  • firebase/agent-skills — use for deeper Firebase product, Firestore, Security Rules or emulator workflow guidance when installed.

Files commonly touched

  • AI repository/service
  • prompt templates
  • ViewModel state
  • Firebase setup
  • tests/fakes

Commands to validate

./gradlew test
./gradlew assembleDebug
firebase emulators:start

Common mistakes to avoid

  • Hardcoding secret keys.
  • Sending unnecessary PII.
  • Trusting AI output without validation.
  • No fallback or error UX.

Checklist

  • Privacy reviewed.
  • Provider chosen.
  • Prompt/output validated.
  • Fallback exists.
  • Tests/fakes included.

Example prompts

Read the full file on GitHub · 101 lines

Files

What ships with it

2 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. 12d ago First seen · 101 lines · 33 tokens per session scan A 732655adbbed

Subscribe to this mod's changes

firebase-ai-logic is a skill published in the GitHub repository GDvega/super-android-kotlin-firebase-skill (2 stars, last pushed 2mo ago), licensed MIT. It adds 33 tokens to every session and 595 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-31.

Related

Other skills, from other repositories

ml-kit-genai-prompt-api

Analyzes Android codebases to implement ML Kit GenAI Prompt API. Use this skill to send natural language requests on-device to Gemini Nano, use structured output with Prompt API, implement prefix caching, optimize the current prompt, or apply best practices.".

android/skills · 57 tokens

axiom-ai

Use when implementing, testing, or evaluating ANY Apple Intelligence, on-device AI, or speech-to-text feature. Covers Foundation Models, @Generable, LanguageModelSession, Tool protocol, eval suites, model-as-judge scoring, SpeechTranscriber, CoreML.

CharlesWiltgen/Axiom · 57 tokens

firebase-ai

Use when setting up firebaseai, generating text/chat with Gemini, streaming AI output, building multimodal prompts, or handling AI errors.

evanca/flutter-ai-rules · 30 tokens

maui-essentials-ai

Adopt Microsoft.Maui.Essentials.AI for local/on-device MAUI AI. USE FOR: Apple Intelligence chat, IChatClient, iOS/macOS/Mac Catalyst 26+ checks, fallback UI, NLEmbeddingGenerator, local tool invocation, privacy/offline UX. DO NOT USE FOR: source-generated tools, cloud-only AI, UI debugging.

dotnet/maui-labs · 86 tokens

apple-on-device-ai

On-device generative AI on Apple platforms (iOS 26+) — the Foundation Models framework (SystemLanguageModel.availability, LanguageModelSession, respond(to:)/streamResponse, @Generable + @Guide guided generation, the Tool protocol for tool-calling, instructions, GenerationOptions, and Guardrails), plus choosing among…

TalissonVitorino/kmp-ios-skills · 188 tokens

coreml

On-device ML inference with Core ML on iOS/iPadOS 26. Covers model formats (.mlmodel/.mlpackage/.mlmodelc), the Xcode auto-generated model class + Input/Output, MLModel loading (async load / compileModel), MLFeatureProvider / MLFeatureValue, MLModelConfiguration.computeUnits…

TalissonVitorino/kmp-ios-skills · 255 tokens