Skip to content
Firebase Hosting Basics

Firebase Hosting Basics Skill

Firebase's official skill for deploying static sites and SPAs to classic Firebase Hosting: firebase.json redirects, rewrites and headers, preview channels, custom domains, local emulation, and when to pick App Hosting instead.

GitHub Docs

Install

Install with the skills CLI

One command for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf and dozens of other agents. Needs Node.js; the skill is fetched straight from firebase/agent-skills.

$ npx skills add firebase/agent-skills --skill firebase-hosting-basics

Run it in a terminal. The CLI finds the agents installed on your machine, asks which ones to add the skill to, and whether to install it into the folder you ran it from or for all your projects.

Other ways to install

Copy the whole skill folder — SKILL.md and any scripts or references beside it — into ~/.claude/skills/firebase-hosting-basics/, where Claude Code picks it up in every project. Only git is needed.

tmp=$(mktemp -d) && \
  git clone --depth 1 --branch main https://github.com/firebase/agent-skills.git "$tmp" && \
  mkdir -p ~/.claude/skills && \
  cp -R "$tmp"/skills/firebase-hosting-basics ~/.claude/skills/firebase-hosting-basics

No scripts or references next to it? Saving the SKILL.md alone as ~/.claude/skills/firebase-hosting-basics/SKILL.md works too.

Using another agent? Its personal skills folder
Codex
~/.agents/skills/
Cursor
~/.cursor/skills/
GitHub Copilot
~/.copilot/skills/
Gemini CLI
~/.gemini/skills/
Windsurf
~/.codeium/windsurf/skills/
OpenCode
~/.config/opencode/skills/

About

  • Decision guide between classic Hosting and App Hosting for SSR frameworks
  • Configures firebase.json public directory, redirects, rewrites, headers and multi-site
  • Preview channels for testing changes on temporary URLs before going live
  • Local testing with the Hosting emulator

Firebase Hosting Basics is the deployment skill in Firebase's official agent-skills collection. It teaches a coding agent how to put a static website, a single-page app or a small set of microservices on classic Firebase Hosting, which serves content from a global CDN with SSL configured by default.

Its most useful part is a scoping decision that agents often get wrong: classic Hosting versus Firebase App Hosting. The skill sends static HTML/CSS/JS sites and SPAs built with React or Vue (without server-side rendering) to Hosting, where the developer controls the build and deploys from the CLI. Full-stack frameworks such as Next.js or Angular that need SSR or ISR, or a git-push deploy flow, belong to App Hosting instead, and the skill's description explicitly says not to use it for App Hosting, Auth, Firestore, Data Connect or Crashlytics work.

The body is deliberately short and routes to two reference files: one for firebase.json configuration (public directories, redirects, rewrites, headers and multi-site setups) and one for deploying, preview channels and release management. Preview channels let the agent publish a change to a temporary URL before it reaches the live site, and GitHub Actions can automate previews and deploys. For local testing it runs npx -y firebase-tools@latest emulators:start --only hosting, which serves the app on http://localhost:5000 by default.

The skill also notes that dynamic content can be served through Cloud Functions or Cloud Run behind Hosting. Apache-2.0, maintained by Google alongside the other Firebase skills.

SKILL.md

The instructions your agent loads, as published by Firebase.

SKILL.md
name
firebase-hosting-basics
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.
metadata
author: Google LLC category: Serverless

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.
Instructions
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:

npx -y firebase-tools@latest emulators:start --only hosting

This serves your app at http://localhost:5000 by default.

Install
New

Firebase's official skill for adding sign-in to an app: enable providers from firebase.json, deploy the auth config, wire up the client SDK on web, Flutter, Android or iOS, and lock data down with request.auth rules.

Google's official Firebase entry-point skill — CLI login, project creation and selection, and programmatic retrieval of google-services.json and GoogleService-Info.plist.

Vercel's official deployment skill — inspects project state, picks the right deploy path, and defaults to preview deployments with a claimable URL when no account is linked.

Netlify's official deploy skill: netlify.toml deploy contexts and their precedence, CLI and drag-and-drop deploys, Deploy Previews, build hooks, skew protection, and secrets-scanning build failures.

Browse all skills →