Reusable skills for setting up Firebase Firestore and Cloudflare Pages deployments with Claude Code.
skills/
├── setup-firebase/
│ ├── skill.md ← Claude instructions (install this)
│ └── user-guide.md ← what YOU do manually in the browser
└── setup-cloudflare/
├── skill.md ← Claude instructions (install this)
└── user-guide.md ← what YOU do manually in the browser
Copy the skill files to Claude's global commands folder:
Windows:
mkdir %USERPROFILE%\.claude\commands
copy skills\setup-firebase\skill.md %USERPROFILE%\.claude\commands\setup-firebase.md
copy skills\setup-cloudflare\skill.md %USERPROFILE%\.claude\commands\setup-cloudflare.md
Mac / Linux:
mkdir -p ~/.claude/commands
cp skills/setup-firebase/skill.md ~/.claude/commands/setup-firebase.md
cp skills/setup-cloudflare/skill.md ~/.claude/commands/setup-cloudflare.mdAfter copying, the skills are available in any project you open with Claude Code.
In any Claude Code session, type:
| Command | What it does |
|---|---|
/setup-firebase |
Full Firebase Firestore setup — creates project, deploys rules, tests connection |
/setup-cloudflare |
Full Cloudflare Pages deployment — auth, secrets, deploy, verify |
Claude will guide you step by step, telling you exactly what to do in the browser and handling all CLI work automatically.
- Creates
firebase.json,firestore.rules,firestore.indexes.jsonif missing - Guides you through creating the Firebase project and downloading the service account key
- Deploys Firestore security rules and indexes via CLI
- Tests the connection with a live read/write
- Optionally pushes
FIREBASE_SAandFIREBASE_PROJECTsecrets to Cloudflare Pages
- Verifies your Cloudflare API token
- Creates the Pages project
- Creates
_worker.jsif missing (required for Wrangler v4+) - Sets all secrets (
FIREBASE_SA,FIREBASE_PROJECT,DASHBOARD_PASSWORD) - Deploys and runs verification tests (401 without auth, 200 with auth, public routes pass)
- Node.js (for
npx wranglerandnpx firebase) - Python 3 +
pip install firebase-admin(for Firebase connection test) - A Cloudflare account (free) — https://cloudflare.com
- A Firebase account (free Spark plan) — https://firebase.google.com
These were discovered during real usage and are documented in the skills:
| Issue | Root cause | Fix |
|---|---|---|
wrangler login doesn't persist |
OAuth not saved in Windows bash sessions | Use CLOUDFLARE_API_TOKEN env var |
| Functions not deploying (Wrangler v4) | --functions-dir flag removed |
Use _worker.js advanced mode |
Unexpected token '<' from Firestore |
FIREBASE_PROJECT secret has trailing newline |
Use printf not echo when setting secrets |
increment() silently does nothing |
Wrong Firestore REST format | Use documents:commit endpoint with field transforms |
:runQuery returns HTML |
URL missing /documents before :runQuery |
Use ${base}:runQuery not ${base.replace('/documents','')}:runQuery |