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

À propos de ce Skill

Scenario recommande : Ideal for AI agents that need breaking changes from zod 3. Resume localise : 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.

Fonctionnalités

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

# Core Topics

JoseCortezz25 JoseCortezz25
[0]
[0]
Updated: 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

Scenario recommande : Ideal for AI agents that need breaking changes from zod 3. Resume localise : 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.

Pourquoi utiliser cette compétence

Recommandation : 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

Meilleur pour

Scenario recommande : Ideal for AI agents that need breaking changes from zod 3.

Cas d'utilisation exploitables for zod-4

Cas d'usage : Applying Breaking Changes from Zod 3
Cas d'usage : Applying z.string().email();
Cas d'usage : Applying z.string().uuid();

! Sécurité et Limitations

  • Limitation : message: 'Must contain uppercase letter'
  • Limitation : message: 'Must contain number'
  • Limitation : 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.

After The Review

Decide The Next Action Before You Keep Reading Repository Material

Killer-Skills should not stop at opening repository instructions. It should help you decide whether to install this skill, when to cross-check against trusted collections, and when to move into workflow rollout.

Labs 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 & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is zod-4?

Scenario recommande : Ideal for AI agents that need breaking changes from zod 3. Resume localise : 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.

How do I install zod-4?

Run the command: npx killer-skills add JoseCortezz25/template-starter-nextjs/zod-4. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for zod-4?

Key use cases include: Cas d'usage : Applying Breaking Changes from Zod 3, Cas d'usage : Applying z.string().email();, Cas d'usage : Applying z.string().uuid();.

Which IDEs are compatible with zod-4?

This skill is compatible with 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. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for zod-4?

Limitation : message: 'Must contain uppercase letter'. Limitation : message: 'Must contain number'. Limitation : Requires repository-specific context from the skill documentation.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add JoseCortezz25/template-starter-nextjs/zod-4. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use zod-4 immediately in the current project.

! Reference-Only Mode

This page remains useful for installation and reference, but Killer-Skills no longer treats it as a primary indexable landing page. Read the review above before relying on the upstream repository instructions.

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

Install zod-4, an AI agent skill for AI agent workflows and automation. Review the use cases, limitations, and setup path before rollout.

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

Compétences associées

Looking for an alternative to zod-4 or another community skill for your workflow? Explore these related open-source skills.

Voir tout

openclaw-release-maintainer

Logo of openclaw
openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

widget-generator

Logo of f
f

Générez des plugins de widgets personnalisables pour le système de flux prompts.chat

flags

Logo of vercel
vercel

Le Cadre de Réaction

138.4k
0
Navigateur

pr-review

Logo of pytorch
pytorch

Tenseurs et réseaux neuronaux dynamiques en Python avec une forte accélération GPU

98.6k
0
Développeur