TypeScript schema validation library that infers static types from runtime schemas for forms and APIs.
- skills.sh installs
- 909
- GitHub stars
- 80
- last updated
- Aug 21, 2026
What it does
- Covers primitives, objects, arrays, records, unions, transforms, schema composition, async refinements, and error handling
- Includes parse, safeParse, parseAsync, and safeParseAsync methods plus
z.infer,z.input, andz.outputfor type extraction - Supports strict, passthrough, and strip modes for unknown object keys, with
.default(),.optional(), and.nullable()modifiers - Designed for form validation, API request and response checks, environment variables, and tRPC or Drizzle integrations
Install
$ npx -y skills add bobmatnyc/claude-mpm-skills --skill zod -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Zod Validation Skill
Summary
TypeScript-first schema validation library with static type inference. Define schemas once, get runtime validation and compile-time types automatically.
When to Use
- Form validation with type-safe data
- API request/response validation
- Environment variable validation
- Runtime type checking with TypeScript inference
- tRPC procedure inputs/outputs
- Database schema validation (Drizzle, Prisma)
Quick Start
import { z } from 'zod';
// Define schema
const UserSchema = z.object({
id: z.string().uuid(),
email: z.string().email(),
age: z.number().min(18),
role: z.enum(['user', 'admin'])
});
// Infer TypeScript type
type User = z.infer<typeof UserSchema>;
// Validate data
const result = UserSchema.safeParse(data);
if (result.success) {
const user: User = result.data;
}
Primitive Types
Basic Types
import { z } from 'zod';
// String with validation
const nameSchema = z.string()
.min(2, "Too short")
.max(50, "Too long")
.trim();
Details
- Repository
- github.com/bobmatnyc/claude-mpm-skills
- Categories
- Frontend & UI Code, Backend & APIs
- First seen
- May 16, 2026
More from bobmatnyc/claude-mpm-skills
All 154- Sqlalchemy Orm873
- Github Actions780
- Nodejs Backend Typescript745
- Cypress672
- Session Compression672
- Opentelemetry658
- Hono Cloudflare650
- Wordpress Security Validation632
- Xlsx607
- Tanstack Query603
- Fastify590
- Api Design Patterns587
- Skill Creator577
- Git Workflow576
- Express Production527
- Golang Grpc525
- Hono Core511
- Axum510
- Zustand505
- Asyncio501
- Typescript Core494
- Bug Fix490
- Mypy487
- Threat Modeling484
Similar to Zod
More Frontend & UI Code
hono-validationbobmatnyc/claude-mpm-skills423 installsType-safe request validation for Hono using Zod, TypeBox, Valibot, or any Standard Schema library.
drizzle-ormbobmatnyc/claude-mpm-skills4.3K installsType-safe SQL ORM for TypeScript that compiles queries with zero runtime overhead.
fastify-typescriptmindrally/skills899 installsOpinionated Fastify and TypeScript guidance for typed APIs with schema validation, Prisma, and testing.
valibotopen-circle/agent-skills2.2K installsSchema validation skill for Valibot, covering pipelines, parsing, and Zod-to-Valibot API migration.
graphqlmindrally/skills722 installsExpert guidance for GraphQL schema design, query optimization, and type-safe client integration.
