validated-handler
CommunityType-safe Next.js API handlers
Authorbobmatnyc
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill eliminates repetitive boilerplate code for validating API request inputs in Next.js, ensuring type safety and consistent error handling.
Core Features & Use Cases
- Automatic Input Validation: Uses Zod schemas to validate query parameters or request bodies.
- Type Safety: Infers input types directly from Zod schemas, preventing runtime errors.
- Boilerplate Reduction: Significantly reduces the lines of code needed for API routes.
- Use Case: When building a Next.js API endpoint that accepts user input via query parameters, use this skill to automatically validate that input against a defined Zod schema, returning a 400 error if validation fails.
Quick Start
Use the validatedHandler to create a type-safe GET API route for fetching schools with pagination.
Dependency Matrix
Required Modules
None requiredComponents
scriptsreferences
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: validated-handler Download link: https://github.com/bobmatnyc/claude-mpm-skills/archive/main.zip#validated-handler Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.