giuseppe-trisciuoglio avatar

Zod Validation Utilities

This gives Claude production-ready patterns for Zod v4 validation in TypeScript projects. You get reusable schemas for common cases like emails, UUIDs, and pagination, plus solid examples of coercion, transforms, cross-field validation with refine, and discriminated unions. The safeParse workflow example is clean and shows proper error handling without throwing. React Hook Form integration via zodResolver is covered with correct type inference using z.input and z.output. Most useful when you're building API handlers or form validation and want consistent patterns across your codebase instead of reinventing schemas everywhere. Stays close to modern Zod idioms and skips the preprocessor rabbit holes.

skills.sh installs
4K
GitHub stars
369
last updated
Aug 21, 2026

Install

$ npx -y skills add giuseppe-trisciuoglio/developer-kit --skill zod-validation-utilities --agent claude-code

Installs into .claude/skills of the current project.

Files

Zod Validation Utilities

Overview

Production-ready Zod v4 patterns for reusable, type-safe validation with minimal boilerplate. Focuses on modern APIs, predictable error handling, and form integration.

When to Use

  • Defining request/response validation schemas in TypeScript services
  • Parsing untrusted input from APIs, forms, env vars, or external systems
  • Standardizing coercion, transforms, and cross-field validation
  • Building reusable schema utilities across teams
  • Integrating React Hook Form with Zod using zodResolver

Instructions

  1. Start with strict object schemas and explicit field constraints
  2. Prefer modern Zod v4 APIs and the error option for error messages
  3. Use coercion at boundaries (z.coerce.*) when input types are uncertain
  4. Keep business invariants in refine/superRefine close to schema definitions
  5. Export both schema and inferred types (z.input/z.output) for consistency
  6. Reuse utility schemas (email, id, dates, pagination) to reduce duplication

Validation Workflow

When integrating validation into an API handler or service:

Sponsors

Details

Repository
github.com/giuseppe-trisciuoglio/developer-kit
Category
Backend & APIs
First seen
May 16, 2026

More from giuseppe-trisciuoglio/developer-kit

All 102
1zc277584121 avatarmermaid-to-imagezc277584121/marketing-skillsConvert Mermaid code blocks in Markdown files to PNG images using the mermaid.ink API.4Kskills.sh installs
2zc277584121 avatarimage-generationzc277584121/marketing-skillsGenerate illustration images for articles and documentation with a Codex-first workflow, OpenAI API fallback, and Gemini fallback.4Kskills.sh installs
3tradermonty avatarvalue-dividend-screenertradermonty/claude-trading-skillsScreen US stocks for high-quality dividend opportunities combining value characteristics (P/E ratio under 20, P/B ratio under 2), attractive yields (3% or highe4Kskills.sh installs
4dotnet avatarandroid-tombstone-symbolicationdotnet/skillsSymbolicate the .NET runtime frames in an Android tombstone file. Extracts BuildIds and PC offsets from the native backtrace, downloads debug symbols from the M4Kskills.sh installs
5pexoai avatarvideoagent-audio-studiopexoai/pexo-skillsTired of juggling multiple audio APIs? This skill gives you one-command access to TTS, music generation, sound effects, and voice cloning. Use when you want to 4Kskills.sh installs
6majidmanzarpour avatarthreejs-3d-generatormajidmanzarpour/threejs-game-skillsGenerate, texture, rig, animate, stylize, convert, and download 3D assets for Three.js games using the Tripo API. Use for text-to-3D, image-to-3D, 2D concept to3.9Kskills.sh installs