zod-validation

zod-validation is a skill for Claude Code, Codex from hoangatg/ai-agent-toolkit. It costs 34 tokens per session (332 once invoked), scanned A, original, MIT.

A TypeScript guide for checking data at runtime with Zod schemas, which describe the shape and rules data must follow.

In plain words
What is it for?
Use it to validate requests, forms, JSON or YAML configuration, environment variables, and tRPC inputs and outputs.
Why use it?
It catches invalid API inputs, form values, configuration, and environment variables even when data comes from outside the program.

Skill for Claude CodeCodex

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

Good fit Use it to validate requests, forms, JSON or YAML configuration, environment variables, and tRPC inputs and outputs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hoangatg/ai-agent-toolkit/zod-validation
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 hoangatg/ai-agent-toolkit --skill zod-validation
Clone the repo
git clone --depth 1 https://github.com/hoangatg/ai-agent-toolkit

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-validation

README.md
[![agentmods](https://agentmods.dev/badge/skills/hoangatg/ai-agent-toolkit/zod-validation.svg)](https://agentmods.dev/skills/hoangatg/ai-agent-toolkit/zod-validation)
Your own site
<a href="https://agentmods.dev/skills/hoangatg/ai-agent-toolkit/zod-validation"><img src="https://agentmods.dev/badge/skills/hoangatg/ai-agent-toolkit/zod-validation.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 332 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.00034 $0.00332
Opus 5 $0.00017 $0.00166
Sonnet 5 $0.00007 $0.00066
Haiku 4.5 $0.00003 $0.00033

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

Security

Grade A, and why

zod-validation 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 4d 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.

.agent/skills/zod-validation/SKILL.md · 54 lines

What it actually says

Zod Validation

TypeScript-first schema validation with static type inference.

Core Patterns

import { z } from 'zod'

// Schema definition
const UserSchema = z.object({
  name: z.string().min(2).max(100),
  email: z.string().email(),
  age: z.number().int().positive().optional(),
  role: z.enum(['admin', 'user', 'editor']),
})

// Type inference
type User = z.infer<typeof UserSchema>

// Validation
const result = UserSchema.safeParse(data)
if (result.success) {
  // result.data is typed as User
}

Use Cases

Use Case Pattern
API validation Validate request body/params
Form validation React Hook Form + Zod
Environment vars z.object({ PORT: z.coerce.number() })
Config files Validate JSON/YAML configs
tRPC Input/output validation

Integration with Frameworks

Framework Integration
React Hook Form @hookform/resolvers/zod
Next.js Server Actions validation
tRPC Input/output schemas
Express Middleware validation
Hono @hono/zod-validator
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. 4d ago First seen · 54 lines · 34 tokens per session scan A 7b35e02ef72b

Subscribe to this mod's changes

zod-validation is a skill published in the GitHub repository hoangatg/ai-agent-toolkit (1 stars, last pushed 5mo ago), licensed MIT. It adds 34 tokens to every session and 332 once invoked, about $0.0002 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

springboot-patterns

Spring Boot architecture patterns, REST API design, layered services, data access, caching, async processing, and logging. Use for Java Spring Boot backend work.

deepelementlab/jupyter-studio · 36 tokens

coding-standards

Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.

deepelementlab/jupyter-studio · 28 tokens

nestjs

Use when building or structuring a NestJS backend — feature modules, providers and DI wiring, provider scopes and request-lifecycle order, where to bind guards/pipes/interceptors/filters, and testing with Test.createTestingModule. NOT a bare Express/Fastify service with no DI (that is nodejs), NOT framework-agnostic…

ericrisco/rsc-harness · 81 tokens

codegen

Use for .NET code generation work with Roslyn, Microsoft.OpenApi, Razor templates, DTO/manager/controller generation, REST API generation, C# HttpClient generation, Angular/Axios TypeScript request clients, generated formatting, and deterministic output.

AterDev/Perigon.CLI · 53 tokens

bun-api

Bun runtime API reference for TypeScript scripts. Covers Bun.serve() HTTP/HTTP/2 server with routes and WebSockets, fetch() transport options, Bun.file(), Bun.write(), Bun.$() shell, Bun.spawn(), Bun.Glob, Bun.env, bun:sqlite, Bun.sql() for PostgreSQL/MySQL via DATABASEURL, Bun.s3 for S3-compatible storage, Bun.redis…

dmythro/agent-skills · 250 tokens

express-prisma-pattern

House pattern for Express + Prisma backends structured as manual Clean Architecture (controller → usecase → repository, wired by hand in a factory) — the real shape of dream-book-api and simple-management-api. Use whenever creating a new route, usecase or domain in an Express backend on this stack, even if the request…

JoaoEquer/Oficina · 85 tokens