api-controller

Create API controllers with HTTP handling, Swagger documentation, and middleware integration.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires express, swagger-jsdoc, swagger-ui-express.

What problem does it solve?

Developing API endpoints often involves repetitive HTTP request/response handling, proper error management, and consistent documentation, which can be tedious and lead to inconsistencies. This skill provides patterns for clean, well-documented API controllers.

Core Features & Use Cases

  • HTTP Request/Response Handling: Efficiently manage incoming requests and format outgoing responses using a consistent utility, reducing boilerplate code.
  • Swagger Documentation: Automatically generate comprehensive API documentation using JSDoc annotations directly in your code, keeping docs in sync with implementation.
  • Middleware Integration: Seamlessly integrate authentication and authorization middleware to secure your endpoints, centralizing access control.
  • Use Case: Create a new API endpoint for managing user profiles. You'll define the route, implement the controller method to delegate to a service, and add Swagger annotations for automatic documentation, saving time on manual updates.

Quick Start

Create a new GET endpoint /api/v1/users/{id} to retrieve user details, ensuring it uses ApiResponse.success and has full Swagger documentation.