zod

Define Zod schemas and validate data with safeParse across GeroCare layers.

Updated Dec 28, 2025
One-click install
npx skills add https://github.com/DevXoje/gerocare --skill zod-devxoje
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: zod
Source: https://github.com/DevXoje/gerocare/tree/main/.cursor/skills/zod
Command: npx skills add https://github.com/DevXoje/gerocare --skill zod-devxoje

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides Zod-based validation schemas to enforce consistent domain data integrity in GeroCare.

Core Features & Use Cases

  • Domain-layer schemas for robust validation using Zod.
  • Application-layer form validation via safeParse.
  • Validation of Firestore data before domain conversion to ensure data integrity across layers.

Quick Start

Install Zod in your project, import the schemas (e.g., {Entity}CreateSchema, {Entity}Schema), and validate data using safeParse. Then integrate these schemas into domain, application, and infrastructure layers.

Frequently Asked Questions about zod

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

FAQPage Schema
How do I enforce TypeScript data validation across domain and application layers?

You can enforce TypeScript data validation across layers by defining Zod schemas in the domain layer and applying safeParse in the application layer to ensure consistent data integrity before persistence.

How do I validate Firestore data before converting it to domain objects?

Validate Firestore data before domain conversion by applying Zod schemas directly to the infrastructure layer, ensuring raw database records match domain integrity requirements before object mapping.

Why do I need explicit date conversions before running Zod schema validation?

Explicit date conversions before validation are required because raw inputs often lack proper TypeScript typing, and converting them ensures Zod schemas accurately parse and enforce date constraints.

What is the best way to handle form validation errors using Zod safeParse?

The best way to handle form validation errors is using Zod safeParse, which returns a structured error object instead of throwing, allowing the application layer to safely manage invalid domain data.

Can I use Zod schemas to check data integrity in a layered architecture?

Yes, Zod schemas can check data integrity in a layered architecture by defining validation rules in the domain layer and applying them across application and infrastructure layers for consistent data processing.