Agent skill

Firebase AI

by evanca in evanca/flutter-ai-rules

A skill your agent uses when setting up firebaseai, generating text/chat with Gemini, streaming AI output, building multimodal prompts, or handling AI errors.

MITAuto-check passedMobile

Install Firebase AI

skills CLI
$ npx skills add evanca/flutter-ai-rules --skill firebase-ai -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install evanca/flutter-ai-rules firebase-ai --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/evanca/flutter-ai-rules.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/firebase-ai .claude/skills/firebase-ai && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
firebase-ai
GitHub stars
649
Token cost
~1.1k tokens
SKILL.md length
273 words
Files
1
Skills in repo
37
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when setting up firebaseai, generating text/chat with Gemini, streaming AI output, building multimodal prompts, or handling AI errors.

  • Works in 4 steps: Setup and Configuration → Generating Content → Error Handling → …
  • Setting up firebaseai
  • SKILL.md covers When to Use, 1. Setup and Configuration, 2. Generating Content and 3. Error Handling, plus 2 more sections
  • Calls flutter

What it does

Firebase AI is an agent skill from evanca/flutter-ai-rules. Use when setting up firebaseai, generating text/chat with Gemini, streaming AI output, building multimodal prompts, or handling AI errors.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile. It works with Firebase and Flutter. The repository describes itself as: Flutter AI Skills and Rules for Claude, Codex, Cursor, and Other AI-Powered IDEs. The licence is MIT.

When your agent uses it

  • Setting up firebaseai
  • Generating text/chat with Gemini
  • Streaming AI output
  • Building multimodal prompts

Example prompts

  • “/firebase-ai”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Setup and Configuration
  2. Generating Content
  3. Error Handling
  4. Security and Privacy

What it can do on your machine

Read from SKILL.md and the folder at commit 7b9cce2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • flutter

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • firebase.google.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Firebase AI loads about 1.1k tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 273 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~38
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from evanca/flutter-ai-rules at commit 7b9cce2, republished under its MIT licence (© evanca). 273 words, ~1,150 tokens.

Download SKILL.mdSave it as .claude/skills/firebase-ai/SKILL.md (or your agent's skills folder).
name
firebase-ai
description
Use when setting up firebase_ai, generating text/chat with Gemini, streaming AI output, building multimodal prompts, or handling AI errors.
license
MIT

Firebase AI Skill

This skill defines how to correctly use Firebase AI Logic in Flutter applications.

When to Use

Use this skill when:

  • Setting up and configuring Firebase AI in a Flutter project.
  • Generating text content or chat responses with Gemini models.
  • Implementing streaming AI responses for real-time UI updates.
  • Sending multimodal prompts (text + images) to Gemini.
  • Handling errors, offline scenarios, and rate limits for AI operations.
  • Applying security and privacy considerations for AI features.

1. Setup and Configuration

flutter pub add firebase_ai
dart
import 'package:firebase_ai/firebase_ai.dart';
import 'package:firebase_core/firebase_core.dart';
import 'firebase_options.dart';

// Initialize FirebaseApp
await Firebase.initializeApp(
  options: DefaultFirebaseOptions.currentPlatform,
);

// Initialize the Gemini Developer API backend service
final model =
    FirebaseAI.googleAI().generativeModel(model: 'gemini-2.5-flash');
  • Ensure the Firebase project is configured for AI services via the Firebase AI Logic page in the Firebase Console.
  • Initialize Firebase before using any Firebase AI features.
  • Use FirebaseAI.googleAI() for the Gemini Developer API backend (recommended starting point).
  • Implement App Check to prevent abuse of Firebase AI endpoints.

Platform support:

PlatformSupport
iOSFull
AndroidFull
WebFull
macOS / other AppleBeta
WindowsNot supported

2. Generating Content

Single-turn text generation
dart
final response = await model.generateContent([
  Content.text('Summarize the benefits of Flutter for mobile development'),
]);
final text = response.text; // The generated summary string
Multi-turn chat
dart
final chat = model.startChat();
final response = await chat.sendMessage(
  Content.text('What is the difference between StatelessWidget and StatefulWidget?'),
);
print(response.text);

// Follow-up in the same conversation
final followUp = await chat.sendMessage(
  Content.text('When should I use StatefulWidget?'),
);
print(followUp.text);
Streaming responses

Use streaming to display partial results as they arrive:

dart
final stream = model.generateContentStream([
  Content.text('Write a step-by-step guide to implementing dark mode in Flutter'),
]);

await for (final chunk in stream) {
  // Append chunk.text to the UI progressively
  setState(() => _output += chunk.text ?? '');
}
Multimodal prompts (text + image)
dart
final imageBytes = await File('photo.jpg').readAsBytes();
final response = await model.generateContent([
  Content.multi([
    TextPart('Describe what you see in this image'),
    InlineDataPart('image/jpeg', imageBytes),
  ]),
]);

3. Error Handling

Wrap AI calls in structured error handling:

dart
try {
  final response = await model.generateContent([Content.text(prompt)]);
  return response.text;
} on FirebaseAIException catch (e) {
  if (e.message?.contains('quota') ?? false) {
    // Handle rate limiting — show retry message or queue the request
    return 'Service is busy. Please try again shortly.';
  }
  return 'AI service error: ${e.message}';
} catch (e) {
  return 'Unexpected error: $e';
}
  • Provide meaningful error messages to users when AI operations fail.
  • Handle offline scenarios with appropriate fallback behavior (e.g., cached responses).
  • Implement exponential backoff for rate-limited or transient errors.

4. Security and Privacy

  • Follow Firebase Security Rules best practices when using AI services alongside other Firebase products.
  • Ensure proper authentication and authorization for AI feature access.
  • Sanitize user input before sending it to the model to prevent prompt injection.
  • Be mindful of data privacy requirements when processing user content with AI services.
  • Implement appropriate content filtering and moderation using safety settings:
dart
final model = FirebaseAI.googleAI().generativeModel(
  model: 'gemini-2.5-flash',
  safetySettings: [
    SafetySetting(HarmCategory.harassment, HarmBlockThreshold.medium),
    SafetySetting(HarmCategory.dangerousContent, HarmBlockThreshold.high),
  ],
);

References

© evanca, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/firebase-ai of evanca/flutter-ai-rules.

Open the folder on GitHubat commit 7b9cce2

Compare with similar skills

Firebase AI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Firebase AI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Firebase AI this skillevanca/flutter-ai-rules649—~1.1kAutomated safety check: PassMIT
Cometchat Flutter V6 Pushcometchat/cometchat-skills130—~1.4kAutomated safety check: PassMIT
Git Worktree Setupk8zdev/k8z155—~930Automated safety check: PassNone
Web3authWeb3Auth/web3auth-examples144—~1.4kAutomated safety check: PassMIT
Retrieving Developer Knowledgegoogle/skills21k—~2kAutomated safety check: PassApache-2.0
Engine Whats Newflutter/flutter179k—~978Automated safety check: PassBSD-3-Clause

Similar skills

  • Cometchat Flutter V6 Push

    cometchat/cometchat-skills

    Add push notifications to a Flutter app with CometChat — FCM on Android, FCM/APNs on iOS, registered through CometChatNotifications with the Dashboard provider as the sender.

    130 GitHub stars~1.4k tokensUpdated 3 days ago
    MobileAuto-check passed
  • Automate git worktree creation and copy private files (not tracked in git) to new workdirs.

    155 GitHub stars~930 tokensUpdated 3 mo ago
    DevelopmentAuto-check passed
  • Web3auth

    Web3Auth/web3auth-examples

    Integrates MetaMask Embedded Wallets (Web3Auth) for non-custodial wallets via social login or custom JWT (Firebase, Auth0, Cognito).

    144 GitHub stars~1.4k tokensUpdated 5 days ago
    Backend & APIsAuto-check passed
  • Official

    Searches, retrieves, and synthesizes official Google developer documentation across Google Cloud, AI/Gemini, Android, Chrome, Web, Flutter, Go, Firebase, and other Google developer platforms.

    21k GitHub stars~2k tokensUpdated today
    Backend & APIsAuto-check passed
  • Engine Whats New

    flutter/flutter

    Generates the "what's new" release summary and diff file for changes in the Flutter engine (//engine/src/flutter) between two releases (e.g., 3.47 vs 3.44).

    179k GitHub stars~978 tokensUpdated today
    MobileAuto-check passed
  • Flutter Cherry Pick

    flutter/flutter

    How to land a formal cherry-pick of a merged PR for the flutter/flutter repo stable or beta channel.

    179k GitHub stars~1.8k tokensUpdated today
    MobileAuto-check passed

More from evanca/flutter-ai-rules

All 37 skills in this repo
  • Code Review

    evanca/flutter-ai-rules

    A skill your agent uses when asked to review a PR, MR, branch, or diff, audit changed files, or check code quality.

    649 GitHub stars~2.4k tokensUpdated 24 days ago
    Auto-check passed
  • Developing Genkit Dart

    evanca/flutter-ai-rules

    A skill your agent uses when building AI agents in Dart, implementing Genkit flows or tools, integrating LLMs into Dart or Flutter applications, or using Genkit Dart plugins.

    649 GitHub stars~961 tokensUpdated 24 days ago
    Auto-check passed
  • Generate Images With Firebase AI

    evanca/flutter-ai-rules

    A skill your agent uses when generating or editing images from Flutter/Dart with Firebase AI Logic and a Gemini image model (Nano Banana), making the first call work, choosing Gemini Developer API…

    649 GitHub stars~2.3k tokensUpdated 24 days ago
    Auto-check passed
  • Flutter Use Column Row First

    evanca/flutter-ai-rules

    A skill your agent uses when building any Flutter screen or component to choose responsive Row, Column, Expanded, Flexible, and Spacer layouts before fixed-size or coordinate-based alternatives.

    649 GitHub stars~1.3k tokensUpdated 24 days ago
    Auto-check passed
  • Architecture Feature First

    evanca/flutter-ai-rules

    A skill your agent uses when creating a feature, designing folder structure, adding repositories/services/view models, wiring dependency injection, or deciding which layer owns logic.

    649 GitHub stars~1.9k tokensUpdated 24 days ago
    Auto-check passed
  • Bloc

    evanca/flutter-ai-rules

    A skill your agent uses when creating a Cubit or Bloc, modeling state with sealed classes or status enums, wiring BlocBuilder/BlocListener/BlocProvider, writing bloc tests, or choosing between Cubit…

    649 GitHub stars~2.8k tokensUpdated 24 days ago
    Auto-check passed

Works with

Categories

Questions about Firebase AI

What does Firebase AI do?

A skill your agent uses when setting up firebaseai, generating text/chat with Gemini, streaming AI output, building multimodal prompts, or handling AI errors. Firebase AI is an agent skill from evanca/flutter-ai-rules. Use when setting up firebaseai, generating text/chat with Gemini, streaming AI output, building multimodal prompts, or handling AI errors.

When should I use Firebase AI?

Firebase AI fits situations like: setting up firebaseai; generating text/chat with Gemini; streaming AI output; building multimodal prompts.

How do I install Firebase AI in Claude Code?

Run `npx skills add evanca/flutter-ai-rules --skill firebase-ai -a claude-code`. Or copy the skill folder (skills/firebase-ai in evanca/flutter-ai-rules) into .claude/skills/firebase-ai in your project. Claude Code loads it when a task matches its description.

How do I install Firebase AI in Codex?

Run `npx skills add evanca/flutter-ai-rules --skill firebase-ai -a codex`. Or copy the skill folder (skills/firebase-ai in evanca/flutter-ai-rules) into .agents/skills/firebase-ai in your project. Codex loads it when a task matches its description.

Can I use Firebase AI in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add evanca/flutter-ai-rules --skill firebase-ai -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/firebase-ai, .gemini/skills/firebase-ai, .github/skills/firebase-ai and .opencode/skills/firebase-ai in your project.

What does Firebase AI need to run?

Going by SKILL.md and its folder, Firebase AI needs the command-line tools its instructions call (flutter).

Does Firebase AI access the network?

SKILL.md names 1 domain. As links in the text: firebase.google.com. This is read from the text; nothing was executed.

Is Firebase AI safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Firebase AI use?

Firebase AI is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Firebase AI use?

About 1.1k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Firebase AI?

Skills that share tags, products or a category with Firebase AI: Cometchat Flutter V6 Push (cometchat/cometchat-skills, 130 stars), Git Worktree Setup (k8zdev/k8z, 155 stars), Web3auth (Web3Auth/web3auth-examples, 144 stars) and Retrieving Developer Knowledge (google/skills, 21k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Firebase AI?

evanca (a GitHub user) maintains it in evanca/flutter-ai-rules, which has 649 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on September 14, 2026.

Source: evanca/flutter-ai-rules on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.