·designing-zod-schemas
</>

designing-zod-schemas

saleor/configurator

按照 Zod 优先开发设计 Zod 模式。创建验证模式、品牌类型、可区分联合和转换。从模式推断 TypeScript 类型。触发条件:Zod 模式、z.object、z.infer、验证、品牌类型、可区分联合、safeParse、细化。

13安装·1热度·@saleor

安装

$npx skills add https://github.com/saleor/configurator --skill designing-zod-schemas

SKILL.md

Guide the design and implementation of Zod schemas following the project's Zod-first development approach, where schemas are defined before implementing business logic.

| Basic validation | Primitives | z.string().min(1) | | Domain safety | Branded types | transform((v) => v as EntitySlug) | | Multiple types | Discriminated union | z.discriminatedUnion('type', [...]) | | Cross-field rules | Refinement | .refine((data) => ...) | | Data normalization | Transform | .transform((v) => v.trim()) |

| Schema defined | No TS errors | npx tsc --noEmit | | Types inferred | z.infer works | Check type in IDE | | Validation works | safeParse tests | pnpm test |

按照 Zod 优先开发设计 Zod 模式。创建验证模式、品牌类型、可区分联合和转换。从模式推断 TypeScript 类型。触发条件:Zod 模式、z.object、z.infer、验证、品牌类型、可区分联合、safeParse、细化。 来源:saleor/configurator。

查看原文

可引用信息

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

安装命令
npx skills add https://github.com/saleor/configurator --skill designing-zod-schemas
分类
</>开发工具
认证
收录时间
2026-02-01
更新时间
2026-02-18

快速解答

什么是 designing-zod-schemas?

按照 Zod 优先开发设计 Zod 模式。创建验证模式、品牌类型、可区分联合和转换。从模式推断 TypeScript 类型。触发条件:Zod 模式、z.object、z.infer、验证、品牌类型、可区分联合、safeParse、细化。 来源:saleor/configurator。

如何安装 designing-zod-schemas?

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

这个 Skill 的源码在哪?

https://github.com/saleor/configurator