Zod

Zod is a skill for Claude Code, Codex from pledgeandgrow/pledge-skills. It costs 29 tokens per session (1,539 once invoked), scanned A, original, MIT.

A TypeScript library for defining schemas that check whether data has the expected shape and can infer matching TypeScript types.

In plain words
What is it for?
Use it to validate strings, objects, nested data, and API inputs, report errors, infer types, convert schemas to JSON Schema, or transform values.
Why use it?
It helps prevent invalid or unexpected data from moving through an application while keeping runtime checks aligned with TypeScript definitions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to validate strings, objects, nested data, and API inputs, report errors, infer types, convert schemas to JSON Schema, or transform values.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pledgeandgrow/pledge-skills/zod
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pledgeandgrow/pledge-skills --skill zod
Clone the repo
git clone --depth 1 https://github.com/pledgeandgrow/pledge-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Zod

README.md
[![agentmods](https://agentmods.dev/badge/skills/pledgeandgrow/pledge-skills/zod/github.svg)](https://agentmods.dev/skills/pledgeandgrow/pledge-skills/zod)
Your own site
<a href="https://agentmods.dev/skills/pledgeandgrow/pledge-skills/zod"><img src="https://agentmods.dev/badge/skills/pledgeandgrow/pledge-skills/zod/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Zod

Your own site · 80×15
<a href="https://agentmods.dev/skills/pledgeandgrow/pledge-skills/zod"><img src="https://agentmods.dev/badge/skills/pledgeandgrow/pledge-skills/zod.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,539 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.01539
Opus 5 $0.00015 $0.00770
Sonnet 5 $0.00006 $0.00308
Haiku 4.5 $0.00003 $0.00154

Measured 7d ago against content hash db6c2109c687, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

Zod scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/zod/SKILL.md · 202 lines

How it starts

The opening of the file, as written. The whole thing — 202 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Zod

TypeScript-first schema validation with static type inference.

Version: 4.x | Docs: https://zod.dev/ | npm: zod | Discord: https://discord.gg/RcG33DQJdf

Overview

Zod is a TypeScript-first validation library that lets you define schemas to validate data — from simple strings to complex nested objects. It provides static type inference, immutable APIs, zero external dependencies, and a tiny 2kb core bundle (gzipped).

Key Benefits

  • TypeScript-first: Full static type inference via z.infer<>
  • Zero dependencies: No external runtime dependencies
  • Tiny: 2kb core bundle (gzipped)
  • Immutable API: Methods return new instances
  • Works everywhere: Node.js and all modern browsers
  • Built-in JSON Schema conversion
  • Extensive ecosystem: tRPC, React Hook Form, Superforms, and more
  • Zod Mini: Tree-shakable variant for minimal bundle size
  • Codecs: Bidirectional transformations between schemas
  • Internationalization: Built-in locale support

File Index

File Topics
getting-started.md Installation, requirements, basic usage, parsing, error handling, type inference, ecosystem, migration from Zod 3 to 4
schemas.md Complete schema API: primitives, strings, string formats, numbers, dates, enums, objects, arrays, tuples, unions, intersections, records, maps, sets, refinements, transforms, pipes, defaults, branded types, readonly, JSON, functions, custom
errors-and-codecs.md Error customization, error maps, global errors, internationalization, locales, codecs, bidirectional transforms, useful codec implementations
packages-and-internals.md Zod Core, Zod Mini, library author guidelines, internal changes, versioning, subpaths

Quick Start

npm install zod
import * as z from "zod";

const User = z.object({
  name: z.string(),
  email: z.email(),
  age: z.number().int().positive(),
});

type User = z.infer<typeof User>;
// => { name: string; email: string; age: number }

const result = User.safeParse({ name: "Alice", email: "[email protected]", age: 30 });
if (result.success) {
  console.log(result.data); // typed as User
} else {
  console.log(result.error.issues); // ZodError issues
}

Read the full file on GitHub · 202 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 202 lines · 29 tokens per session scan A db6c2109c687

Subscribe to this mod's changes

Zod is a skill published in the GitHub repository pledgeandgrow/pledge-skills (10 stars, last pushed 1mo ago), licensed MIT. It adds 29 tokens to every session and 1,539 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

type-safety-validation

Achieve end-to-end type safety with Zod runtime validation, tRPC type-safe APIs, Prisma ORM, and TypeScript 5.7+ features. Build fully type-safe applications from database to UI for 2025+ development.

ArieGoldkin/ai-agent-hub · 53 tokens

hono-validation

Hono request validation with Zod, TypeBox, Valibot - type-safe input validation for JSON, forms, query params, and headers.

bobmatnyc/claude-mpm-skills · 33 tokens

zod

Zod v4 best practices, patterns, and API guidance for schema validation, parsing, error handling, and type inference in TypeScript applications. Covers safeParse, object composition, refinements, transforms, codecs, branded types, v3→v4 migration, and testing schemas with Jest or Vitest. Baseline: zod ^4.3.0. Triggers…

anivar/zod-skill · 138 tokens

adapter-express

Mount tRPC as Express middleware with createExpressMiddleware() from @trpc/server/adapters/express. Access Express req/res in createContext via CreateExpressContextOptions. Mount at a path prefix like app.use('/trpc', ...). Avoid global express.json() conflicting with tRPC body parsing for FormData.

trpc/trpc · 67 tokens

trpc-router

Entry point for all tRPC skills. Decision tree routing by task: initTRPC.create(), t.router(), t.procedure, createTRPCClient, adapters, subscriptions, React Query, Next.js, links, middleware, validators, error handling, caching, FormData.

trpc/trpc · 59 tokens

stripe-projects

Use after E2B sandbox/API access has been provisioned through Stripe Projects and the user needs to use the resulting E2B API key with the E2B CLI, JavaScript SDK, Python SDK, or Code Interpreter SDK.

e2b-dev/E2B · 51 tokens