zod-llm-docs

Zod LLM Documentation

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 "zod-llm-docs" with this command: npx skills add 5dlabs/cto/5dlabs-cto-zod-llm-docs

Zod LLM Documentation

Zod provides comprehensive LLM-optimized documentation at https://zod.dev/llms.txt .

When to Use

Fetch this documentation when:

  • Defining TypeScript-first schemas for data validation

  • Working with Zod 4's new features (codecs, metadata, registries)

  • Converting schemas to/from JSON Schema

  • Customizing or formatting validation errors

  • Integrating with form libraries or API validation

  • Using Zod Mini for bundle size optimization

Key Topics Covered

  • Schema Types: Primitives, Objects, Arrays, Unions, Records, Tuples

  • String Validation: Email, UUID, URL, ISO datetime, IP addresses, JWT

  • Transformations: Refinements, Transforms, Pipes, Codecs

  • Error Handling: Custom errors, Formatting, Internationalization

  • Advanced: Recursive objects, Discriminated unions, Branded types

  • JSON Schema: Conversion, Metadata, Registries

Quick Reference

// Fetch Zod docs via Firecrawl const docs = await firecrawl.scrape({ url: "https://zod.dev/llms.txt", formats: ["markdown"] });

Common Schema Patterns

import { z } from "zod";

// Basic object schema const userSchema = z.object({ id: z.string().uuid(), email: z.string().email(), age: z.number().int().positive(), role: z.enum(["admin", "user"]), });

// Infer TypeScript type type User = z.infer<typeof userSchema>;

Zod 4 Features

Feature Description

Codecs Bidirectional encode/decode

Metadata Attach metadata to schemas

Registries Organize and reference schemas

Zod Mini Tree-shakable minimal build

JSON Schema Native conversion support

Related Skills

  • effect-patterns

  • Effect TypeScript (uses Zod-like Schema)

  • better-auth

  • Uses Zod for validation

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.

General

better-auth-expo

No summary provided by upstream source.

Repository SourceNeeds Review
General

expo-patterns

No summary provided by upstream source.

Repository SourceNeeds Review
General

remotion

No summary provided by upstream source.

Repository SourceNeeds Review