PluginBench
Skill
Official
Review
Audit score 70

firebase-hosting-basics

firebase/agent-skills

Deploy static sites, SPAs, and microservices to Firebase Hosting with custom domains and preview channels.

What is firebase-hosting-basics?

Firebase Hosting is a fast, secure CDN-backed hosting service for static websites, single-page apps, and microservices. Use it when deploying static content or SPAs with full CLI control; choose Firebase App Hosting instead if you need SSR or a full-stack framework like Next.js.

  • Deploy static sites and SPAs to a global CDN with zero-configuration SSL
  • Configure hosting behavior via firebase.json (redirects, rewrites, headers, multi-site)
  • Create and test temporary preview channels before deploying to production
  • Integrate with GitHub Actions for automated previews and deployments
  • Serve dynamic content and microservices using Cloud Functions or Cloud Run
  • Emulate hosting locally at http://localhost:5000 for testing

How to install firebase-hosting-basics

npx skills add https://github.com/firebase/agent-skills --skill firebase-hosting-basics
Prerequisites
  • Firebase project set up and authenticated via Firebase CLI
  • Node.js and npm installed
  • Static site or SPA build output ready to deploy
Claude Code
Cursor
Windsurf
Cline

How to use firebase-hosting-basics

  1. 1.Install the skill: npx skills add https://github.com/firebase/agent-skills --skill firebase-hosting-basics
  2. 2.Configure firebase.json with your public directory and hosting settings (redirects, rewrites, headers)
  3. 3.Test locally with: npx -y firebase-tools@latest emulators:start --only hosting
  4. 4.Deploy to production with: npx firebase deploy --only hosting
  5. 5.(Optional) Create a preview channel for testing: npx firebase hosting:channel:deploy CHANNEL_ID

Use cases

Good for
  • Deploying a React or Vue SPA with custom domain and SSL
  • Setting up redirects and rewrites in firebase.json for URL routing
  • Creating a preview channel to test changes before going live
  • Automating deployments via GitHub Actions on pull requests
  • Hosting a static documentation or marketing site on a global CDN
Who it's for
  • Frontend developers deploying static sites or SPAs
  • Full-stack developers serving microservices alongside static content
  • Teams using GitHub for CI/CD automation
  • Developers who want CLI control over build and deploy processes

firebase-hosting-basics FAQ

When should I use Firebase Hosting vs Firebase App Hosting?

Use Firebase Hosting for static sites and SPAs where you control the build process. Use Firebase App Hosting if you're using Next.js, Angular, or other full-stack frameworks that need SSR or ISR.

How do I set up custom domains and SSL?

Firebase Hosting provides zero-configuration SSL by default. Add custom domains in the Firebase Console under Hosting settings, and Firebase automatically provisions SSL certificates.

Can I serve dynamic content with Firebase Hosting?

Yes, you can use rewrites in firebase.json to route requests to Cloud Functions or Cloud Run for dynamic content and microservices.

How do I test changes before deploying to production?

Use preview channels to deploy to a temporary URL: npx firebase hosting:channel:deploy CHANNEL_ID. Share the preview URL for testing before merging to production.

How do I automate deployments with GitHub?

Set up GitHub Actions to run npx firebase deploy on push or pull request events. Firebase provides templates and documentation for common workflows.

Full instructions (SKILL.md)

Source of truth, from firebase/agent-skills.


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

2. Deploying

For instructions on deploying your site, using preview channels, and managing releases, see 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.