Iron Law
NEVER use the naked firebase binary — always npx -y firebase-tools@latest <cmd>.
This guarantees the latest CLI version is used without polluting global node_modules.
Every command in this skill prepends npx -y firebase-tools@latest.
Project Context
Check the project's CLAUDE.md to understand which Firebase services are in use and any
project-specific constraints (e.g. which services are intentionally NOT used, whether
Firestore is used as a canonical store or a status bus only, etc.).
Firebase project ID should be stored in an environment variable (e.g. FIREBASE_PROJECT_ID)
— never hardcoded.
Prerequisites
Local Environment Setup:
npx -y firebase-tools@latest --versionRead references/local-env-setup.md for full setup.
Authentication:
npx -y firebase-tools@latest login # Headless / remote shell: npx -y firebase-tools@latest login --no-localhostActive Project:
npx -y firebase-tools@latest use # Set project from env var (preferred): npx -y firebase-tools@latest use --add ${FIREBASE_PROJECT_ID}
Firebase Usage Principles
- npx always:
npx -y firebase-tools@latest <cmd>— never barefirebase - Consult Firebase MCP first: Use
developerknowledge_search_documentsbefore falling back to web search or memory - Use Firebase MCP tools for remote API calls: Crashlytics, Firestore queries, project management — always MCP, never manual REST calls
- Emulator for local dev: Set
FIREBASE_AUTH_EMULATOR_HOSTand related emulator environment variables — without them, Admin SDK calls hit production Firebase with dev tokens
References
- Initialize services: references/firebase-service-init.md
- CLI commands: references/firebase-cli-guide.md
- Local env setup: references/local-env-setup.md
Related Skills
flutter-mobile— Firebase Auth integration in Flutter appsfirebase-hosting-basics— deploy static SPA to Firebase Hostingsecurity-reviewer— Firestore Security Rules audit