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.
npx agentmods add skills/fellipeutaka/leon/react-hook-form-zodnpx skills add fellipeutaka/leon --skill react-hook-form-zodgit clone --depth 1 https://github.com/fellipeutaka/leonWrote 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.
[](https://agentmods.dev/skills/fellipeutaka/leon/react-hook-form-zod)<a href="https://agentmods.dev/skills/fellipeutaka/leon/react-hook-form-zod"><img src="https://agentmods.dev/badge/skills/fellipeutaka/leon/react-hook-form-zod.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00069 | $0.03904 |
| Opus 5 | $0.00034 | $0.01952 |
| Sonnet 5 | $0.00014 | $0.00781 |
| Haiku 4.5 | $0.00007 | $0.00390 |
Grade A, and why
react-hook-form-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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 418 lines — stays where its author put it; the contents beside it link to each section on GitHub.
React Hook Form + Zod Validation
Status: Production Ready ✅ Last Verified: 2026-01-20 Latest Versions: [email protected], [email protected], @hookform/[email protected]
Quick Start
npm install [email protected] [email protected] @hookform/[email protected]
Basic Form Pattern:
const schema = z.object({
email: z.string().email(),
password: z.string().min(8),
})
// zodResolver infers types — no need for z.infer<typeof schema> on useForm
const form = useForm({
resolver: zodResolver(schema),
defaultValues: { email: '', password: '' }, // REQUIRED to prevent uncontrolled warnings
})
const onSubmit = form.handleSubmit((value) => {
console.log(value)
})
<form onSubmit={onSubmit}>
<input {...form.register('email')} />
{form.formState.errors.email && <span role="alert">{form.formState.errors.email.message}</span>}
</form>
Server Validation (CRITICAL - never skip):
// SAME schema on server
const data = schema.parse(await req.json())
Key Patterns
useForm Options (validation modes):
mode: 'onSubmit'(default) - Best performancemode: 'onBlur'- Good balancemode: 'onChange'- Live feedback, more re-rendersshouldUnregister: true- Remove field data when unmounted (use for multi-step forms)
Zod Refinements (cross-field validation):
z.object({ password: z.string(), confirm: z.string() })
.refine((data) => data.password === data.confirm, {
message: "Passwords don't match",
path: ['confirm'], // CRITICAL: Error appears on this field
})
Zod Transforms:
z.string().transform((val) => val.toLowerCase()) // Data manipulation
z.string().transform(parseInt).refine((v) => v > 0) // Chain with refine
Zod v4.3.0+ Features:
// Exact optional (can omit field, but NOT undefined)
z.string().exactOptional()
// Exclusive union (exactly one must match)
z.xor([z.string(), z.number()])
// Import from JSON Schema
z.fromJSONSchema({ type: "object", properties: { name: { type: "string" } } })
What ships with it
21 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.
- .claude-plugin/plugin.json 565 B
- agents/openai.yaml 198 B
- references/accessibility.md 6.3 KB
- references/error-handling.md 5.1 KB
- references/links-to-official-docs.md 5.6 KB
- references/performance-optimization.md 6.7 KB
- references/rhf-api-reference.md 7.8 KB
- references/shadcn-integration.md 7.6 KB
- references/top-errors.md 8.0 KB
- references/zod-schemas-guide.md 7.3 KB
- rules/react-hook-form-zod.md 3.1 KB
- scripts/check-versions.sh 1.2 KB runs code
- templates/advanced-form.tsx 14 KB
- templates/async-validation.tsx 12 KB
- templates/basic-form.tsx 8.1 KB
- templates/custom-error-display.tsx 10.0 KB
- templates/dynamic-fields.tsx 9.9 KB
- templates/multi-step-form.tsx 12 KB
- templates/package.json 773 B
- templates/server-validation.ts 8.1 KB runs code
- templates/shadcn-form.tsx 10 KB
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.
- 5d ago First seen · 418 lines · 69 tokens per session scan A 7daa0078e915
react-hook-form-zod is a skill published in the GitHub repository fellipeutaka/leon (5 stars, last pushed yesterday), licensed MIT. It adds 69 tokens to every session and 3,904 once invoked, about $0.0003 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-08-31.
Other skills, from other repositories
client-setup
Create a vanilla tRPC client with createTRPCClient (), configure link chain with httpBatchLink/httpLink, dynamic headers for auth, transformer on links (not client constructor). Infer types with inferRouterInputs and inferRouterOutputs. AbortController signal support. TRPCClientError typing.
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-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.
frontend-conventions
Coding conventions, architecture patterns, and testing rules for the SkillHub React frontend. Ensures agents follow Feature-Sliced Design and use the generated OpenAPI types.
frontend-dev-guidelines
Frontend development guidelines for React/TypeScript applications. Modern patterns including Suspense, lazy loading, useSuspenseQuery, file organization with features directory, MUI v7 styling, TanStack Router, performance optimization, and TypeScript best practices. Use when creating components, pages, features…
fast-typescript-check
Keep www-sacred's TypeScript fast to type-check and fast to run. Use when touching the ASCII/canvas animation components (the only real per-frame code here), tightening type-check wall-clock, or auditing a change for runtime or compiler regressions. Scoped to this repo — a React 19 / Next.js 16 component library plus…