zod

Complete Zod validation library documentation. Use when working with Zod schema validation, TypeScript type inference, form validation, API validation, error handling, or data parsing. Covers schema definition, refinements, transforms, error customization, and ecosystem integrations.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "zod" with this command: npx skills add leonaaardob/lb-zod-skill

Zod Documentation

Complete Zod validation library documentation embedded in markdown. Read from references/ to answer questions about schema validation, type inference, and error handling.

Documentation Structure

All documentation is in references/ organized by topic:

Core Documentation

Getting Started

  • index.mdx - Introduction and quick start
  • basics.mdx - Basic usage and schema definition

API Reference

  • api.mdx - Complete API documentation
    • Primitives (string, number, boolean, etc.)
    • Complex types (object, array, tuple, union, etc.)
    • Schema methods (parse, safeParse, parseAsync, etc.)
    • Refinements and transforms
    • Type inference
    • Error handling

Advanced Features

  • error-formatting.mdx - Error formatting and customization
  • error-customization.mdx - Custom error messages
  • codecs.mdx - Serialization and deserialization
  • json-schema.mdx - JSON Schema generation
  • metadata.mdx - Schema metadata

Integration & Ecosystem

  • ecosystem.mdx - Community packages and integrations
  • library-authors.mdx - Guide for library authors
  • packages/ - Related packages

Version 4

  • v4/ - Zod v4 features and migration guide

Quick Reference

Common Tasks

TaskFile to Read
Get startedindex.mdx, basics.mdx
Define schemasapi.mdx (Primitives section)
Object validationapi.mdx (Objects section)
Array validationapi.mdx (Arrays section)
Union typesapi.mdx (Unions section)
Refinementsapi.mdx (Refinements section)
Transformsapi.mdx (Transforms section)
Error handlingerror-formatting.mdx, error-customization.mdx
Type inferenceapi.mdx (Type Inference section)
Async validationapi.mdx (Async section)
JSON Schemajson-schema.mdx
Custom errorserror-customization.mdx
Ecosystemecosystem.mdx

Schema Examples

Primitives:

z.string()
z.number()
z.boolean()
z.date()
z.undefined()
z.null()
z.any()
z.unknown()

Complex Types:

z.object({ ... })
z.array(z.string())
z.tuple([z.string(), z.number()])
z.union([z.string(), z.number()])
z.record(z.string())
z.map(z.string(), z.number())
z.set(z.string())

Refinements:

z.string().email()
z.string().url()
z.string().uuid()
z.number().min(5).max(10)
z.string().regex(/pattern/)

Transforms:

z.string().transform(val => val.toUpperCase())
z.coerce.number()

When to Use This Skill

  • Form validation in React/Next.js
  • API request/response validation
  • Environment variable parsing
  • Runtime type checking
  • Data transformation and parsing
  • Error message customization
  • Integration with tRPC, React Hook Form, etc.
  • TypeScript type inference from schemas

How to Navigate

  1. Start with index.mdx for introduction
  2. For basic usage: Read basics.mdx
  3. For API details: Check api.mdx (comprehensive reference)
  4. For error handling: See error-formatting.mdx and error-customization.mdx
  5. For advanced features: Browse codecs.mdx, json-schema.mdx, metadata.mdx
  6. For integrations: Check ecosystem.mdx
  7. For v4 features: See v4/ directory

All files are .mdx (Markdown + JSX) but readable as plain markdown.

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.

Web3

Drizzle ORM Complete Documentation

Complete Drizzle ORM documentation in markdown format. Use when working with Drizzle ORM - covers schema definition, queries, migrations, database connections (PostgreSQL, MySQL, SQLite), integrations (Neon, Supabase, PlanetScale, Cloudflare D1, Turso), column types, relations, transactions, and framework usage (Next.js, SvelteKit, Astro).

Registry SourceRecently Updated
52.3K
Profile unavailable
Web3

APITester Agent-Driven API Testing

Test API endpoints and document responses. Define tests in plain English, run them, get formatted results. Agent-driven Postman alternative.

Registry SourceRecently Updated
0189
Profile unavailable
Web3

Form

The Universal Morphological Standard (UMS). Defining the structural schemas, data ontologies, and interaction boundaries for autonomous entities and syntheti...

Registry SourceRecently Updated
097
Profile unavailable