api-design

Design APIs with Domain-Driven Design and Clean Architecture layers.

2|Updated Feb 15, 2026
One-click install
npx skills add https://github.com/nakano1122/dotfiles --skill api-design-nakano1122
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design
Source: https://github.com/nakano1122/dotfiles/tree/main/dot_agents/skills/api-design
Command: npx skills add https://github.com/nakano1122/dotfiles --skill api-design-nakano1122

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to designing and implementing APIs based on Domain-Driven Design (DDD) and Clean Architecture principles, ensuring maintainable, scalable, and well-structured code.

Core Features & Use Cases

  • Layered Architecture: Understand and implement the Presentation, Application, Domain, and Infrastructure layers.
  • Pattern Implementation: Apply Entity, Value Object, Repository patterns, and Use Case design.
  • API Design: Follow RESTful naming conventions, design clear error responses, and structure payloads effectively.
  • Use Case: When starting a new backend project or refactoring an existing one, use this Skill to establish a solid architectural foundation for your APIs.

Quick Start

Follow the Clean Architecture layer structure to design a new API endpoint for user creation.

Frequently Asked Questions about api-design

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

FAQPage Schema
How do I design RESTful APIs using Domain-Driven Design and Clean Architecture?

To design RESTful APIs with Domain-Driven Design and Clean Architecture, structure your project into Presentation, Application, Domain, and Infrastructure layers. This separation ensures maintainable, scalable code by enforcing dependency direction rules and clear separation of concerns across layers.

What is the best way to structure domain entities and repository patterns in backend development?

The best way to structure domain entities and repository patterns is by isolating them within the Domain layer of a Clean Architecture. This approach keeps your core business logic independent of infrastructure concerns, ensuring your domain model remains maintainable and well-structured.

How do I implement layered architecture for a new backend API endpoint?

To implement layered architecture for a new backend API endpoint, follow the Clean Architecture structure: define the domain entity, create a repository interface, implement the application use case, and finally expose the endpoint through the presentation layer. This establishes a solid architectural foundation.

When do I need Clean Architecture and separation of concerns for API development?

You need Clean Architecture and separation of concerns for API development when starting a new backend project or refactoring an existing one. It addresses scenarios requiring strict dependency direction rules to ensure your API design remains maintainable and scalable as complexity grows.

Does Clean Architecture work for refactoring existing API endpoints and domain models?

Yes, Clean Architecture works for refactoring existing API endpoints and domain models. By reorganizing your code into Presentation, Application, Domain, and Infrastructure layers, you can establish a solid architectural foundation that improves maintainability and enforces proper separation of concerns.

What are the limitations of applying Clean Architecture to API design?

A limitation of applying Clean Architecture to API design is the strict adherence required to dependency direction rules and separation of concerns. This introduces multiple layers and pattern implementations like Entity and Value Object, which may add initial structural overhead to simple backend development tasks.