api-endpoint-design

Design REST API endpoints with layered Routes, Middleware, Controllers, Services, Repositories, and DTOs.

Updated Dec 31, 2025
One-click install
npx skills add https://github.com/JackSmack1971/claude-code-learning-flywheel --skill api-endpoint-design-jacksmack1971
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-endpoint-design
Source: https://github.com/JackSmack1971/claude-code-learning-flywheel/tree/main/.claude/skills/api-endpoint-design
Command: npx skills add https://github.com/JackSmack1971/claude-code-learning-flywheel --skill api-endpoint-design-jacksmack1971

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Inconsistent endpoints and tangled logic lead to hard-to-test APIs. This Skill enforces a clean, layered approach (Routes → Middleware → Controllers → Services → Repositories → DTOs) to maintain clear responsibilities and type safety.

Core Features & Use Cases

  • Layer Separation: Routes define endpoints, Middleware handles auth/validation, DTOs enforce payload shape
  • DTOs & Type Safety: Use schemas to validate input/output
  • Use Case: Implement a new user endpoint with strict separation and test coverage

Quick Start

Define a new route file under src/routes/v1, create a Create<User>Dto, implement a UserService, and wire up a UserController.