firebase-schema-generator

Generate Zod schemas for Firestore entities with timestamps and audit fields.

1|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/dfrabik/dev-portfolio --skill firebase-schema-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: firebase-schema-generator
Source: https://github.com/dfrabik/dev-portfolio/tree/main/.cursor/skills/firebase-schema-generator
Command: npx skills add https://github.com/dfrabik/dev-portfolio --skill firebase-schema-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate standardized Zod schemas for Firestore entities, including automatic timestamp handling, audit fields, and parsing helpers, to reduce boilerplate and ensure consistency across projects.

Core Features & Use Cases

  • Automatic Firestore timestamp handling via a firestoreDate helper that accepts Date, string, or Firestore timestamps.
  • Standard audit fields: createdAt, updatedAt, createdBy, updatedBy with sensible defaults.
  • Parse helpers: parseDocument and parseDocuments to safely convert raw data into typed entities.
  • Enforces common field patterns (enums, optional fields, references) and provides reusable schema templates for new entities.
  • Use cases include creating new Firestore schemas, validating existing schemas, and generating type-safe models for TypeScript apps.

Quick Start

Describe the Firestore entity fields you need and I will generate a complete Zod schema with timestamps, audit fields, and parse helpers.

Frequently Asked Questions about firebase-schema-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Zod schemas for Firestore entities in TypeScript?

To generate Zod schemas for Firestore entities, you describe your high-level field specifications and receive a complete schema with timestamp handling, audit fields, and parsing helpers.

What is the best way to handle Firestore timestamps with Zod validation?

Handling Firestore timestamps with Zod validation is done using a firestoreDate helper that safely accepts Date objects, strings, or native Firestore timestamps.

How do I add standard audit fields like createdAt and updatedAt to a Zod schema?

Standard audit fields like createdAt and updatedAt are automatically added to your Zod schema with sensible defaults, alongside createdBy and updatedBy fields, reducing boilerplate.

Can I parse raw Firestore documents into typed TypeScript entities safely?

You can safely parse raw Firestore documents into typed TypeScript entities using the provided parseDocument and parseDocuments helpers to validate data against your schema.

Does this schema generator support enums and optional fields for Firestore collections?

The schema generator supports common Firestore field patterns including enums, optional fields, and references, providing reusable schema templates for new entities.