zod-4 — for Claude Code template-starter-nextjs, community, for Claude Code, ide skills, claude-code, nextjs, shadcn-ui, tailwindcss, ## Basic Schemas, ## Object Schemas

v1.0

关于此技能

适用场景: Ideal for AI agents that need breaking changes from zod 3. 本地化技能摘要: A production-ready Next.js 15 starter template with TypeScript, Tailwind CSS v4, shadcn/ui, and modern architecture patterns. It covers ai, claude-code, nextjs workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

功能特性

Breaking Changes from Zod 3
z.string().email();
z.string().uuid();
z.string().nonempty();
z.object({ name: z.string() }).required error('Required');

# 核心主题

JoseCortezz25 JoseCortezz25
[0]
[0]
更新于: 4/19/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 10/11

This page remains useful for teams, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution Quality floor passed for review
Review Score
10/11
Quality Score
51
Canonical Locale
en
Detected Body Locale
en

适用场景: Ideal for AI agents that need breaking changes from zod 3. 本地化技能摘要: A production-ready Next.js 15 starter template with TypeScript, Tailwind CSS v4, shadcn/ui, and modern architecture patterns. It covers ai, claude-code, nextjs workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

核心价值

推荐说明: zod-4 helps agents breaking changes from zod 3. A production-ready Next.js 15 starter template with TypeScript, Tailwind CSS v4, shadcn/ui, and modern architecture patterns. This AI agent skill supports Claude

适用 Agent 类型

适用场景: Ideal for AI agents that need breaking changes from zod 3.

赋予的主要能力 · zod-4

适用任务: Applying Breaking Changes from Zod 3
适用任务: Applying z.string().email();
适用任务: Applying z.string().uuid();

! 使用限制与门槛

  • 限制说明: message: 'Must contain uppercase letter'
  • 限制说明: message: 'Must contain number'
  • 限制说明: Requires repository-specific context from the skill documentation

Why this page is reference-only

  • - Current locale does not satisfy the locale-governance contract.

Source Boundary

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

评审后的下一步

先决定动作,再继续看上游仓库材料

Killer-Skills 的主价值不应该停在“帮你打开仓库说明”,而是先帮你判断这项技能是否值得安装、是否应该回到可信集合复核,以及是否已经进入工作流落地阶段。

实验室 Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

常见问题与安装步骤

以下问题与步骤与页面结构化数据保持一致,便于搜索引擎理解页面内容。

? FAQ

zod-4 是什么?

适用场景: Ideal for AI agents that need breaking changes from zod 3. 本地化技能摘要: A production-ready Next.js 15 starter template with TypeScript, Tailwind CSS v4, shadcn/ui, and modern architecture patterns. It covers ai, claude-code, nextjs workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

如何安装 zod-4?

运行命令:npx killer-skills add JoseCortezz25/template-starter-nextjs/zod-4。支持 Cursor、Windsurf、VS Code、Claude Code 等 19+ IDE/Agent。

zod-4 适用于哪些场景?

典型场景包括:适用任务: Applying Breaking Changes from Zod 3、适用任务: Applying z.string().email();、适用任务: Applying z.string().uuid();。

zod-4 支持哪些 IDE 或 Agent?

该技能兼容 Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer。可使用 Killer-Skills CLI 一条命令通用安装。

zod-4 有哪些限制?

限制说明: message: 'Must contain uppercase letter';限制说明: message: 'Must contain number';限制说明: Requires repository-specific context from the skill documentation。

安装步骤

  1. 1. 打开终端

    在你的项目目录中打开终端或命令行。

  2. 2. 执行安装命令

    运行:npx killer-skills add JoseCortezz25/template-starter-nextjs/zod-4。CLI 会自动识别 IDE 或 AI Agent 并完成配置。

  3. 3. 开始使用技能

    zod-4 已启用,可立即在当前项目中调用。

! 参考页模式

此页面仍可作为安装与查阅参考,但 Killer-Skills 不再把它视为主要可索引落地页。请优先阅读上方评审结论,再决定是否继续查看上游仓库说明。

Upstream Repository Material

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

Upstream Source

zod-4

安装 zod-4,这是一款面向AI agent workflows and automation的 AI Agent Skill。查看评审结论、使用场景与安装路径。

SKILL.md
Readonly
Upstream Repository Material
The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.
Supporting Evidence

Breaking Changes from Zod 3

typescript
1// ❌ Zod 3 (OLD) 2z.string().email(); 3z.string().uuid(); 4z.string().url(); 5z.string().nonempty(); 6z.object({ name: z.string() }).required_error('Required'); 7 8// ✅ Zod 4 (NEW) 9z.email(); 10z.uuid(); 11z.url(); 12z.string().min(1); 13z.object({ name: z.string() }, { error: 'Required' });

Basic Schemas

typescript
1import { z } from 'zod'; 2 3// Primitives 4const stringSchema = z.string(); 5const numberSchema = z.number(); 6const booleanSchema = z.boolean(); 7const dateSchema = z.date(); 8 9// Top-level validators (Zod 4) 10const emailSchema = z.email(); 11const uuidSchema = z.uuid(); 12const urlSchema = z.url(); 13 14// With constraints 15const nameSchema = z.string().min(1).max(100); 16const ageSchema = z.number().int().positive().max(150); 17const priceSchema = z.number().min(0).multipleOf(0.01);

Object Schemas

typescript
1const userSchema = z.object({ 2 id: z.uuid(), 3 email: z.email({ error: 'Invalid email address' }), 4 name: z.string().min(1, { error: 'Name is required' }), 5 age: z.number().int().positive().optional(), 6 role: z.enum(['admin', 'user', 'guest']), 7 metadata: z.record(z.string(), z.unknown()).optional() 8}); 9 10type User = z.infer<typeof userSchema>; 11 12// Parsing 13const user = userSchema.parse(data); // Throws on error 14const result = userSchema.safeParse(data); // Returns { success, data/error } 15 16if (result.success) { 17 console.log(result.data); 18} else { 19 console.log(result.error.issues); 20}

Arrays and Records

typescript
1// Arrays 2const tagsSchema = z.array(z.string()).min(1).max(10); 3const numbersSchema = z.array(z.number()).nonempty(); 4 5// Records (objects with dynamic keys) 6const scoresSchema = z.record(z.string(), z.number()); 7// { [key: string]: number } 8 9// Tuples 10const coordinatesSchema = z.tuple([z.number(), z.number()]); 11// [number, number]

Unions and Discriminated Unions

typescript
1// Simple union 2const stringOrNumber = z.union([z.string(), z.number()]); 3 4// Discriminated union (more efficient) 5const resultSchema = z.discriminatedUnion('status', [ 6 z.object({ status: z.literal('success'), data: z.unknown() }), 7 z.object({ status: z.literal('error'), error: z.string() }) 8]);

Transformations

typescript
1// Transform during parsing 2const lowercaseEmail = z.email().transform(email => email.toLowerCase()); 3 4// Coercion (convert types) 5const numberFromString = z.coerce.number(); // "42" → 42 6const dateFromString = z.coerce.date(); // "2024-01-01" → Date 7 8// Preprocessing 9const trimmedString = z.preprocess( 10 val => (typeof val === 'string' ? val.trim() : val), 11 z.string() 12);

Refinements

typescript
1const passwordSchema = z 2 .string() 3 .min(8) 4 .refine(val => /[A-Z]/.test(val), { 5 message: 'Must contain uppercase letter' 6 }) 7 .refine(val => /[0-9]/.test(val), { 8 message: 'Must contain number' 9 }); 10 11// With superRefine for multiple errors 12const formSchema = z 13 .object({ 14 password: z.string(), 15 confirmPassword: z.string() 16 }) 17 .superRefine((data, ctx) => { 18 if (data.password !== data.confirmPassword) { 19 ctx.addIssue({ 20 code: z.ZodIssueCode.custom, 21 message: "Passwords don't match", 22 path: ['confirmPassword'] 23 }); 24 } 25 });

Optional and Nullable

typescript
1// Optional (T | undefined) 2z.string().optional(); 3 4// Nullable (T | null) 5z.string().nullable(); 6 7// Both (T | null | undefined) 8z.string().nullish(); 9 10// Default values 11z.string().default('unknown'); 12z.number().default(() => Math.random());

Error Handling

typescript
1// Zod 4: Use 'error' param instead of 'message' 2const schema = z.object({ 3 name: z.string({ error: 'Name must be a string' }), 4 email: z.email({ error: 'Invalid email format' }), 5 age: z.number().min(18, { error: 'Must be 18 or older' }) 6}); 7 8// Custom error map 9const customSchema = z.string({ 10 error: issue => { 11 if (issue.code === 'too_small') { 12 return 'String is too short'; 13 } 14 return 'Invalid string'; 15 } 16});

React Hook Form Integration

typescript
1import { useForm } from "react-hook-form"; 2import { zodResolver } from "@hookform/resolvers/zod"; 3 4const schema = z.object({ 5 email: z.email(), 6 password: z.string().min(8), 7}); 8 9type FormData = z.infer<typeof schema>; 10 11function Form() { 12 const { register, handleSubmit, formState: { errors } } = useForm<FormData>({ 13 resolver: zodResolver(schema), 14 }); 15 16 return ( 17 <form onSubmit={handleSubmit(onSubmit)}> 18 <input {...register("email")} /> 19 {errors.email && <span>{errors.email.message}</span>} 20 </form> 21 ); 22}

Keywords

zod, validation, schema, typescript, forms, parsing

相关技能

寻找 zod-4 的替代方案 (Alternative) 或可搭配使用的同类 community Skill?探索以下相关开源技能。

查看全部

openclaw-release-maintainer

Logo of openclaw
openclaw

本地化技能摘要: 🦞 # OpenClaw Release Maintainer Use this skill for release and publish-time workflow. It covers ai, assistant, crustacean workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

333.8k
0
AI

widget-generator

Logo of f
f

本地化技能摘要: Generate customizable widget plugins for the prompts.chat feed system # Widget Generator Skill This skill guides creation of widget plugins for prompts.chat . It covers ai, artificial-intelligence, awesome-list workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf

149.6k
0
AI

flags

Logo of vercel
vercel

本地化技能摘要: The React Framework # Feature Flags Use this skill when adding or changing framework feature flags in Next.js internals. It covers blog, browser, compiler workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

138.4k
0
浏览器

pr-review

Logo of pytorch
pytorch

本地化技能摘要: Usage Modes No Argument If the user invokes /pr-review with no arguments, do not perform a review . It covers autograd, deep-learning, gpu workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

98.6k
0
开发者工具