firebase-development-project-setup
This skill should be used when initializing a new Firebase project with proven architecture. Triggers on "new firebase project", "initialize firebase", "firebase init", "set up firebase", "create firebase app", "start firebase project". Guides through CLI setup, architecture choices, and emulator configuration.
Best use case
firebase-development-project-setup is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. This skill should be used when initializing a new Firebase project with proven architecture. Triggers on "new firebase project", "initialize firebase", "firebase init", "set up firebase", "create firebase app", "start firebase project". Guides through CLI setup, architecture choices, and emulator configuration.
This skill should be used when initializing a new Firebase project with proven architecture. Triggers on "new firebase project", "initialize firebase", "firebase init", "set up firebase", "create firebase app", "start firebase project". Guides through CLI setup, architecture choices, and emulator configuration.
Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.
Practical example
Example input
Use the "firebase-development-project-setup" skill to help with this workflow task. Context: This skill should be used when initializing a new Firebase project with proven architecture. Triggers on "new firebase project", "initialize firebase", "firebase init", "set up firebase", "create firebase app", "start firebase project". Guides through CLI setup, architecture choices, and emulator configuration.
Example output
A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.
When to use this skill
- Use this skill when you want a reusable workflow rather than writing the same prompt again and again.
When not to use this skill
- Do not use this when you only need a one-off answer and do not need a reusable workflow.
- Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/project-setup/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How firebase-development-project-setup Compares
| Feature / Agent | firebase-development-project-setup | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
This skill should be used when initializing a new Firebase project with proven architecture. Triggers on "new firebase project", "initialize firebase", "firebase init", "set up firebase", "create firebase app", "start firebase project". Guides through CLI setup, architecture choices, and emulator configuration.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Firebase Project Setup
## Overview
This sub-skill guides initializing a new Firebase project with proven architecture patterns. It handles Firebase CLI setup, architecture decisions, emulator configuration, and initial project structure.
**Key principles:**
- Use TypeScript for all functions
- Configure emulators from the start
- Choose architecture patterns early (hosting, auth, functions, security)
- Set up testing infrastructure immediately
## When This Sub-Skill Applies
- Starting a brand new Firebase project
- Setting up Firebase for the first time in a repository
- User says: "new firebase project", "initialize firebase", "firebase init", "set up firebase"
**Do not use for:**
- Adding features to existing projects → `firebase-development:add-feature`
- Debugging existing setup → `firebase-development:debug`
## Architecture Decisions
Use AskUserQuestion to gather these four decisions upfront:
### 1. Hosting Configuration
- **Single Site** - One hosting site, simple project
- **Multiple Sites (site:)** - Multiple independent URLs
- **Multiple with Builds (target:)** - Multiple sites with predeploy hooks
**Reference:** `docs/examples/multi-hosting-setup.md`
### 2. Authentication Approach
- **API Keys** - MCP tools, server-to-server, programmatic access
- **Firebase Auth** - User-facing app with login UI
- **Both** - Firebase Auth for web + API keys for tools
**Reference:** `docs/examples/api-key-authentication.md`
### 3. Functions Architecture
- **Express API** - Many related endpoints, need middleware, RESTful routing
- **Domain Grouped** - Feature-rich app with distinct areas (posts, admin)
- **Individual Files** - Independent functions, maximum modularity
**Reference:** `docs/examples/express-function-architecture.md`
### 4. Security Model
- **Server-Write-Only** (Preferred) - Cloud Functions handle all writes
- **Client-Write** - High-volume writes, need fastest UX, complex rules
**Reference:** `docs/examples/firestore-rules-patterns.md`
## TodoWrite Workflow
Create checklist with these 14 steps:
### Step 1: Verify Firebase CLI
```bash
firebase --version # Install via npm install -g firebase-tools if missing
firebase login
```
### Step 2: Create Project Directory
```bash
mkdir my-firebase-project && cd my-firebase-project
git init && git branch -m main
```
Create `.gitignore` with: `node_modules/`, `.env`, `.env.local`, `.firebase/`, `lib/`, `dist/`
### Step 3: Run Firebase Init
```bash
firebase init
```
Select: Firestore, Functions, Hosting, Emulators. Choose TypeScript for functions.
### Step 4: Gather Architecture Decisions
Use AskUserQuestion for the four decisions above.
### Step 5: Configure firebase.json
Set up based on hosting decision. Critical emulator settings:
```json
{
"emulators": {
"singleProjectMode": true,
"ui": { "enabled": true, "port": 4000 }
}
}
```
**Reference:** `docs/examples/multi-hosting-setup.md`
### Step 6: Set Up Functions Structure
Based on architecture choice:
**Express:** Create `middleware/`, `tools/`, `services/`, `shared/`
**Domain-Grouped:** Create `shared/types/`, `shared/validators/`
**Individual:** Create `functions/`
Install dependencies: `express`, `cors`, `firebase-admin`, `firebase-functions`, `vitest`, `biome`
### Step 7: Create Initial Functions Code
Create `functions/src/index.ts` with ABOUTME comments. Include health check endpoint for Express pattern.
**Reference:** `docs/examples/express-function-architecture.md`
### Step 8: Configure Firestore Rules
Based on security model decision. Always include:
- Helper functions (`isAuthenticated()`, `isOwner()`)
- Default deny rule at bottom
**Reference:** `docs/examples/firestore-rules-patterns.md`
### Step 9: Set Up Testing
Create `vitest.config.ts` and `vitest.emulator.config.ts`. Set up `__tests__/` and `__tests__/emulator/` directories.
### Step 10: Configure Biome
Create `biome.json` with recommended rules. Run `npm run lint:fix`.
### Step 11: Set Up Environment Variables
Create `.env.example` template. Copy to `.env` and fill in values.
For hosting: create `hosting/.env.local` with `NEXT_PUBLIC_USE_EMULATORS=true`.
### Step 12: Initial Git Commit
```bash
git add . && git commit -m "feat: initial Firebase project setup"
```
### Step 13: Start Emulators
```bash
firebase emulators:start
open http://127.0.0.1:4000
```
Verify all services start. Test health endpoint if using Express.
### Step 14: Create Initial Tests
Create `functions/src/__tests__/setup.test.ts` with basic verification. Run `npm test`.
## Verification Checklist
Before marking complete:
- [ ] Firebase CLI installed and logged in
- [ ] TypeScript functions compile: `npm run build`
- [ ] All tests pass: `npm test`
- [ ] Linting passes: `npm run lint`
- [ ] Emulators start without errors
- [ ] Emulator UI accessible at http://127.0.0.1:4000
- [ ] Git initialized with commits
- [ ] `.env` files created and gitignored
- [ ] ABOUTME comments on all files
- [ ] Architecture decisions documented
## Project Structures
**Express API:**
```
functions/src/
├── index.ts
├── middleware/apiKeyGuard.ts
├── tools/
├── services/
└── __tests__/
```
**Domain-Grouped:**
```
functions/src/
├── index.ts
├── posts.ts
├── users.ts
├── shared/types/
└── __tests__/
```
**Individual Files:**
```
functions/
├── functions/upload.ts
├── functions/process.ts
└── index.js
```
## Next Steps
After setup complete:
1. Add first feature → `firebase-development:add-feature`
2. Review setup → `firebase-development:validate`
3. Debug issues → `firebase-development:debug`
## Pattern References
- **Hosting:** `docs/examples/multi-hosting-setup.md`
- **Auth:** `docs/examples/api-key-authentication.md`
- **Functions:** `docs/examples/express-function-architecture.md`
- **Rules:** `docs/examples/firestore-rules-patterns.md`
- **Emulators:** `docs/examples/emulator-workflow.md`Related Skills
project-to-obsidian
将代码项目转换为 Obsidian 知识库。当用户提到 obsidian、项目文档、知识库、分析项目、转换项目 时激活。 【激活后必须执行】: 1. 先完整阅读本 SKILL.md 文件 2. 理解 AI 写入规则(默认到 00_Inbox/AI/、追加式、统一 Schema) 3. 执行 STEP 0: 使用 AskUserQuestion 询问用户确认 4. 用户确认后才开始 STEP 1 项目扫描 5. 严格按 STEP 0 → 1 → 2 → 3 → 4 顺序执行 【禁止行为】: - 禁止不读 SKILL.md 就开始分析项目 - 禁止跳过 STEP 0 用户确认 - 禁止直接在 30_Resources 创建(先到 00_Inbox/AI/) - 禁止自作主张决定输出位置
project-map-builder
生成或更新用户指定文件夹的 PROJECT_MAP.md。适用于用户要求目录地图/项目地图/代码仓概览/文件夹级说明/更新已有 PROJECT_MAP.md 的场景。必须先询问要扫描的文件夹范围,禁止默认全仓库扫描;支持单目录或多目录(合并或分别生成)。
vue-development-guides
A collection of best practices and tips for developing applications using Vue.js. This skill MUST be apply when developing, refactoring or reviewing Vue.js or Nuxt projects.
system-environment-setup
Configure development and production environments for consistent and reproducible setups. Use when setting up new projects, Docker environments, or development tooling. Handles Docker Compose, .env configuration, dev containers, and infrastructure as code.
environment-setup
Configure and manage development, staging, and production environments. Use when setting up environment variables, managing configurations, or separating environments. Handles .env files, config management, and environment-specific settings.
authentication-setup
Design and implement authentication and authorization systems. Use when setting up user login, JWT tokens, OAuth, session management, or role-based access control. Handles password security, token management, SSO integration.
wordpress-woocommerce-development
WooCommerce store development workflow covering store setup, payment integration, shipping configuration, and customization.
wordpress-theme-development
WordPress theme development workflow covering theme architecture, template hierarchy, custom post types, block editor support, and responsive design.
wordpress-plugin-development
WordPress plugin development workflow covering plugin architecture, hooks, admin interfaces, REST API, and security best practices.
voice-ai-engine-development
Build real-time conversational AI voice engines using async worker pipelines, streaming transcription, LLM agents, and TTS synthesis with interrupt handling and multi-provider support
voice-ai-development
Expert in building voice AI applications - from real-time voice agents to voice-enabled apps. Covers OpenAI Realtime API, Vapi for voice agents, Deepgram for transcription, ElevenLabs for synthesis, LiveKit for real-time infrastructure, and WebRTC fundamentals. Knows how to build low-latency, production-ready voice experiences. Use when: voice ai, voice agent, speech to text, text to speech, realtime voice.
systems-programming-rust-project
You are a Rust project architecture expert specializing in scaffolding production-ready Rust applications. Generate complete project structures with cargo tooling, proper module organization, testing