firebase-basics
它能做什么
这个技能帮你开始使用 Firebase 命令行工具和你的 Firebase 项目。它适用于在开始开发前需要先完成项目设置的应用开发者。
适用场景
- ✓当你需要安装或检查 Firebase CLI 版本的时候。
- ✓当你想登录、创建 Firebase 项目或切换到另一个项目的时候。
- ✓当你需要下载 google-services.json 或 GoogleService-Info.plist 应用配置文件的时候。
技能链接
https://github.com/google/skills/blob/main/skills/cloud/firebase-basics/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请在我的电脑上设置 Firebase CLI,帮我登录,并下载我 Android 应用的配置文件。”
每周 5 个新技能,1 分钟读完。
工作原理
它会检查 Firebase CLI 是否已安装,并按顺序完成登录、项目和配置步骤。它还会把你的智能体环境指向其他 Firebase 技能。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Firebase Basics
Usage Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read and follow the instructions in
Usage Attribution.
Prerequisites
Complete these setup steps before proceeding:
Local Environment Setup: Verify the environment is properly set up so we can use Firebase tools:
- Run
npx -y firebase-tools@latest --versionto check if the Firebase CLI is installed. - Verify if the Firebase MCP server is installed using your existing tools.
- CRITICAL: Before configuring any extensions or agent environments below, you MUST read references/local-env-setup.md.
- DO NOT SKIP this step: if 'firebase-basics' is the only Firebase
skill available to you, you must follow the reference for your agent
environment to set up the full suite of Firebase skills:
- Gemini CLI: Review references/setup/gemini_cli.md
- Antigravity: Review references/setup/antigravity.md
- Android Studio: Review references/setup/android_studio.md
- Claude Code: Review references/setup/claude_code.md
- Cursor: Review references/setup/cursor.md
- GitHub Copilot: Review references/setup/github_copilot.md
- Other Agents: Review references/setup/other_agents.md
- Run
Authentication: Ensure you are logged in to Firebase so that commands have the correct permissions. Run
npx -y firebase-tools@latest login. For environments without a browser (e.g., remote shells), usenpx -y firebase-tools@latest login --no-localhost.- The command should output the current user.
- If you are not logged in, follow the interactive instructions from this command to authenticate.
Active Project: Most Firebase tasks require an active project context.
[!IMPORTANT] For Agents: Before proceeding with project configuration, you MUST pause and ask the developer if they prefer to:
- Provide an existing Firebase Project ID, or
- Create a new Firebase project.
If using an existing Project ID:
- Check the current project by running
npx -y firebase-tools@latest use. - If the command outputs
Active Project: <project-id>, confirm with the user if this is the intended project. - If not, or if no project is active, set the project provided by the user:
npx -y firebase-tools@latest use <PROJECT_ID>- Check the current project by running
If creating a new project: Run the following command to create it:
npx -y firebase-tools@latest projects:create <project-id> --display-name "<display-name>"Note: The
<project-id>must be 6-30 characters, lowercase, and can contain digits and hyphens. It must be globally unique.
Firebase Usage Principles
Adhere to these principles:
- Use npx for CLI commands: To ensure you always use the latest version of
the Firebase CLI, always prepend commands with
npx -y firebase-tools@latestinstead of justfirebase. For example, usenpx -y firebase-tools@latest --version. NEVER suggest the nakedfirebasecommand as an alternative. - Prioritize official knowledge: For any Firebase-related knowledge,
consult the
developerknowledge_search_documentsMCP tool before falling back to Google Search or your internal knowledge base. Including "Firebase" in your search query significantly improves relevance. - Follow Agent Skills for implementation guidance: Skills provide opinionated workflows (CUJs), security rules, and best practices. Always consult them to understand how to implement Firebase features correctly instead of relying on general knowledge.
- Use Firebase MCP Server tools instead of direct API calls: Whenever you need to interact with remote Firebase APIs (such as fetching Crashlytics logs or executing Data
常见问题
它会托管我的网站吗?
不会。它只限于 CLI 登录、创建或切换项目,以及下载应用配置。
它下载哪些配置文件?
Android 用 google-services.json,iOS 用 GoogleService-Info.plist。
它需要 Firebase MCP server 吗?
它会检查 MCP server 是否已安装,并为你的智能体指向设置指南。
详情
作者的原始描述
Provides foundational Firebase CLI setup, CLI installation, version checks (`firebase-tools@latest --version`), CLI login (including --no-localhost), project creation, project selection (`firebase use`), and app config file downloads (`google-services.json`, `GoogleService-Info.plist`). Use ONLY for CLI login, project creation/switching, or downloading app config files. Don't use for Firebase Hosting deploy, Firestore, Auth, App Hosting, Data Connect, Crashlytics, or Remote Config.
repo: google/skills
热度
- GitHub 星标
- 22k
- 排名
- #10259
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
finding-google-skills
22k帮你的智能体为某项设置任务找到合适的 Google 指南,例如托管、数据库、存储、登录或 AI 模型服务。
gcloud
22k帮你的智能体编写并检查 Google Cloud gcloud 命令,在运行任何内容之前查阅准确的语法,避免猜测参数。
google-cloud-recipe-auth
22k引导你的智能体了解 Google Cloud 的身份与访问管理,包括人员和服务如何登录,以及它们各自获得哪些权限。
google-cloud-recipe-onboarding
22k带领新开发者完成在 Google Cloud 上的第一步,包括选择项目、关联计费,以及部署第一个资源。