Agent skill · Backend & API

api-validation

Apply when validating API request inputs: body, query params, path params, and headers. This skill covers Zod v4 patterns.'

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill api-validation --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 5 KB
Bundled scripts: none
Path: skills/api/api-validation/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

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

What's inside
Steps it walks through
  1. When to Use
  2. Patterns
  3. Pattern 1: Zod Schema Validation (v4)
  4. Pattern 2: Request Handler with Validation
  5. Pattern 3: Query Params Validation
  6. Pattern 4: Reusable Validators (Zod v4)
  7. Pattern 5: Validation Middleware
  8. Zod v4 Migration Notes
  9. Anti-Patterns
  10. Verification Checklist
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
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.

Keep going