Validate

From aiskillstore/marketplace · View interactive version

Validate is an AI agent skill from the GitHub repository aiskillstore/marketplace. 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.

How to use this skill

Skill file

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:

When This Sub-Skill Applies

Do not use for:

TodoWrite Workflow

Create checklist with these 9 steps:

Step 1: Check firebase.json Structure

Validate required sections:

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

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

Step 2: Validate Emulator Configuration

Critical settings:

{
  "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:

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

Step 4: Validate Functions Architecture

Identify pattern in use:

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

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

Step 5: Check Authentication Implementation

For API Keys:

For Firebase Auth:

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

Step 6: Verify ABOUTME Comments

All .ts files should start with:

// ABOUTME: Brief description of what this file does
// ABOUTME: Second line with additional context
grep -L "ABOUTME:" functions/src/**/*.ts  # Find missing

Step 7: Review Test Coverage

Check for:

npm test && npm run test:coverage

Step 8: Validate Error Handling

All handlers must:

Step 9: Security and Production Review

Security checks:

Production checks:

Validation Checklists

Hosting Pattern

Authentication Pattern

Security Model

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:

Pattern References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.