zod-best-practices
Zod Best Practices
Use this skill for core Zod authoring, review, migration, and explanation. Prefer modern APIs from the official docs, call out legacy or deprecated patterns explicitly, and keep recommendations practical enough to apply directly in real TypeScript codebases.
Use This Skill When
- Writing new Zod schemas for TypeScript applications
- Reviewing an existing Zod schema for correctness, maintainability, or migration issues
- Modernizing older Zod code to current patterns
- Choosing parsing, error customization, or error formatting APIs
- Reasoning about type inference, advanced schemas, coercion, transforms, checks, or Zod Mini tradeoffs
Out Of Scope
- Framework-specific integration patterns where the main problem is the library wiring, not the Zod schema itself
- OpenAPI generation or client-generation workflows
- ORM, router, or UI library specifics unless the question is still primarily about the Zod schema design
Working Style
More from mkgp-dev/codex-skills
tanstack-query-best-practices
Best-practice guidance for designing, reviewing, debugging, and modernizing TanStack Query v5 usage across React, Preact, Solid, Vue, Svelte, and Angular. Use this skill whenever the user is working with TanStack Query or React Query, `QueryClient` setup, `useQuery`, `useMutation`, `useInfiniteQuery`, query keys, invalidation, optimistic updates, prefetching, hydration, cache tuning, stale UI, or server-state boundaries and needs current guidance instead of stale v4-era patterns.
9tanstack-router-best-practices
Best-practice guidance for designing, reviewing, debugging, and modernizing TanStack Router routing in React apps, especially file-based route trees, `Link` and `useNavigate`, `validateSearch`, `beforeLoad`, loaders, `notFoundComponent`, auth guards, code splitting, and TanStack Query integration. Use this whenever the user is working with `@tanstack/react-router`, TanStack Start routing, route organization, URL state, or navigation behavior and needs current v1 guidance instead of stale class-based or React Router patterns.
8zustand-state-management
Best-practice guidance for designing, reviewing, and modernizing Zustand state in modern TypeScript React apps. Use this skill whenever the user is writing or reviewing `create`, `createStore`, `useStore`, `useShallow`, `persist`, `devtools`, `subscribeWithSelector`, `createWithEqualityFn`, slices, Next.js store setup, hydration behavior, or selector-related rerender problems in Zustand v5 code.
7changelog-maintenance
Best-practice guidance for creating, reviewing, and maintaining high-signal `CHANGELOG.md` entries for versioned software projects. Use this skill whenever the user wants to add or rewrite changelog entries, organize release history, turn completed work into structured version notes, decide what belongs in `Added`/`Changed`/`Fixed`/`Deprecated`/`Removed`/`Security`, or improve noisy release notes into maintainable repository changelogs.
7shadcn-ui-best-practices
Best-practice guidance for authoring, reviewing, debugging, and modernizing shadcn/ui usage in React applications. Use this skill whenever the user is working with shadcn/ui components, `components.json`, Dialog or Sheet flows, Field or FieldGroup forms, semantic tokens, theming, Tailwind v4 integration, or wants to replace ad hoc Tailwind-heavy UI with maintainable component-first patterns.
2react-hook-form-with-zod
Best-practice guidance for building forms with React Hook Form in modern TypeScript React apps, with Zod integration when schema validation is useful. Use this skill whenever the user is writing or reviewing `useForm`, `register`, `useController`, `Controller`, `useFieldArray`, `useWatch`, `useFormState`, `FormProvider`, `useFormContext`, `defaultValues`, `setValue`, `reset`, `trigger`, `setError`, or accessible React Hook Form validation flows, including cases where Zod and `zodResolver` should be added or modernized.
1