zod-patterns
Installation
SKILL.md
Zod Schema Patterns
Basic Pattern
import { z } from 'zod'
import { createZodDto } from 'nestjs-zod'
// Define Schema
export const MySchema = z.object({
name: z.string().min(1),
email: z.string().email(),
age: z.number().int().positive().optional(),
})
// Create DTO class
export class MyDto extends createZodDto(MySchema) {}
// Partial DTO for updates
Related skills
More from mx-space/core
api-conventions
MX Space API design conventions. Apply when writing controllers, API endpoints, or handling HTTP requests.
33run-test
Run tests. Supports running all tests, single file, or pattern-matched tests.
1mx-review
Review code for MX Space project conventions. Checks NestJS patterns, TypeGoose models, Zod schemas, API design, etc.
1create-e2e-test
Create E2E test file for a specified module. Use when adding end-to-end tests for controllers.
1create-migration
Create database migration file. Use when modifying database structure, migrating data, or updating config formats.
1create-module
Create a new NestJS module with controller, service, model, and schema files. Use when adding new feature modules, API endpoints, or business domains.
1