api-schema-zod

Generate Zod validation schemas that can be used both on the backend for validation and shared with the frontend for type-safe API contracts.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "api-schema-zod" with this command: npx skills add rimthan-lab/rimthan-plugins/rimthan-lab-rimthan-plugins-api-schema-zod

Zod Schemas

Purpose

Generate Zod validation schemas that can be used both on the backend for validation and shared with the frontend for type-safe API contracts.

When to Use

  • Creating reusable validation schemas

  • Sharing schemas between backend and frontend

  • Type-safe API contracts

  • Runtime validation with TypeScript inference

What It Generates

Directory Structure

packages/shared-schemas/src/schemas/{feature}/ ├── {entity}.schema.ts ├── index.ts

Patterns Enforced

Schema Reusability

  • Common schemas (email, password, UUID) imported from shared

  • Schemas composable via .pick() , .omit() , .extend()

  • Transformations for data normalization

Type Inference

  • z.infer<typeof schema> for TypeScript types

  • Types can be exported to frontend

Error Messages

  • Custom validation messages

  • User-friendly error descriptions

Usage Example

/skill schema-zod --name=User --fields='email:email,password:password,name:string,isActive:boolean'

Related Files

  • API DTO - Class-validator DTOs (alternative)

  • API Controller - Controllers using schemas

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

flutter-developer

No summary provided by upstream source.

Repository SourceNeeds Review
General

flutter-reviewer

No summary provided by upstream source.

Repository SourceNeeds Review
General

flutter-tester

No summary provided by upstream source.

Repository SourceNeeds Review
General

lint-fix

No summary provided by upstream source.

Repository SourceNeeds Review