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.
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.
curl -O https://raw.githubusercontent.com/firebase/firebase-tools/main/GEMINI.mdgit clone --depth 1 https://github.com/firebase/firebase-toolsWrote 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.
[](https://agentmods.dev/instructions/firebase/firebase-tools/gemini-md)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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.tsfirst; 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.
- Reuse or extend existing utilities: Check imported modules, the immediate subsystem, and
- Use the central
logger(src/logger.ts); never useconsole.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--forceflag, or a discovery command likefirebase <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 asreadonlyoras 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.tsfor authenticated requests. - Reduce nesting as much as possible: Code should avoid unnecessarily deep nesting or long periods of nesting. Use early returns,
continue, andbreakstatements in functions and loops to handle edge cases early and keep main logic flat. Consider helper functions to encapsulate complex branching.
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.
- 13d ago Changed · +1 lines · +132 tokens per session c1cebe9f4d8c
- 22d ago Changed · +20 lines · +737 tokens per session 577678c06d97
- 2mo ago First seen · 58 lines · 769 tokens per session scan A d4df1cda17ef
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.
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).
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.
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).
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.
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).
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.