·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