validated-handler

Installation
SKILL.md

Next.js Validated Handler Pattern

Type-safe API route handler with automatic Zod validation for Next.js App Router.

When to Use This Skill

Use this skill when:

  • Building Next.js API routes (App Router)
  • Want automatic input validation with Zod
  • Need consistent error handling across API routes
  • Want to eliminate boilerplate validation code
  • Building type-safe APIs with TypeScript

The Problem

Without a validated handler, every API route has repetitive validation code:

// ❌ REPETITIVE - Every route looks like this
export async function GET(request: NextRequest) {
Related skills
Installs
140
GitHub Stars
43
First Seen
Jan 23, 2026