zod-v4 — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited zod-v4 (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Rule-first Zod v4.4.3 guidance for TypeScript. Start with the highest-risk matching rule, then load the linked reference only when deeper API detail is needed.
bun add zod@^4.4.3import { z } from "zod";
const User = z.object({
name: z.string().min(1, { error: "Required" }),
email: z.email({ error: "Invalid email" }),
});
type User = z.infer<typeof User>;| Task | Start Here |
|---|---|
| v3 migration or deprecated API cleanup | rules/_index.md, then references/migration-v3-to-v4.md |
| User input, env, HTTP, DB, queue, or JSON boundaries | parse-*, schema-*, and references/codecs-v4.md |
| Current schema APIs, string formats, records, template literals, XOR, defaults | references/schema-surface-v4.md |
| UI/API/CLI error messages | error-*, migrate-error-*, and references/errors-v4.md |
| Object composition, strictness, or refined schemas | object-* rules |
| JSON Schema/OpenAPI export | jsonschema-*, meta-*, and references/json-schema-v4.md |
| Bidirectional wire/internal transforms | codec-* and references/codecs-v4.md |
| React Hook Form, tRPC, Hono, or Next.js actions | references/ecosystem-*.md |
| Zod Mini, package exports, or library-author work | references/package-surfaces-v4.md |
| Repo audit before a migration | references/audit.md and scripts/zod-audit.ts |
safeParse for untrusted input, parseAsyncfor async refinements/transforms, and never trust JSON.parse output.
z.enum, z.objectplus z.strictObject or z.looseObject, unified { error }, top-level error formatters, and z.toJSONSchema.
one-arg z.record(valueSchema) are valid in Zod 4.4.3; treat them as local style or migration-advisory findings, not package-invalid code.
z.codec, z.decode,z.encode, and z.invertCodec for reversible wire/internal mappings.
from zod; bundle-sensitive app code can use zod/mini; schema tooling and library adapters should read references/package-surfaces-v4.md.
| Priority | Category | Prefix |
|---|---|---|
| 1 | Migration + deprecations | migrate- |
| 2 | Parsing + boundaries | parse- |
| 3 | Error handling | error- |
| 4 | Objects + composition | object- |
| 5 | Schema definitions | schema- |
| 6 | Metadata + registries | meta- |
| 7 | JSON Schema/OpenAPI | jsonschema- |
| 8 | Codecs | codec- |
| 9 | Package surfaces | package- |
Start with rules/_index.md. Each rule file has the failure mode, compact bad/good examples, and linked references when nuance matters.
Resolve skill_dir as the directory containing this skill before running bundled scripts.
Run the Zod-specific report-only scanner:
bun "$skill_dir/scripts/zod-audit.ts" --root . --format textUseful commands:
bun "$skill_dir/scripts/zod-audit.ts" --list-rules
bun "$skill_dir/scripts/zod-audit.ts" --list-checks
bun "$skill_dir/scripts/zod-audit.ts" --explain migrate-top-level-string-formatsUse --fail-on warn|error|info only after reviewing whether advisory rules are appropriate for the target repo.
Use the shared dependency-free scanner for broad AI-stack migration signals:
python3 "$skill_dir/scripts/ai_stack_scan.py" --root . --family zod-v4 --prettyTreat scanner output as private local evidence. Verify each signal against the current code and Zod docs/source before editing.
bun "$skill_dir/scripts/build-rules-index.ts"
bun "$skill_dir/scripts/check-skill-integrity.ts"Load a schema from a local module and exercise parse, decode/encode, or JSON Schema behavior:
bun "$skill_dir/scripts/zod-run.ts" --module src/schemas/user.ts --export User --mode safeParse --input '{"name":"A","email":"[email protected]"}'
bun "$skill_dir/scripts/zod-run.ts" --module src/schemas/date.ts --export IsoDate --mode encode --input '"2026-05-13T00:00:00.000Z"'
bun "$skill_dir/scripts/zod-run.ts" --module src/schemas/user.ts --export User --mode toJSONSchema --io input --target openapi-3.0zod-run.ts imports the target module, so avoid modules with heavy side effects.
references/index.mdreferences/migration-v3-to-v4.mdreferences/schema-surface-v4.mdreferences/errors-v4.md, references/error-formatting-v4.mdreferences/metadata-registries-v4.md, references/json-schema-v4.mdreferences/codecs-v4.mdreferences/package-surfaces-v4.mdreferences/ecosystem-react-hook-form.md, references/ecosystem-trpc.md, references/ecosystem-hono.md, references/ecosystem-nextjs-server-actions.mdreferences/audit.mdassets/templates/rule-template.md~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.