Firebase hosting basics

From kumaran-is/claude-code-onboarding · View interactive version

Firebase hosting basics is an AI agent skill from the GitHub repository kumaran-is/claude-code-onboarding. Firebase Hosting for static SPAs and web apps. Use when configuring firebase.json hosting block, deploying a static site to Firebase Hosting, creating preview channels for PR review, or setting up GitHub Actions CI/CD with Workload Identity Federation. Do NOT use for Firebase App Hosting (SSR). Trig

How to use this skill

Skill file

Iron Law

NO FIREBASE HOSTING DEPLOY WITHOUT WORKLOAD IDENTITY FEDERATION.

CI/CD uses GitHub Actions + WIF — never long-lived service account JSON keys. The

GOOGLE_APPLICATION_CREDENTIALS environment variable must never point to a key file

in any workflow or .env file.

Project Context

Before using this skill:

Build the web app before deploying:

# Adjust command to match your project's build setup
npm run build
# Confirm the output directory matches firebase.json "public" setting

What are you doing?

Configuring firebase.json?

→ Load references/configuration.md

→ Set "public" to the project's actual build output directory

Deploying live or to a preview channel?

→ Load references/deploying.md

→ For CI/CD with GitHub Actions: Load references/ci-cd-github-actions.md

Adding env vars for project ID or WIF?

→ Must sync across all env files (.env, .env.staging, .env.production) in the SAME PR

→ Run the project's env-sync check before committing

References

Related Skills

Local Development

Firebase Hosting has no local emulator equivalent — the project's dev server handles this:

# Serve locally (no Firebase needed) — adjust to project's dev command
npm run start

# Or test the production build locally
npx -y firebase-tools@latest emulators:start --only hosting
# Serves the build output at http://localhost:5000
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.