Zod 4 schema patterns with v3-to-v4 migration guidance for forms, request payloads, and adapters.
- CCM score
- 60 of 100
- skills.sh installs
- 1.3K
- GitHub stars
- 15.3K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers primitives, objects, arrays, records, unions, transformations, refinements, and optional/nullable handling
- Lists breaking changes from Zod 3, such as top-level
z.email(),z.uuid(),z.url(), the singleerrorparameter, andz.strictObject - Shows
superRefinecross-field checks usingcode: "custom"and React Hook Form integration viazodResolver - Points to UI schema locations in
ui/types/formSchemas.ts,ui/types/authFormSchema.ts, andui/types/integrations.ts
Install
$ npx -y skills add prowler-cloud/prowler --skill zod-4 -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Breaking Changes from Zod 3
// ❌ Zod 3 (OLD)
z.string().email()
z.string().uuid()
z.string().url()
z.string({ required_error: "Required", invalid_type_error: "Not a string" })
z.string().min(1, { message: "Required" })
schema.merge(other)
z.object({...}).strict()
z.ZodIssueCode.custom
// ✅ Zod 4 (NEW)
z.email()
z.uuid()
z.url()
z.string({ error: "Required" }) // single `error` param (string or function)
z.string().min(1, { error: "Required" }) // `message` still works but is deprecated
schema.extend(other.shape)
z.strictObject({...})
"custom" // issue code literal in ctx.addIssue
z.ZodIssueCode.custom still compiles in Zod 4 (deprecated) and is used in ui/types/formSchemas.ts and ui/types/integrations.ts; use code: "custom" in new code.
Prowler UI schemas live in ui/types/formSchemas.ts, ui/types/authFormSchema.ts, ui/types/integrations.ts and next to the feature that uses them.
Basic Schemas
import { z } from "zod";
// Primitives
const stringSchema = z.string();
const numberSchema = z.number();
const booleanSchema = z.boolean();
const dateSchema = z.date();
Details
- Repository
- github.com/prowler-cloud/prowler
- Categories
- Frontend & UI Code, Backend & APIs
- First seen
- May 16, 2026
More from prowler-cloud/prowler
All 6Similar to Zod 4
More Frontend & UI Codezod-validation-utilitiesSkillgiuseppe-trisciuoglio/developer-kit4.2K installsReusable Zod v4 schema patterns for type-safe validation of APIs, forms, and config with inferred types.
zodSkillanivar/zod-skill1.3K installsZod v4 and v3 schema validation skill that detects the version per file and applies matching rules.
react-hook-form-zodPluginsecondsky/claude-skills254 starsType-safe React forms with React Hook Form and Zod validation. Use for form schemas, field arrays, multi-step forms, or encountering validation errors, resolver
zod-schema-validationSkillmindrally/skills1.2K installsPractical Zod guidance for TypeScript schemas, type inference, parsing, forms, and API validation.
hono-validationSkillbobmatnyc/claude-mpm-skills438 installsType-safe request validation for Hono using Zod, TypeBox, Valibot, or any Standard Schema library.
valibotSkillopen-circle/agent-skills2.3K installsSchema validation skill for Valibot, covering pipelines, parsing, and Zod-to-Valibot API migration.