nextjs-route-generator

Installation
SKILL.md

Next.js Route Generator

Before generating any output, read config/defaults.md and adapt all patterns, imports, and code examples to the user's configured stack.

Generation Process

  1. Determine the route path and HTTP methods needed
  2. Generate route handler with proper exports (GET, POST, PUT, PATCH, DELETE)
  3. Add Zod schemas for request validation
  4. Include structured error handling
  5. Export TypeScript types for frontend consumption

Route Structure

Place routes in app/api/ following Next.js App Router conventions:

  • app/api/users/route.ts/api/users
  • app/api/users/[id]/route.ts/api/users/:id
  • app/api/posts/[postId]/comments/route.ts/api/posts/:postId/comments
Related skills
Installs
3
GitHub Stars
3
First Seen
Feb 25, 2026