firebase/agent-skills

firebase-hosting-basics

为静态站和SPA配置托管与预览

  • SKILL.md 已保存
  • 中文用法已整理
  • 安装与运行未实测
先判断是否解决你的问题

firebase-hosting-basics 是什么?

firebase-hosting-basics 面向经典Firebase Hosting,处理静态网站与不依赖SSR的单页应用,配置公共目录、重定向、重写、响应头和预览频道。需要动态后端时可通过对应集成承接。

中文说明由本站依据来源整理;英文原文保留在页面下方。

适合用在

  • HTML/CSS/JS静态站,或希望自己控制构建部署的React/Vue单页应用。

这些情况不适合

  • 把Next.js等全栈SSR部署直接当作同一套经典Hosting流程。
按客户端选择安装入口

怎么接入你的 Agent?

  1. 定位完整 Skill 目录

    打开本项目来源,核对 SKILL.md 及其引用的脚本和资料。

  2. 交给你正在用的 Agent

    在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。

  3. 确认识别,再做具体任务

    让 Agent 回报安装目录和识别到的名称 firebase-hosting-basics,然后按本页使用示例提供材料。

展开并复制给 Codex 的安装指令
发送给 Codex

安装并检查 firebase-hosting-basics

请在 Codex 的当前工作环境中安装并检查 firebase-hosting-basics 这个 Skill。

项目身份:firebase/agent-skills / firebase-hosting-basics
来源:https://github.com/firebase/agent-skills/blob/99954a30898bb5ddc8152ee10e124dc3b4106bf7/skills/firebase-hosting-basics/SKILL.md
已定位的源文件:skills/firebase-hosting-basics/SKILL.md

1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。
准备输入,再按步骤执行

装好以后,具体怎么用?

准备哪些材料

  • 提供已构建站点、Firebase项目和登录环境;完整Skill需保留configuration及deploying参考,确认真实输出目录。

会得到什么

  • Hosting配置、本地或预览URL与实际部署结果;发布行为和网页核验分开报告。

实际使用顺序

  1. 判断站点是否需要SSR;静态站或普通SPA再选择经典Hosting。
  2. 读取配置参考,为firebase.json指定实际public目录、需要的重写/重定向和响应头。
  3. 用 npx -y firebase-tools@latest emulators:start --only hosting 本地查看,再按部署参考选择预览频道或正式发布,核对目标项目及URL。
使用示例

从一个具体任务开始

本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。

安装并识别 Skill 后发送

复制一个具体任务

用 firebase-hosting-basics 为我的静态文档站准备Firebase Hosting配置。先读工程确认真实构建目录,再配置缺页行为与缓存;先本地模拟,不立即正式部署。说明SPA重写是否适用于这个站,并保留原配置。
预期结果

预期得到与实际站点类型匹配的配置及可检查地址;本站未执行此例。

使用前先看这些限制

使用条件与边界

  • 来源的默认本地端口5000可能被项目配置改变,应以实际启动输出为准。
  • CDN托管成功不证明所有页面路由或内容已正确,仍需检查具体URL。
针对这个 Skill 的疑问

常见问题

Hosting和App Hosting怎么选?

本源把静态站、无SSR的SPA和手动构建部署归到Hosting;支持的全栈框架及SSR更适合查看App Hosting流程。

需要核对时再展开原文

来源原文与资料状态

源文件
已保存 SKILL.md,抓取于 2026-11-19T19:32:10.677Z
中文使用说明
已针对下方源文件版本整理用途、用法和常见问题
安装与任务测试
本站未执行安装或任务测试
来源复核
本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料

skills/firebase-hosting-basics/SKILL.md · 抓取时间 2026-11-19T19:32:10.677Z

以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。

抓取成功不代表已完成安装或任务测试。

来源 description(原文)

Deploys and configures classic Firebase Hosting for static websites, single-page apps (SPAs), and microservices. Use when deploying static sites/SPAs, setting up custom domains, configuring firebase.json hosting settings (redirects, rewrites, headers, multi-site), or managing preview channels. Don't use for Firebase App Hosting (Next.js/SSR), Auth, Firestore queries/rules, Data Connect, or Crashlytics.

查看源文件章节 / Source sections
  • 原文:hosting-basics
  • 原文:Overview
  • 原文:Hosting vs App Hosting
  • 原文:Instructions
  • 原文:1. Configuration (`firebase.json`)
  • 原文:2. Deploying
  • 原文:3. Emulation
原文:hosting-basics

This skill provides instructions and references for working with Firebase Hosting, a fast and secure hosting service for your web app, static and dynamic content, and microservices.

原文:Overview

Firebase Hosting provides production-grade web content hosting for developers. With a single command, you can deploy web apps and serve both static and dynamic content to a global CDN (content delivery network). **Key Features:** - **Fast Content Delivery:** Files are cached on SSDs at CDN edges around the world. - **Secure by Default:** Zero-configuration SSL is built-in. - **Preview Channels:** View and test changes on temporary preview URLs before deploying live. - **GitHub Integration:** Automate previews and deploys with GitHub Actions. - **Dynamic Content:** Serve dynamic content and microservices using Cloud Functions or Cloud Run.

原文:Hosting vs App Hosting

**Choose Firebase Hosting if:** - You are deploying a static site (HTML/CSS/JS). - You are deploying a simple SPA (React, Vue, etc. without SSR). - You want full control over the build and deploy process via CLI. **Choose Firebase App Hosting if:** - You are using a supported full-stack framework like Next.js or Angular. - You need Server-Side Rendering (SSR) or ISR. - You want an automated "git push to deploy" workflow with zero configuration.

原文:1. Configuration (`firebase.json`)

For details on configuring Hosting behavior, including public directories, redirects, rewrites, and headers, see [configuration.md](references/configuration.md).

原文:2. Deploying

For instructions on deploying your site, using preview channels, and managing releases, see [deploying.md](references/deploying.md).

原文:3. Emulation

To test your app locally: ```bash npx -y firebase-tools@latest emulators:start --only hosting ``` This serves your app at `http://localhost:5000` by default.

文件 SHA256:bb7b6c45f02ed3b9c2b5f942b8fa9c37d77ffdf5831d470c5155634afb717891

仓库许可证记录:Apache-2.0;repository-license-recorded-scope-unverified,查看来源。

Skills.sh收录简介 · 2026-07-28

Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT…

查看历史简介来源

这份历史简介在采集时已截断;完整用途和触发条件需打开来源核对。

历史收录数据

Skill标识firebase-hosting-basics
来源仓库firebase/agent-skills
榜单快照2026-07-28
榜单口径Skills.sh累计安装量
快照名次210
快照累计安装量112606

历史资料说明

  • 所保留的来源简介在采集时已截断;完整触发条件、依赖及排除项须阅读源文件,本站不补写缺失部分。
  • 安装量用于说明当时的收录次序,不是效果、可信度或当前可用性的证明。

此页用于识别项目与来源。安装入口可在该Skill的Skills.sh页面查看;当前目录是否仍存在、附带脚本和账户依赖尚需按具体版本确认。

返回 Skills 目录,按任务继续筛选 · MCP与Skills教程与资源