Best-practice rules for Zod schema definition, safe parsing, type inference, and error handling in TypeScript.
- skills.sh installs
- 7.3K
- GitHub stars
- 227
- last updated
- Aug 21, 2026
What it does
- Covers schema definition, parsing and validation, type inference, error handling, object schemas, composition, refinements, and performance across 43 rules
- Includes category-level references and per-rule files such as
references/{prefix}-{slug}.md, plus a compiledAGENTS.mddocument - Guides choosing
safeParse()for user input,z.inferover manual types, andz.unknown()instead ofz.any()for type safety - Excludes React Hook Form integration and OpenAPI client generation, which are handled by the
react-hook-formandorvalskills
Install
$ npx -y skills add pproenca/dot-skills --skill zod -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Zod Best Practices
Comprehensive schema validation guide for Zod in TypeScript applications. Contains 43 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.
When to Apply
Reference these guidelines when:
- Writing new Zod schemas
- Choosing between parse() and safeParse()
- Implementing type inference with z.infer
- Handling validation errors for user feedback
- Composing complex object schemas
- Using refinements and transforms
- Optimizing bundle size and validation performance
- Reviewing Zod code for best practices
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Schema Definition | CRITICAL | schema- |
| 2 | Parsing & Validation | CRITICAL | parse- |
| 3 | Type Inference | HIGH | type- |
| 4 | Error Handling | HIGH | error- |
| 5 | Object Schemas | MEDIUM-HIGH | object- |
| 6 | Schema Composition | MEDIUM | compose- |
| 7 | Refinements & Transforms | MEDIUM | refine- |
| 8 | Performance & Bundle | LOW-MEDIUM | perf- |
Quick Reference
1. Schema Definition (CRITICAL)
Details
- Repository
- github.com/pproenca/dot-skills
- Categories
- Frontend & UI Code, Backend & APIs
More from pproenca/dot-skills
All 100- React Hook Form3.1K
- Emilkowal Animations2.8K
- Nuqs2.4K
- Clean Architecture2.1K
- Typescript1.8K
- Code Simplifier1.6K
- Expo React Native Performance1.5K
- Nextjs1.2K
- Playwright1.2K
- Framer Motion1.2K
- Wxt Browser Extensions1.1K
- Tanstack Query983
- Msw910
- Clean Code869
- Terminal Ui866
- Ui Design836
- Typescript Refactor807
- React Refactor800
- Shadcn741
- Chrome Extension Ui739
- Chrome Extension735
- Shell713
- Tailwind665
- Refactor661
Similar to Zod
More Frontend & UI Code
orvalpproenca/dot-skills346 installsBest-practice rule set for generating type-safe TypeScript API clients from OpenAPI specs with Orval.
typescript-best-practicesalleneubank/claude-code2.9K installsType-first TypeScript idioms covering discriminated unions, branded types, Zod runtime validation, and type-fest utilities.
mastering-typescriptspillwavesolutions/mastering-typescript-skill813 installsComprehensive TypeScript 5.9+ guide covering generics, mapped types, Zod validation, and React, NestJS, and LangChain.js integration.
typescript-refactorpproenca/dot-skills807 installsType-safety and modernization guide for TypeScript and TSX refactoring, current to TypeScript 6.0 and React 19.
safe-action-validation-errorsnext-safe-action/skills1.2K installsGuide for validation errors in next-safe-action, covering schema and manual field-level and form-level errors.
