firebase-tools: Instructions file for Gemini CLI

GEMINI.md

firebase-tools GEMINI.md is an instructions file for Gemini CLI from firebase/firebase-tools. It costs 1,638 tokens per session, scanned A, original, MIT.

Repository instructions for Gemini CLI work in Firebase Tools, a command-line project for managing Firebase services. They document common commands for building, testing, linting, formatting, and following project conventions.

In plain words
What is it for?
Use them when changing or reviewing Firebase Tools code. They help run builds and tests, check or fix formatting, lint changed files, and follow repository conventions.
Why use it?
They give coding agents the project-specific commands and practices needed to check changes consistently. They also point agents to shared utilities and the central logger before adding duplicate code.

Instructions file for Gemini CLI

Written for Gemini CLI: the file is GEMINI.md. Also seen: mentions Gemini CLI.

This is firebase/firebase-tools's own configuration. It tells Gemini CLI how to work on firebase-tools itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything firebase-tools configures →

About the project

Firebase Tools is a command-line toolkit for testing, managing, and deploying Firebase projects, with an official MCP server for agent-based access. It is for developers working with Firebase Hosting, databases, Authentication, and other project resources, while the catalogue add-ons support agent workflows around these tools.

firebase/firebase-tools · 4,485 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to firebase/firebase-tools. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/firebase/firebase-tools/main/GEMINI.md
Clone the repo
git clone --depth 1 https://github.com/firebase/firebase-tools

Made for: Gemini CLI.

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-tools GEMINI.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/firebase/firebase-tools/gemini-md/github.svg)](https://agentmods.dev/instructions/firebase/firebase-tools/gemini-md)
Your own site
<a href="https://agentmods.dev/instructions/firebase/firebase-tools/gemini-md"><img src="https://agentmods.dev/badge/instructions/firebase/firebase-tools/gemini-md/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-tools GEMINI.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/firebase/firebase-tools/gemini-md"><img src="https://agentmods.dev/badge/instructions/firebase/firebase-tools/gemini-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,638 This file is loaded in full into every session.
When invoked 1,638 The same file — it is already loaded in full.
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.01638 $0.01638
Opus 5.5 $0.00655 $0.00655
Sonnet 5.5 $0.00328 $0.00328
Haiku 4.5 $0.00164 $0.00164

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

Security

Grade A, and why

firebase-tools GEMINI.md 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 13d 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.

GEMINI.md · 79 lines

How it starts

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

GEMINI.md

This file provides guidance to Gemini CLI or other coding agents when working with code in this repository. It focuses on key conventions and best practices. For a comprehensive guide on the development setup and contribution process, see CONTRIBUTING.md.

Essential Commands

# Build the project
npm run build

# Link the package - once this is run, you can manually test changes in your terminal
npm link

npm test                         # Full test suite with linting and compilation
npm run mocha:fast               # Quick unit tests only
npx mocha {testfile}             # Quick unit test for a specific file

# Linting and formatting
npm run lint                     # Check all code
npm run lint:changed-files       # Lint changed files only (much faster)
npm run format                   # Auto-fix formatting issues

Best Practices

Code Quality & Utilities

  • Survey prior art & harmonize utilities: When implementing logic that is or could be shared across callers (e.g., retries, backoff, string parsing, path containment, domain transformations):
    • Reuse or extend existing utilities: Check imported modules, the immediate subsystem, and src/utils.ts first; reuse or extend existing helpers rather than writing bespoke inline logic.
    • Extract and unify shared helpers: When logic is duplicated across modules or warrants a new common utility, place it in the appropriate shared module and unify existing custom implementations immediately rather than leaving parallel implementations.
  • Use the central logger (src/logger.ts); never use console.log() for user-facing output.
  • Throw FirebaseError (src/error.ts) for expected, user-facing errors. If the error is due to a violation of a precondition (e.g. something that is null but should never be), specify a non-zero exit code ({ exit: 1 }). Error messages should clearly explain what failed and why; when actionable, provide concrete remediation guidance using documented CLI flags, commands, or configuration options (e.g., the expected format, a --force flag, or a discovery command like firebase <entity>:list—never undocumented or legacy internal fields).
  • Extract magic numbers and static constants: Define static IDs, default timeouts, millisecond offsets, and repeated strings as top-level constants (UPPER_SNAKE_CASE) instead of inlining magic values inside functions. Mark static configuration arrays and lookup tables as readonly or as const.
  • Write high-signal comments that explain why, not what: Reserve comments and JSDoc for non-obvious rationale (protocol quirks, OS/platform edge cases, intentional trade-offs). Do not narrate self-evident code, attach multi-paragraph docblocks to small helpers, or repeat the same architectural explanation across multiple functions and tests—redundant commentary drifts out of sync and obscures control flow.
  • API calls must use apiv2.ts for authenticated requests.
  • Reduce nesting as much as possible: Code should avoid unnecessarily deep nesting or long periods of nesting. Use early returns, continue, and break statements in functions and loops to handle edge cases early and keep main logic flat. Consider helper functions to encapsulate complex branching.

Read the full file on GitHub · 79 lines

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. 13d ago Changed · +1 lines · +132 tokens per session c1cebe9f4d8c
  2. 22d ago Changed · +20 lines · +737 tokens per session 577678c06d97
  3. 2mo ago First seen · 58 lines · 769 tokens per session scan A d4df1cda17ef

Subscribe to this mod's changes

firebase-tools GEMINI.md is an instructions file published in the GitHub repository firebase/firebase-tools (4,485 stars, last pushed today), licensed MIT. It adds 1,638 tokens to every session, about $0.0066 per session on Opus 5.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 instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens