api-layer

Design and implement HTTP API layers with JWT and Swagger documentation.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/jsalio/My-sdd-flow --skill api-layer-jsalio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-layer
Source: https://github.com/jsalio/My-sdd-flow/tree/main/api-layer
Command: npx skills add https://github.com/jsalio/My-sdd-flow --skill api-layer-jsalio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires domain-layer-design, contract-composition, solution-structure, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the common challenge of designing and implementing a secure, consistent, and well-documented API layer in backend applications.

Core Features & Use Cases

  • API Design: Establishes a pattern for API design and implementation, ensuring controllers are pure invokers, grouped by HTTP resource, and consistently document.
  • Security: Implements consistent error mapping and JWT authentication across all endpoints.
  • Documentation: Generates documentation for Swagger/OpenAPI, ensuring each endpoint is well-documented.
  • Use Case: When a developer needs to create a new endpoint, controller, or expose a use case over HTTP, this Skill guides the process.

Quick Start

Use the api-layer skill to implement a new API endpoint that exposes a use case over HTTP.

Frequently Asked Questions about api-layer

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

FAQPage Schema
How do I design a REST API layer with consistent JWT authentication and Swagger documentation?

Design a REST API layer by enforcing predefined patterns that make controllers pure use case invokers, standardizing JWT authentication, error mapping, and Swagger documentation across all HTTP endpoints.

What is the best way to structure backend controllers for consistent error mapping?

The best way to structure backend controllers is treating them as pure use case invokers, delegating business logic to the domain layer while applying consistent error mapping rules for HTTP responses.

How to generate Swagger documentation for a new HTTP endpoint exposing a use case?

Generate Swagger documentation by applying design patterns that group controllers by HTTP resource, ensuring each endpoint exposing a use case is consistently documented within the OpenAPI specification.

Does the API layer implementation work with any backend framework and language?

Yes, the API layer implementation applies to any language or framework, establishing a secure and consistent HTTP layer pattern that standardizes dependency injection, JWT, and Swagger documentation.

Do I need domain-layer-design and contract-composition skills to implement the API layer?

Yes, implementing the API layer requires the domain-layer-design, contract-composition, and solution-structure skills to be fully applied, ensuring controllers properly invoke underlying use cases.

Why should backend controllers be pure use case invokers in API design?

Backend controllers should be pure use case invokers to separate HTTP request handling from business logic, ensuring consistent error mapping, dependency injection, and maintainable API endpoints.