This one helps you write Zod 4 validation schemas with correct syntax, which matters because v4 introduced breaking changes like moving email, uuid, and url from string methods to top-level validators. You get patterns for the usual suspects: form validation with React Hook Form, API request parsing, discriminated unions, and type-safe transforms. The migration examples are helpful if you're upgrading from v3, and the refinement patterns show how to handle cross-field validation without fighting the library. It covers error handling with the new error parameter syntax and includes safeParse patterns so you're not just throwing exceptions everywhere. Solid reference if you're tired of checking the docs for the hundredth time.
- skills.sh installs
- 1.3K
- GitHub stars
- 15.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add prowler-cloud/prowler --skill zod-4 --agent claude-codeInstalls into .claude/skills of the current project.
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();
Sponsors
Details
- Repository
- github.com/prowler-cloud/prowler
- Category
- Cloud & Infrastructure
- First seen
- May 16, 2026
