What problem does it solve?
This Skill prevents API controllers from turning into messy business-logic hotspots by enforcing a strict transport-adapter pattern that keeps validation, auth context extraction, response mapping, and error handling consistent and contract-aligned.
Core Features & Use Cases
- Thin transport adapter design: Parse and validate inputs, extract authentication context, and delegate all business decisions to the application layer.
- Contract-compliant response mapping: Convert service results into DTOs that match the OpenAPI (or equivalent) response shape and correct HTTP status codes.
- Safe error boundaries: Transform errors into RFC 7807 Problem Details without leaking internal messages, stack traces, or topology details.
- Security guardrails at the boundary: Apply trusted-boundary validation, content negotiation discipline, and idempotency-key format validation.
Quick Start
Use controller-api-implementation to guide the implementation of a request handler or gRPC method as a contract-safe adapter: validate input at the boundary, extract auth context, call the service, map outputs to the contract, and return Problem Details for failures.