🎯

busirocket-nextjs

🎯Skill

from busirocket/agents-skills

VibeIndex|
What it does

Generates standardized, thin Next.js route handlers with input validation, proper HTTP status codes, and consistent JSON response patterns.

πŸ“¦

Part of

busirocket/agents-skills(15 items)

busirocket-nextjs

Installation

Quick InstallInstall with npx
npx skills add BusiRocket/agents-skills
Quick InstallInstall with npx
npx add-skill BusiRocket/agents-skills
Quick InstallInstall with npx
npx skills add
πŸ“– Extracted from docs: busirocket/agents-skills
16Installs
-
AddedFeb 4, 2026

Skill Details

SKILL.md

Overview

# Next.js Route Handlers

Patterns for thin, maintainable route handlers in Next.js App Router.

When to Use

Use this skill when:

  • Creating or refactoring app/api/**/route.ts files
  • Implementing API endpoints
  • Validating request inputs
  • Returning standardized JSON responses
  • Deciding server vs client component boundaries

Non-Negotiables (MUST)

  • Route handlers must be thin: validate input, call a services/ function,

return a response.

  • No business logic or IO directly in the handler.
  • Never return unvalidated request input.
  • Use standard JSON response shapes: { data } for success,

{ error: { code, message } } for errors.

  • Use appropriate HTTP status codes (200, 201, 204, 400, 401, 403, 404, 409,

500).

Server vs Client Components

  • app//page.tsx and app//layout.tsx are **Server Components by

default**.

  • Use Client Components only when you need: state/event handlers, effects,

browser-only APIs.

  • 'use client' creates a boundary; keep client islands small.
  • Props from Server -> Client must be serializable.

Rules

Next.js App Router

  • nextjs-server-vs-client - Server vs Client Components (defaults, when to use

client)

  • nextjs-serializable-props - Props must be serializable from Server to Client
  • nextjs-protecting-server-code - Protecting server-only code from client

imports

  • nextjs-special-file-exports - Allowed extra exports for Next.js special

files

Route Handlers

  • nextjs-route-placement - Route handler placement and conflicts with pages
  • nextjs-thin-handler-rule - Thin handler rule (STRICT)
  • nextjs-http-methods - Supported HTTP methods
  • nextjs-caching-model - Caching model for route handlers
  • nextjs-cache-components - Cache Components note for route handlers

API Response Shapes

  • nextjs-response-shapes - Standard JSON response shapes (success/error)
  • nextjs-status-codes - HTTP status codes to use
  • nextjs-response-rules - Rules for API responses (validation, error handling)

Validation

  • nextjs-validation-boundaries - Where validation lives (route handlers,

services, utils)

  • nextjs-validation-patterns - Validation patterns (unknown inputs, guards)
  • nextjs-validation-helpers - Recommended validation helpers
  • nextjs-validation-rules - Validation rules (no inline types/helpers)

Related Skills

  • busirocket-react - Component patterns and Server/Client boundaries
  • busirocket-validation - Validation strategies (Zod schemas, guard helpers)
  • busirocket-core-conventions - File structure and boundaries

How to Use

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

  • Brief explanation of why it matters
  • Code examples (correct and incorrect patterns)
  • Additional context and best practices

More from this repository10

🎯
busirocket-tailwindcss-v4🎯Skill

busirocket-tailwindcss-v4 skill from busirocket/agents-skills

🎯
busirocket-refactor-workflow🎯Skill

Enforces strict TypeScript/React refactoring workflow with quality gates, file splitting rules, and mandatory post-refactor checks.

🎯
busirocket-react🎯Skill

Applies React best practices with Zustand state management, enforcing component structure, hook extraction, and efficient state handling across React applications.

🎯
busirocket-typescript-standards🎯Skill

Enforces strict TypeScript standards for maintainable codebases, focusing on one-thing-per-file, type conventions, and Next.js export exceptions.

🎯
busirocket-supabase🎯Skill

Enforces strict Supabase access boundaries by centralizing database interactions in a dedicated service layer, preventing direct external calls.

🎯
busirocket-tauri🎯Skill

Enforces Tauri desktop app standards by guiding command creation, invoke handler configuration, and Rust project layout.

🎯
busirocket-rust🎯Skill

Enforces strict Rust coding standards, ensuring maintainable codebases with modular, clean, and separated concerns.

🎯
busirocket-nextjs-route-handlers🎯Skill

Generates and structures thin, type-safe Next.js route handlers with standardized validation, error handling, and consistent response patterns for API endpoints.

🎯
busirocket-react-state-management-zustand🎯Skill

Provides opinionated Zustand state management conventions and best practices for React applications, focusing on clean, scalable store creation, state manipulation, and predictable global state han...

🎯
busirocket-react-components-and-hooks🎯Skill

busirocket-react-components-and-hooks skill from busirocket/agents-skills