api-validation
Apply when validating API request inputs: body, query params, path params, and headers. This skill covers Zod v4 patterns.'
npx skills add majiayu000/claude-skill-registry --skill api-validation --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
--- name: api-validation description: Apply when validating API request inputs: body, query params, path params, and headers. This skill covers Zod v4 patterns. version: 1.1.0 tokens: ~700 confidence: high sources: - https://zod.dev/ - https://express-validator.github.io/docs/ last_validated: 2025-12-10 next_review: 2025-12-24 tags: [api, validation, zod, backend] zod_version: "4.x" --- ## When to Use Apply when validating API request inputs: body, query params, path params, and headers. This skill covers Zod v4 patterns. ## Patterns ### Pattern 1: Zod Schema Validation (v4) ```typescript // Source: https://zod.dev/ import { z } from 'zod'; const CreateUserSchema = z.object({ email: z.string().email('Invalid email'), password: z.string().min(8, 'Min 8 characters'), name: z.string().min(1, 'Name required').max(100), role: z.enum(['user', 'admin']).default('user'), }); type CreateUserDto = z.infer<typeof CreateUserSchema>; ``` ### Pattern 2: Request Handler with Validation ```typescript // Source: https://zod.dev/ export async function POST(request: NextRequest) { const body = await request.json(); const result = CreateUserSchema.safeParse(body); if (!result.success) { return NextRes
- When to Use
- Patterns
- Pattern 1: Zod Schema Validation (v4)
- Pattern 2: Request Handler with Validation
- Pattern 3: Query Params Validation
- Pattern 4: Reusable Validators (Zod v4)
- Pattern 5: Validation Middleware
- Zod v4 Migration Notes
- Anti-Patterns
- Verification Checklist
What does the api-validation skill do?
Apply when validating API request inputs: body, query params, path params, and headers. This skill covers Zod v4 patterns.'
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill api-validation --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
