firebase-development-validate

This skill should be used when reviewing Firebase code against security model and best practices. Triggers on "review firebase", "check firebase", "validate", "audit firebase", "security review", "look at firebase code". Validates configuration, rules, architecture, and security.

242 stars

Best use case

firebase-development-validate 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 reviewing Firebase code against security model and best practices. Triggers on "review firebase", "check firebase", "validate", "audit firebase", "security review", "look at firebase code". Validates configuration, rules, architecture, and security.

This skill should be used when reviewing Firebase code against security model and best practices. Triggers on "review firebase", "check firebase", "validate", "audit firebase", "security review", "look at firebase code". Validates configuration, rules, architecture, and security.

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-validate" skill to help with this workflow task. Context: This skill should be used when reviewing Firebase code against security model and best practices. Triggers on "review firebase", "check firebase", "validate", "audit firebase", "security review", "look at firebase code". Validates configuration, rules, architecture, and security.

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

$curl -o ~/.claude/skills/firebase-development-validate/SKILL.md --create-dirs "https://raw.githubusercontent.com/aiskillstore/marketplace/main/skills/2389-research/firebase-development-validate/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/firebase-development-validate/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How firebase-development-validate Compares

Feature / Agentfirebase-development-validateStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

This skill should be used when reviewing Firebase code against security model and best practices. Triggers on "review firebase", "check firebase", "validate", "audit firebase", "security review", "look at firebase code". Validates configuration, rules, architecture, and security.

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.

Related Guides

SKILL.md Source

# Firebase Code Validation

## Overview

This sub-skill validates existing Firebase code against proven patterns and security best practices. It checks configuration, rules, architecture consistency, authentication, testing, and production readiness.

**Key principles:**
- Validate against chosen architecture patterns
- Check security rules thoroughly
- Verify test coverage exists
- Review production readiness

## When This Sub-Skill Applies

- Conducting code review of Firebase project
- Auditing security implementation
- Preparing for production deployment
- User says: "review firebase", "validate", "audit firebase", "check firebase code"

**Do not use for:**
- Initial setup → `firebase-development:project-setup`
- Adding features → `firebase-development:add-feature`
- Debugging active errors → `firebase-development:debug`

## TodoWrite Workflow

Create checklist with these 9 steps:

### Step 1: Check firebase.json Structure

Validate required sections:
- `hosting` - Array or object present
- `functions` - Source directory, runtime, predeploy hooks
- `firestore` - Rules and indexes files
- `emulators` - Local development config

Check hosting pattern matches implementation (site:, target:, or single).

**Reference:** `docs/examples/multi-hosting-setup.md`

### Step 2: Validate Emulator Configuration

Critical settings:
```json
{
  "emulators": {
    "singleProjectMode": true,
    "ui": { "enabled": true }
  }
}
```

Verify all services in use have emulator entries.

**Reference:** `docs/examples/emulator-workflow.md`

### Step 3: Review Firestore Rules

Check for:
- Helper functions at top (`isAuthenticated()`, `isOwner()`)
- Consistent security model (server-write-only OR client-write-validated)
- `diff().affectedKeys().hasOnly([...])` for client writes
- Collection group rules if using `collectionGroup()` queries
- Default deny rule at bottom

**Reference:** `docs/examples/firestore-rules-patterns.md`

### Step 4: Validate Functions Architecture

Identify pattern in use:
- **Express:** Check `middleware/`, `tools/`, CORS, health endpoint
- **Domain-Grouped:** Check exports, domain boundaries, `shared/`
- **Individual:** Check one function per file structure

**Critical:** Don't mix patterns. Verify consistency throughout.

**Reference:** `docs/examples/express-function-architecture.md`

### Step 5: Check Authentication Implementation

**For API Keys:**
- Middleware validates key format with project prefix
- Uses `collectionGroup('apiKeys')` query
- Checks `active: true` flag
- Attaches `userId` to request

**For Firebase Auth:**
- Functions check `request.auth.uid`
- Role lookups use Firestore user document
- Client connects to auth emulator in development

**Reference:** `docs/examples/api-key-authentication.md`

### Step 6: Verify ABOUTME Comments

All `.ts` files should start with:
```typescript
// ABOUTME: Brief description of what this file does
// ABOUTME: Second line with additional context
```

```bash
grep -L "ABOUTME:" functions/src/**/*.ts  # Find missing
```

### Step 7: Review Test Coverage

Check for:
- Unit tests: `functions/src/__tests__/**/*.test.ts`
- Integration tests: `functions/src/__tests__/emulator/**/*.test.ts`
- `vitest.config.ts` and `vitest.emulator.config.ts` exist
- Coverage threshold met (60%+)

```bash
npm test && npm run test:coverage
```

### Step 8: Validate Error Handling

All handlers must:
- Use try-catch blocks
- Return `{ success: boolean, message: string, data?: any }`
- Use proper HTTP status codes (400, 401, 403, 500)
- Log errors with `console.error`
- Validate input before processing

### Step 9: Security and Production Review

**Security checks:**
- No secrets in code (`grep -r "apiKey.*=" functions/src/`)
- `.env` files in `.gitignore`
- No `allow read, write: if true;` in rules
- Sensitive fields protected from client writes

**Production checks:**
- `npm audit` clean
- Build succeeds: `npm run build`
- Tests pass: `npm test`
- Correct project in `.firebaserc`
- Indexes defined for complex queries

## Validation Checklists

### Hosting Pattern
- [ ] Pattern matches firebase.json config
- [ ] Sites/targets exist in Firebase Console
- [ ] Rewrites reference valid functions
- [ ] Emulator ports configured

### Authentication Pattern
- [ ] Auth method matches security model
- [ ] Middleware/checks implemented correctly
- [ ] Environment variables documented
- [ ] Emulator connection configured

### Security Model
- [ ] Server-write-only: All `allow write: if false;`
- [ ] Client-write: `diff().affectedKeys()` validation
- [ ] Default deny rule present
- [ ] Helper functions used consistently

## Common Issues

| Issue | Fix |
|-------|-----|
| Missing `singleProjectMode` | Add to emulators config |
| No default deny rule | Add `match /{document=**} { allow: if false; }` |
| Mixed architecture | Migrate to consistent pattern |
| Missing ABOUTME | Add 2-line header to all .ts files |
| No integration tests | Add emulator tests for workflows |
| Inconsistent response format | Standardize to `{success, message, data?}` |
| No error handling | Add try-catch to all handlers |
| Secrets in code | Move to environment variables |

## Integration with Superpowers

For general code quality review beyond Firebase patterns, invoke `superpowers:requesting-code-review`.

## Output

After validation, provide:
- Summary of findings
- Issues categorized by severity (critical, important, nice-to-have)
- Recommendations for remediation
- Confirmation of best practices compliance

## 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

vue-development-guides

242
from aiskillstore/marketplace

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.

wordpress-woocommerce-development

242
from aiskillstore/marketplace

WooCommerce store development workflow covering store setup, payment integration, shipping configuration, and customization.

wordpress-theme-development

242
from aiskillstore/marketplace

WordPress theme development workflow covering theme architecture, template hierarchy, custom post types, block editor support, and responsive design.

wordpress-plugin-development

242
from aiskillstore/marketplace

WordPress plugin development workflow covering plugin architecture, hooks, admin interfaces, REST API, and security best practices.

voice-ai-engine-development

242
from aiskillstore/marketplace

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

242
from aiskillstore/marketplace

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.

salesforce-development

242
from aiskillstore/marketplace

Expert patterns for Salesforce platform development including Lightning Web Components (LWC), Apex triggers and classes, REST/Bulk APIs, Connected Apps, and Salesforce DX with scratch orgs and 2nd generation packages (2GP). Use when: salesforce, sfdc, apex, lwc, lightning web components.

python-fastapi-development

242
from aiskillstore/marketplace

Python FastAPI backend development with async patterns, SQLAlchemy, Pydantic, authentication, and production API patterns.

python-development-python-scaffold

242
from aiskillstore/marketplace

You are a Python project architecture expert specializing in scaffolding production-ready Python applications. Generate complete project structures with modern tooling (uv, FastAPI, Django), type hint

moodle-external-api-development

242
from aiskillstore/marketplace

Create custom external web service APIs for Moodle LMS. Use when implementing web services for course management, user tracking, quiz operations, or custom plugin functionality. Covers parameter validation, database operations, error handling, service registration, and Moodle coding standards.

lint-and-validate

242
from aiskillstore/marketplace

Automatic quality control, linting, and static analysis procedures. Use after every code modification to ensure syntax correctness and project standards. Triggers onKeywords: lint, format, check, validate, types, static analysis.

game-development

242
from aiskillstore/marketplace

Game development orchestrator. Routes to platform-specific skills based on project needs.