Zod v3 Documentation
Zod is a TypeScript-first schema declaration and validation library — declare a
validator once and Zod infers the static type. This package covers v3 only
(final release 3.25.76, July 2025; v3 is frozen).
If the user is on Zod 4, use olore-zod-latest instead. The v4 API differs
substantially — error customization, z.treeifyError, codecs, z.toJSONSchema,
and z.compile are all v4-only, and several v3 methods were renamed or removed.
Quick Reference
| File |
Title |
Description |
contents/home.md |
Main documentation |
The whole v3 API in one file — primitives, objects, arrays, unions, records, recursive types, refinements, transforms, and every schema method |
contents/ERROR_HANDLING.md |
Error handling |
ZodError / ZodIssue structure, issue codes, error maps, formatting |
contents/MIGRATION.md |
Migration guide |
Zod 1 → 2 and 2 → 3 upgrade steps and breaking changes |
When to use
Use this skill when the user asks about:
- Zod 3 schema definition and composition, and is explicitly on v3
.parse() / .safeParse() and v3 parsing behaviour
- v3 type inference (
z.infer, z.input, z.output)
.refine(), .superRefine(), .transform(), .preprocess() in v3
ZodError, ZodIssue, issue codes, and custom error maps in v3
- Migrating from Zod 1 or 2 up to Zod 3
- Confirming whether an API exists in v3 vs v4
How to find information
contents/home.md answers most questions — it is the full v3 reference; search
within it rather than reading it whole
- Error-related questions go to
contents/ERROR_HANDLING.md
- For a Zod 3 → Zod 4 migration, switch to the
olore-zod-latest skill and read
its v4/changelog.mdx
1---2name: olore-zod-33description: Local Zod v3 documentation reference (final v3 release, 3.25.76). Use for Zod 3 schema definition, parsing, TypeScript type inference, refinements and transforms, ZodError handling and error maps, and migrating from Zod 1/2 to 3. For Zod 4 use olore-zod-latest instead.4metadata:5 source: https://skillmd.com/skills/olorehq/olore-zod-36---78# Zod v3 Documentation910Zod is a TypeScript-first schema declaration and validation library — declare a11validator once and Zod infers the static type. This package covers **v3 only**12(final release 3.25.76, July 2025; v3 is frozen).1314**If the user is on Zod 4, use `olore-zod-latest` instead.** The v4 API differs15substantially — error customization, `z.treeifyError`, codecs, `z.toJSONSchema`,16and `z.compile` are all v4-only, and several v3 methods were renamed or removed.1718## Quick Reference1920| File | Title | Description |21|------|-------|-------------|22| `contents/home.md` | Main documentation | The whole v3 API in one file — primitives, objects, arrays, unions, records, recursive types, refinements, transforms, and every schema method |23| `contents/ERROR_HANDLING.md` | Error handling | `ZodError` / `ZodIssue` structure, issue codes, error maps, formatting |24| `contents/MIGRATION.md` | Migration guide | Zod 1 → 2 and 2 → 3 upgrade steps and breaking changes |2526## When to use2728Use this skill when the user asks about:29- Zod 3 schema definition and composition, and is explicitly on v330- `.parse()` / `.safeParse()` and v3 parsing behaviour31- v3 type inference (`z.infer`, `z.input`, `z.output`)32- `.refine()`, `.superRefine()`, `.transform()`, `.preprocess()` in v333- `ZodError`, `ZodIssue`, issue codes, and custom error maps in v334- Migrating from Zod 1 or 2 up to Zod 335- Confirming whether an API exists in v3 vs v43637## How to find information38391. `contents/home.md` answers most questions — it is the full v3 reference; search40 within it rather than reading it whole412. Error-related questions go to `contents/ERROR_HANDLING.md`423. For a Zod 3 → Zod 4 migration, switch to the `olore-zod-latest` skill and read43 its `v4/changelog.mdx`