跳到主内容
智客 ZICQ

技能库 智客分类:运维与云 firebase-basics

Firebase Basics

提供基础 Firebase CLI设置,CLI安装,版本检查("firebase-tools@latest-version"),CLI登录(包括-no-localhost),项目创建,项目选择("firebase use")和app配置文件下载("google-service.json","GoogleService-Info.plist"). 仅用于 CLI 登录、 项目创建/ 切换或下载 app 配置文件 。 不要用于Firebase主机部署,Firestore,Auth,App主机,数据连接,崩溃,或远程配置.

150455 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

提供基础 Firebase CLI设置,CLI安装,版本检查("firebase-tools@latest-version"),CLI登录(包括-no-localhost),项目创建,项目选择("firebase use")和app配置文件下载("google-service.json","GoogleService-Info.plist"). 仅用于 CLI 登录、 项目创建/ 切换或下载 app 配置文件 。 不要用于Firebase主机部署,Firestore,Auth,App主机,数据连接,崩溃,或远程配置.

何时用

官方 description 未单独写出 Use when。按规范,代理会在用户任务与这段 description 的关键词匹配时激活本技能。

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Prerequisites、Firebase Usage Principles、References、Common Issues。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/local-env-setup.md、references/setup/gemini_cli.md、references/setup/antigravity.md、references/setup/android_studio.md、references/setup/claude_code.md、references/setup/cursor.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

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.

PrerequisitesFirebase Usage PrinciplesReferencesCommon Issues

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
firebase-basics
description
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.
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 6
  • references/local-env-setup.md
  • references/setup/gemini_cli.md
  • references/setup/antigravity.md
  • references/setup/android_studio.md
  • references/setup/claude_code.md
  • references/setup/cursor.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「firebase-basics」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-4379d00f6cbb92f9-Firebase-Basics.html
请存为 .cursor/skills/firebase-basics/SKILL.md 或 .claude/skills/firebase-basics/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/firebase/agent-skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/firebase/agent-skills' --list

npx skills add 'https://github.com/firebase/agent-skills' --skill 'firebase-basics'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: firebase-basics description: >- 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. metadata: category: CloudInfrastructureAndServices --- # Prerequisites Complete these setup steps before proceeding: 1. **Local Environment Setup:** Verify the environment is properly set up so we can use Firebase tools: - Run `npx -y firebase-tools@latest --version` to 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](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](references/setup/gemini_cli.md) - **Antigravity**: Review [references/setup/antigravity.md](references/setup/antigravity.md) - **Android Studio**: Review [references/setup/android_studio.md](references/setup/android_studio.md) - **Claude Code**: Review [references/setup/claude_code.md](references/setup/claude_code.md) - **Cursor**: Review [references/setup/cursor.md](references/setup/cursor.md) - **GitHub Copilot**: Review [references/setup/github_copilot.md](references/setup/github_copilot.md) - **Other Agents**: Review [references/setup/other_agents.md](references/setup/other_agents.md) 1. **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), use `npx -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. 1. **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: > > 1. **Provide an existing Firebase Project ID**, or > 1. **Create a new Firebase project**. - **If using an existing Project ID:** 1. Check the current project by running `npx -y firebase-tools@latest use`. 1. If the command outputs `Active Project: `, confirm with the user if this is the intended project. 1. If not, or if no project is active, set the project provided by the user: ```bash npx -y firebase-tools@latest use ``` - **If creating a new project:** Run the following command to create it: ```bash npx -y firebase-tools@latest projects:create --display-name "" ``` *Note: The `` must be 6-30 characters, lowercase, and can contain digits and hyphens. It must be globally unique.* # Firebase Usage Principles Adhere to these principles: 1. **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@latest` instead of just `firebase`. For example, use `npx -y firebase-tools@latest --version`. NEVER suggest the naked `firebase` command as an alternative. 1. **Prioritize official knowledge:** For any Firebase-related knowledge, consult the `developerknowledge_search_documents` MCP tool before falling back to Google Search or your internal knowledge base. Including "Firebase" in your search query significantly improves relevance. 1. **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. 1. **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 Connect queries), use the tools provided by the Firebase MCP Server instead of attempting manual API calls. 1. **Keep Plugin / Agent Skills updated:** Since Firebase best practices evolve quickly, regularly check for and install updates to their Firebase plugin or Agent Skills. Similarly, if you encounter issues with outdated tools or commands, follow the steps below based on your agent environment: - **Antigravity**: Follow [references/refresh/antigravity.md](references/refresh/antigravity.md) - **Gemini CLI**: Follow [references/refresh/gemini-cli.md](references/refresh/gemini-cli.md) - **Claude Code**: Follow [references/refresh/claude.md](references/refresh/claude.md) - **Cursor**: Follow [references/refresh/other-agents.md](references/refresh/other-agents.md) - **Android Studio**: Follow [references/refresh/android_studio.md](references/refresh/android_studio.md) - **Others**: Follow [references/refresh/other-agents.md](references/refresh/other-agents.md) 1. **Automate Config File Retrieval:** When setting up iOS or Android apps, do NOT direct users to the Firebase Console to download `google-services.json` or `GoogleService-Info.plist`. Instead, use the Firebase CLI to fetch the config programmatically: - For Android: `npx -y firebase-tools@latest apps:sdkconfig ANDROID --project ` - For iOS: `npx -y firebase-tools@latest apps:sdkconfig IOS --project ` Save the output to the appropriate location (e.g., `app/google-services.json` for Android, or a path to be linked by `xcode-project-setup` for iOS). # References - **Initialize Firebase:** See [references/firebase-service-init.md](references/firebase-service-init.md) when you need to initialize new Firebase services using the CLI. - **Exploring Commands:** See [references/firebase-cli-guide.md](references/firebase-cli-guide.md) to discover and understand CLI functionality. - **SDK Setup:** For detailed guides on adding Firebase to your app: - **Web**: See [references/web_setup.md](references/web_setup.md) - **Android**: See [references/android_setup.md](references/android_setup.md) - **iOS**: See [references/ios_setup.md](references/ios_setup.md) # Common Issues - **Login Issues:** If the browser fails to open during the login step, use `npx -y firebase-tools@latest login --no-localhost` instead. - **Genkit:** If using Genkit, install the skills: ```bash npx skills add genkit-ai/skills ```

相关技能

运维与云

Docker Essentials

用于容器管理,图像操作,调试的基本道克命令和工作流程.

运维与云

Find Skills

从开放的代理技能生态系统中发现并安装技能. 使用时:(1)用户问"我如何做X",X可能拥有现有技能,(2)用户说"为X找到技能"或"是否为X有技能",(3)用户问"你能否做X",X是专门能力,(4)用户想扩展代理能力,(5)用户想搜索工具,模板,或工作流程,(6)用户提到他们希望…

运维与云

Microsoft Foundry

构建,部署,评价,优化,微调,管理微软创始代理,模型,资源最终结束. 用法:铸造、azd ai代理、azd 提供/部署、托管代理脚手架/开发/运行/部署/拖放、即时代理创建、创建代理、更新代理、添加代理工具、援引代理、代理.yaml、评估代理、批量活化、连续活化、持续监测、代理C…

运维与云

Azure Deploy

执行已有.azure/部署计划.md和基础设施文件的ALREADY-PREPARED应用程序的Azure部署。 当用户向 CREATE 请求新应用程序时, 请不要使用此技能 。 这种技能运行了 azd上行, azd 部署, trarraform 应用, 和 az 部署命令带有内置…