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-code

Installs 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

More from prowler-cloud/prowler

All 6
1vercel-labs avatarsveltevercel-labs/json-renderSvelte 5 renderer for json-render that turns JSON specs into Svelte component trees. Use when working with @json-render/svelte, building Svelte UIs from JSON, c1.2Kskills.sh installs
2vercel-labs avatarshadcn-sveltevercel-labs/json-renderPre-built shadcn-svelte components for json-render Svelte apps. Use when working with @json-render/shadcn-svelte, adding standard UI components to a Svelte cata1.2Kskills.sh installs
3vercel-labs avatarreduxvercel-labs/json-renderRedux adapter for json-render's StateStore interface. Use when integrating json-render with Redux or Redux Toolkit for state management via @json-render/redux.1.1Kskills.sh installs
4vercel-labs avatarjotaivercel-labs/json-renderJotai adapter for json-render's StateStore interface. Use when integrating json-render with Jotai for state management via @json-render/jotai.1.1Kskills.sh installs
5vercel-labs avatarxstatevercel-labs/json-renderXState Store adapter for json-render's StateStore interface. Use when integrating json-render with @xstate/store for state management via @json-render/xstate.1.1Kskills.sh installs
6vercel-labs avatarsolidvercel-labs/json-renderSolidJS renderer for json-render. Use when building @json-render/solid catalogs/registries, wiring Renderer providers, implementing bindings/actions, or trouble1.1Kskills.sh installs