agentleFS
kumaran-iskumaran-is/claude-code-onboarding/.claude/skills/firebase-hosting-basics/SKILL.md

firebase-hosting-basics

Skill36 starsChanged 6 months agoMITView on GitHub

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). Triggers: firebase hosting, deploy angular spa, firebase hosting deploy, preview channel, static site deploy, firebase ci/cd, hosting rewrite.

  • Reads credentials

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before using this skill:

    line 23
  2. Very specific:

    Check CLAUDE.md for the project's build tool and output path (e.g.

    line 24

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

  • Check CLAUDE.md for the project's build tool and output path (e.g. dist/)
  • Confirm the firebase.json location (typically repo root)
  • Confirm whether a hosting block already exists in firebase.json

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

  • Configuration: references/configuration.md
  • Deploying: references/deploying.md
  • CI/CD (GitHub Actions + WIF): references/ci-cd-github-actions.md

Related Skills

  • angular-spa — Angular build setup; produces the static output
  • firebase-basics — Firebase CLI auth, project setup, npx discipline
  • gcp-cloud-run — WIF setup patterns reused for Firebase Hosting CI/CD
  • deployment-engineer agent — for complex multi-environment pipeline setup

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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.