api-patterns

Standardize Next.js API endpoints with GET/POST/PUT/PATCH templates and Prisma integration.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/vperreard/Mathildanesth --skill api-patterns-vperreard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-patterns
Source: https://github.com/vperreard/Mathildanesth/tree/main/.claude/skills/api-patterns
Command: npx skills add https://github.com/vperreard/Mathildanesth --skill api-patterns-vperreard

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Patterns standard pour API endpoints in Next.js. This framework provides consistent templates for GET/POST/PUT/PATCH, centralized error handling, and Prisma integration to reduce boilerplate and prevent common mistakes.

Core Features & Use Cases

  • Standard GET/POST/PUT/PATCH templates with uniform error handling and validation.
  • Prisma integration with safe data mapping (PascalCase to camelCase) and consistent response shapes.
  • Use cases include rapidly scaffolding API routes that follow project conventions and are production-ready.

Quick Start

Create a new API route using the standard GET/POST templates to ensure consistent behavior.

Frequently Asked Questions about api-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize Next.js API routes with Prisma?

Standardize Next.js API routes by applying predefined GET/POST/PUT/PATCH templates with Prisma integration, enforcing Zod validation, PascalCase to camelCase mapping, and uniform status codes across all endpoints.

What is the best way to validate POST requests in Next.js API endpoints?

Validate POST requests in Next.js API endpoints by enforcing mandatory Zod validation schemas within standardized route templates, ensuring data integrity before processing Prisma queries and returning uniform response shapes.

How do I reduce boilerplate code in Next.js backend API routes?

Reduce boilerplate in Next.js backend API routes by using predefined REST-like templates with centralized error handling and safe Prisma data mapping, preventing common mistakes during rapid scaffolding.

Can I use these API patterns for existing Next.js REST-like routes?

These API patterns apply to REST-like API routes across existing Next.js projects, providing standardized templates for data validation, authentication checks, and Prisma queries to make endpoints production-ready.

Does this API endpoint pattern require Zod validation for all methods?

This API endpoint pattern requires Zod validation specifically for POST, PUT, and PATCH methods, while enforcing consistent response shapes and uniform status codes across all GET/POST/PUT/PATCH operations.

Why does my Prisma data mapping need PascalCase to camelCase conversion?

PascalCase to camelCase conversion in Prisma data mapping enforces a standardized and safe response shape across Next.js API endpoints, maintaining consistent JavaScript naming conventions throughout your backend architecture.