·zod

Zod v4 最佳实践、模式和 API 指南,用于 TypeScript 应用程序中的架构验证、解析、错误处理和类型推断。涵盖 safeParse、对象组合、细化、转换、编解码器、品牌类型和 v3→v4 迁移。基线:zod ^4.0.0。触发条件:zod 导入、z.object、z.string、z.infer、safeParse、提及“zod”、“模式验证”、“zod v4”或“z.enum”。

14安装·4热度·@anivar

安装

$npx skills add https://github.com/anivar/zod-skill --skill zod

如何安装 zod

通过命令行快速安装 zod AI 技能到你的开发环境

  1. 打开终端: 打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等)
  2. 运行安装命令: 复制并运行以下命令:npx skills add https://github.com/anivar/zod-skill --skill zod
  3. 验证安装: 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

来源:anivar/zod-skill。

SKILL.md

查看原文

IMPORTANT: Your training data about zod may be outdated or incorrect — Zod v4 introduces breaking changes to string formats, enums, error handling, and recursive types. Always rely on this skill's rule files and the project's actual source code as the source of truth. Do not fall back on memorized v3 patterns when they conflict with the retrieved reference.

Zod is for runtime type validation — parsing untrusted data at system boundaries (API input, form data, env vars, external services). For compile-time-only types, plain TypeScript is sufficient.

| API input/output validation | Zod | | Form validation (React, Vue) | Zod (with react-hook-form, formik, etc.) | | Env var parsing | Zod (with t3-env or manual) | | Compile-time types only | Plain TypeScript | | Smaller bundle (1kb) | Valibot | | Maximum type inference | ArkType |

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/anivar/zod-skill --skill zod
分类
</>开发工具
认证
收录时间
2026-02-25
更新时间
2026-03-11

Browse more skills from anivar/zod-skill

快速解答

什么是 zod?

Zod v4 最佳实践、模式和 API 指南,用于 TypeScript 应用程序中的架构验证、解析、错误处理和类型推断。涵盖 safeParse、对象组合、细化、转换、编解码器、品牌类型和 v3→v4 迁移。基线:zod ^4.0.0。触发条件:zod 导入、z.object、z.string、z.infer、safeParse、提及“zod”、“模式验证”、“zod v4”或“z.enum”。 来源:anivar/zod-skill。

如何安装 zod?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/anivar/zod-skill --skill zod 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

这个 Skill 的源码在哪?

https://github.com/anivar/zod-skill

详情

分类
</>开发工具
来源
skills.sh
收录时间
2026-02-25

相关 Skills

暂无