This is your runtime validation solution when you need TypeScript types and data validation in one place. Define a schema once with `z.object()` and friends, get automatic type inference with `z.infer`, and validate API payloads, form inputs, or environment variables at runtime. The `.safeParse()` method returns a result object instead of throwing, which keeps error handling clean. At 2kb gzipped with zero dependencies, it won't bloat your bundle. Note that this documents Zod 4.x, which has breaking changes from v3 around error customization and stricter number validation. Works especially well with tRPC, react-hook-form, and Prisma for end-to-end type safety.

skills.sh installs
663
GitHub stars
248
last updated
Aug 21, 2026

Install

$ npx -y skills add secondsky/claude-skills --skill zod --agent claude-code

Installs into .claude/skills of the current project.

Files

Zod: TypeScript-First Schema Validation

Overview

Zod is a TypeScript-first validation library that enables developers to define schemas for validating data at runtime while automatically inferring static TypeScript types. With zero dependencies and a compact core (~5kb gzipped; ~1.9kb for zod/mini), Zod provides immutable, composable validation with comprehensive error handling.

Installation

bun add zod
# or
npm install zod
# or
pnpm add zod
# or
yarn add zod

Requirements:

  • TypeScript v5.5+ with "strict": true in tsconfig.json
  • Zod 4.x (4.4.x recommended; z.codec() requires 4.1+)

Sponsors

Details

Repository
github.com/secondsky/claude-skills
Categories
Backend & APIs, Debugging
First seen
Jun 3, 2026

More from secondsky/claude-skills

All 146
1manutej avataraxum-web-frameworkmanutej/luxor-claude-marketplaceComplete guide for Axum web framework including routing, extractors, middleware, state management, error handling, and production deployment659skills.sh installs
2jackwener avataropencli-repairjackwener/opencliDiagnose and fix broken OpenCLI adapters when websites change. Use when an opencli command fails with SELECTOR, EMPTY_RESULT, API_ERROR, or PAGE_CHANGED errors.657skills.sh installs
3jsonwebtoken avatarjwt-encodejsonwebtoken/jwt-skillsCreate and sign JSON Web Tokens (JWTs) for testing and development. Use when the user wants to generate, create, build, or sign a JWT — e.g. "create a JWT", "ge640skills.sh installs
4mvanhorn avatarpp-firecrawlmvanhorn/printing-press-libraryPrinting Press CLI for Firecrawl. API for interacting with Firecrawl services to perform web scraping and crawling tasks.629skills.sh installs
5aj-geddes avatarfastapi-developmentaj-geddes/useful-ai-promptsBuild high-performance FastAPI applications with async routes, validation, dependency injection, security, and automatic API documentation. Use when developing 624skills.sh installs
6bytedance avatarbyted-web-searchbytedance/agentkit-samples火山引擎联网搜索 API,返回网页/图片结果。联网搜索场景优先使用本 skill。触发词包括:查/搜/找、真的吗/靠谱吗/确认/核实、最近/今天/最新/近期、出处/来源/链接、有什么/有哪些/推荐、价格/政策/汇率/行情、对比/区别/哪个好、听说/据说/不太确定、热搜/热门/火、帮我看/了解一下、求证/辟谣、值不值得/624skills.sh installs