This skill helps you design thin, validated Next.js App Router route handlers with standardized JSON responses and proper status codes.
npx playbooks add skill busirocket/agents-skills --skill busirocket-nextjs
Patterns for thin, maintainable route handlers in Next.js App Router.
Use this skill when:
app/api/**/route.ts filesservices/ function,return a response.
{ data } for success,{ error: { code, message } } for errors.
500).
app//page.tsx and app//layout.tsx are **Server Components bydefault**.
browser-only APIs.
'use client' creates a boundary; keep client islands small.nextjs-server-vs-client - Server vs Client Components (defaults, when to useclient)
nextjs-serializable-props - Props must be serializable from Server to Clientnextjs-protecting-server-code - Protecting server-only code from clientimports
nextjs-special-file-exports - Allowed extra exports for Next.js specialfiles
nextjs-route-placement - Route handler placement and conflicts with pagesnextjs-thin-handler-rule - Thin handler rule (STRICT)nextjs-http-methods - Supported HTTP methodsnextjs-caching-model - Caching model for route handlersnextjs-cache-components - Cache Components note for route handlersnextjs-response-shapes - Standard JSON response shapes (success/error)nextjs-status-codes - HTTP status codes to usenextjs-response-rules - Rules for API responses (validation, error handling)nextjs-validation-boundaries - Where validation lives (route handlers,services, utils)
nextjs-validation-patterns - Validation patterns (unknown inputs, guards)nextjs-validation-helpers - Recommended validation helpersnextjs-validation-rules - Validation rules (no inline types/helpers)busirocket-react - Component patterns and Server/Client boundariesbusirocket-validation - Validation strategies (Zod schemas, guard helpers)busirocket-core-conventions - File structure and boundariesRead individual rule files for detailed explanations and code examples:
rules/nextjs-thin-handler-rule.md
rules/nextjs-response-shapes.md
rules/nextjs-validation-boundaries.md
Each rule file contains:
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.