AgentSkillsCN

zod-docs

本地Zod文档参考。当被问及Zod模式验证、TypeScript类型推断、解析、错误处理、JSON Schema转换或模式组合时使用。

SKILL.md
--- frontmatter
name: zod-docs
description: Local Zod documentation reference. Use when asked about Zod schema validation, TypeScript type inference, parsing, error handling, JSON Schema conversion, or schema composition.

Zod Documentation

Zod is a TypeScript-first schema declaration and validation library with static type inference. It enables developers to define schemas that validate data at runtime while automatically inferring TypeScript types.

Quick Reference

FileTitleDescription
index.mdxIntroIntroduction to Zod - TypeScript-first schema validation library with static type inference
basics.mdxBasic usageBasic usage guide covering schema definition, parsing data, error handling, and type inference
api.mdxDefining schemasComplete API reference for all Zod schema types, methods, and validation features
codecs.mdxCodecsBidirectional transformations with encode and decode
ecosystem.mdxEcosystemOverview of the Zod ecosystem including integrations, tools, and community resources
error-customization.mdxCustomizing errorsGuide to customizing validation error messages and error handling patterns
error-formatting.mdxFormatting errorsUtilities for formatting and displaying Zod errors
json-schema.mdxJSON SchemaHow to convert Zod schemas to JSON Schema
library-authors.mdxFor library authorsGuidelines and best practices for library authors integrating with Zod
metadata.mdxMetadata and registriesAttaching and manipulating metadata on Zod schemas
packages/core.mdxZod CoreZod Core package - minimal core functionality for custom implementations
packages/mini.mdxZod MiniZod Mini - a tree-shakable Zod
packages/zod.mdxZodInternals and structure of the Zod library

When to use

Use this skill when the user asks about:

  • Zod schema validation
  • TypeScript type inference from schemas
  • Data parsing and validation
  • Error handling and custom error messages
  • JSON Schema conversion
  • Schema composition (merge, extend, pick, omit)
  • Codecs and bidirectional transformations
  • Zod Mini for smaller bundle sizes

How to find information

  1. Check the Quick Reference table above for the relevant file
  2. Read the file from references/{filename}