api-design

Define REST conventions, DTO validation, and error handling for NestJS APIs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

NestJS API design guidelines provide a clear blueprint for designing consistent NestJS APIs, covering REST conventions, DTO validation, and unified error handling to reduce ambiguity and rework.

Core Features & Use Cases

  • REST conventions and URL design guidelines for NestJS resources
  • DTO validation patterns using class-validator and common validation rules
  • Controller/Service separation principles and consistent error/response handling
  • Use Case: a team standardizes API design across multiple microservices to ensure predictable endpoints and responses

Quick Start

Follow this guide to scaffold NestJS endpoints, DTOs, controllers, services, and error handling.

Frequently Asked Questions about api-design

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

FAQPage Schema
How do I structure controllers and services in a NestJS API?

NestJS API design separates controllers and services by defining REST conventions where controllers handle HTTP requests and responses, while services manage business logic to ensure a predictable endpoint structure.

What's the best way to validate DTOs in a NestJS REST API?

DTO validation in a NestJS REST API uses class-validator with common validation rules to enforce data integrity. This pattern ensures predictable responses by validating inputs before reaching the service layer.

How do I handle errors and HTTP status codes consistently in NestJS?

Unified error handling in NestJS uses consistent HTTP status codes and response formats across controllers and services. This approach standardizes error guidelines to reduce ambiguity and rework across API endpoints.

Can I use these REST conventions to standardize multiple NestJS microservices?

Yes, you can use these REST conventions to standardize NestJS microservices. Applying consistent URL design, DTO validation, and response formats across services ensures predictable endpoints and unified error handling.

When do I need formal API design guidelines for a NestJS backend?

You need formal API design guidelines for a NestJS backend when a team requires consistent architectural patterns. Defining naming, DTOs, and error handling reduces ambiguity and rework across multiple endpoints and microservices.