Get the FREE Ultimate OpenClaw Setup Guide →

firebase-development

Scanned
npx machina-cli add skill aiskillstore/marketplace/firebase-development --openclaw
Files (1)
SKILL.md
6.2 KB

Firebase Development

Overview

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 projects
  • firebase-development:add-feature - Add functions/collections/endpoints
  • firebase-development:debug - Troubleshoot emulator and runtime issues
  • firebase-development:validate - Review Firebase code for security/patterns

When This Skill Applies

  • Starting new Firebase projects
  • Adding Cloud Functions or Firestore collections
  • Debugging emulator issues or rule violations
  • Reviewing Firebase code for security and patterns
  • Setting up multi-hosting configurations
  • Implementing authentication (API keys or Firebase Auth)

Routing Logic

Keywords by Sub-Skill

project-setup:

  • "new firebase project", "initialize firebase", "firebase init"
  • "set up firebase", "create firebase app", "start firebase project"

add-feature:

  • "add function", "create endpoint", "new tool", "add api"
  • "new collection", "add feature", "build", "implement"

debug:

  • "error", "not working", "debug", "emulator issue"
  • "rules failing", "permission denied", "troubleshoot", "deployment failed"

validate:

  • "review firebase", "check firebase", "validate", "audit firebase"
  • "look at firebase code", "security review"

Routing Process

  1. Analyze Request: Check for routing keywords
  2. Match Sub-Skill: Identify best match based on keyword density
  3. Announce: "I'm using the firebase-development:[sub-skill] skill to [action]"
  4. Route: Load and execute the sub-skill
  5. Fallback: If ambiguous, use AskUserQuestion with 4 options

Fallback Example

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)

Reference Projects

Patterns are extracted from three production Firebase projects:

ProjectPathKey Patterns
oneonone/Users/dylanr/work/2389/oneononeExpress API, custom API keys, server-write-only
bot-socialmedia/Users/dylanr/work/2389/bot-socialmedia-serverDomain-grouped functions, Firebase Auth + roles
meme-rodeo/Users/dylanr/work/2389/meme-rodeoIndividual function files, entitlements

Pattern Summaries

Multi-Hosting Setup

Three options based on needs:

OptionWhen to UseKey Feature
site: basedMultiple independent URLsSimple, no build coordination
target: basedNeed predeploy hooksBuild scripts run automatically
Single + rewritesSmaller projectsAll under one domain

Details: See docs/examples/multi-hosting-setup.md

Authentication

PatternWhen to UseExample
Custom API keysMCP tools, server-to-serveroneonone
Firebase Auth + rolesUser-facing appsbot-socialmedia
HybridBoth patterns neededWeb UI + API access

Details: See docs/examples/api-key-authentication.md

Cloud Functions Architecture

PatternWhen to UseStructure
Express appAPI with middleware, routingapp.post('/mcp', handler)
Domain-groupedFeature-rich appsposts.ts, journal.ts
Individual filesMaximum modularityOne function per file

Details: See docs/examples/express-function-architecture.md

Security Model

ModelWhen to UseComplexity
Server-write-onlyLight-write apps, high securitySimple rules
Client-write + validationHigh-volume writes, real-timeComplex rules

Strongly prefer server-write-only for light-write applications.

Details: See docs/examples/firestore-rules-patterns.md

Emulator-First Development

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 together
  • ui.enabled: true - Access debug UI

Details: See docs/examples/emulator-workflow.md

Modern Tooling Standards

All Firebase projects follow these standards:

ToolPurposeConfig File
TypeScriptType safetytsconfig.json
vitestTestingvitest.config.ts
biomeLinting + formattingbiome.json

ABOUTME Comment Pattern

Every TypeScript file starts with 2-line ABOUTME comment:

// ABOUTME: Brief description of what this file does
// ABOUTME: Second line with additional context

Testing Requirements

  • Unit tests: Test handlers/utilities in isolation
  • Integration tests: Test with emulators running
  • Both required for every feature

Common Gotchas

IssueSolution
Emulator ports in uselsof -i :5001, kill process
Admin SDK vs Client SDKAdmin bypasses rules, client respects rules
Cold start delaysFirst call takes 5-10s, normal
Data persistenceUse Ctrl+C (not kill) to export data
CORS in functionsapp.use(cors({ origin: true }))

Summary

This orchestrator routes to specialized sub-skills:

  1. Detects intent via keywords
  2. Routes to appropriate sub-skill
  3. Sub-skills use TodoWrite checklists
  4. All reference shared patterns in docs/examples/

Sub-Skills:

  • firebase-development:project-setup - Initialize new projects
  • firebase-development:add-feature - Add functions/collections
  • firebase-development:debug - Troubleshoot issues
  • firebase-development:validate - Review code

Source

git clone https://github.com/aiskillstore/marketplace/blob/main/skills/2389-research/firebase-development/SKILL.mdView on GitHub

Overview

This skill system guides Firebase development using proven patterns from production projects. It routes requests to specialized sub-skills based on detected intent, covering project setup, feature addition, debugging, and code validation.

How This Skill Works

It analyzes the user request for routing keywords, matches the best sub-skill by keyword density, then announces and loads the chosen sub-skill. If the intent is ambiguous, it falls back to asking a clarifying question with four options.

When to Use It

  • Starting a new Firebase project
  • Adding Cloud Functions or Firestore collections
  • Debugging emulator issues or rule violations
  • Reviewing Firebase code for security and patterns
  • Setting up multi-hosting configurations or implementing authentication

Quick Start

  1. Step 1: Describe your Firebase task with clear keywords (project-setup, add-feature, debug, validate)
  2. Step 2: Include context (project name, environment, goals) to guide routing
  3. Step 3: Let the skill route to firebase-development:[sub-skill] and execute

Best Practices

  • Explicitly target sub-skills by mentioning the task (e.g., project-setup, add-feature, debug, validate) in your request
  • Provide concise context (project name, environment, and goals) to help precise routing
  • Align naming and structure with production patterns to improve maintainability
  • When debugging, include emulator logs and specific error messages to speed resolution
  • Use the validate sub-skill to review security and pattern compliance before deployment

Example Use Cases

  • oneonone: Initialize a new Firebase project and set up an Express API with custom API keys (project-setup + add-feature)
  • bot-socialmedia: Debug an emulator issue while enforcing Firebase Auth + roles (debug)
  • meme-rodeo: Review Firebase code for security patterns and access control (validate)
  • bot-socialmedia: Implement domain-grouped Cloud Functions with proper authentication (add-feature)
  • Configure multi-hosting with rewrites for a single-site domain and API access (multi-hosting/auth)

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers