skills/2389-research/firebase-development/SKILL.md
This skill should be used when working with Firebase projects, including initializing projects, adding Cloud Functions or Firestore collections, debugging emulator issues, or reviewing Firebase code. Triggers on "firebase", "firestore", "cloud functions", "emulator", "firebase auth", "deploy to firebase", "firestore rules".
npx skillsauth add aiskillstore/marketplace firebase-developmentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill system guides Firebase development using proven patterns from production projects. It routes to specialized sub-skills based on detected intent.
Sub-skills:
firebase-development:project-setup - Initialize new Firebase projectsfirebase-development:add-feature - Add functions/collections/endpointsfirebase-development:debug - Troubleshoot emulator and runtime issuesfirebase-development:validate - Review Firebase code for security/patternsproject-setup:
add-feature:
debug:
validate:
If intent is unclear, ask:
Question: "What Firebase task are you working on?"
Options:
- "Project Setup" (Initialize new Firebase project)
- "Add Feature" (Add functions, collections, endpoints)
- "Debug Issue" (Troubleshoot errors or problems)
- "Validate Code" (Review against patterns)
Patterns are extracted from three production Firebase projects:
| Project | Path | Key Patterns |
|---------|------|--------------|
| oneonone | /Users/dylanr/work/2389/oneonone | Express API, custom API keys, server-write-only |
| bot-socialmedia | /Users/dylanr/work/2389/bot-socialmedia-server | Domain-grouped functions, Firebase Auth + roles |
| meme-rodeo | /Users/dylanr/work/2389/meme-rodeo | Individual function files, entitlements |
Three options based on needs:
| Option | When to Use | Key Feature |
|--------|-------------|-------------|
| site: based | Multiple independent URLs | Simple, no build coordination |
| target: based | Need predeploy hooks | Build scripts run automatically |
| Single + rewrites | Smaller projects | All under one domain |
Details: See docs/examples/multi-hosting-setup.md
| Pattern | When to Use | Example | |---------|-------------|---------| | Custom API keys | MCP tools, server-to-server | oneonone | | Firebase Auth + roles | User-facing apps | bot-socialmedia | | Hybrid | Both patterns needed | Web UI + API access |
Details: See docs/examples/api-key-authentication.md
| Pattern | When to Use | Structure |
|---------|-------------|-----------|
| Express app | API with middleware, routing | app.post('/mcp', handler) |
| Domain-grouped | Feature-rich apps | posts.ts, journal.ts |
| Individual files | Maximum modularity | One function per file |
Details: See docs/examples/express-function-architecture.md
| Model | When to Use | Complexity | |-------|-------------|------------| | Server-write-only | Light-write apps, high security | Simple rules | | Client-write + validation | High-volume writes, real-time | Complex rules |
Strongly prefer server-write-only for light-write applications.
Details: See docs/examples/firestore-rules-patterns.md
Always develop locally with emulators:
firebase emulators:start
# Access UI at http://127.0.0.1:4000
Key settings in firebase.json:
singleProjectMode: true - Essential for emulators to work togetherui.enabled: true - Access debug UIDetails: See docs/examples/emulator-workflow.md
All Firebase projects follow these standards:
| Tool | Purpose | Config File |
|------|---------|-------------|
| TypeScript | Type safety | tsconfig.json |
| vitest | Testing | vitest.config.ts |
| biome | Linting + formatting | biome.json |
Every TypeScript file starts with 2-line ABOUTME comment:
// ABOUTME: Brief description of what this file does
// ABOUTME: Second line with additional context
| Issue | Solution |
|-------|----------|
| Emulator ports in use | lsof -i :5001, kill process |
| Admin SDK vs Client SDK | Admin bypasses rules, client respects rules |
| Cold start delays | First call takes 5-10s, normal |
| Data persistence | Use Ctrl+C (not kill) to export data |
| CORS in functions | app.use(cors({ origin: true })) |
This orchestrator routes to specialized sub-skills:
docs/examples/Sub-Skills:
firebase-development:project-setup - Initialize new projectsfirebase-development:add-feature - Add functions/collectionsfirebase-development:debug - Troubleshoot issuesfirebase-development:validate - Review codedevelopment
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.