nestjs-developer

Implements NestJS controllers, services, DTOs, and mappers following Clean Architecture and the Result pattern.

Updated Sep 8, 2026
One-click install
npx skills add https://github.com/lucaszhh/agents --skill nestjs-developer-lucaszhh
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: nestjs-developer
Source: https://github.com/lucaszhh/agents/tree/main/skills/back/nestjs-developer
Command: npx skills add https://github.com/lucaszhh/agents --skill nestjs-developer-lucaszhh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing NestJS backend modules by hand often leads to inconsistent layering, business logic leaking into controllers, and ad-hoc error handling. This Skill standardizes the implementation of controllers, services, repositories, DTOs, and mappers so every module follows Clean Architecture, the Result pattern, and X-Road packaging conventions. ## Core Features & Use Cases - Layered module implementation: Generates domain services returning Result<T, E>, presentation-layer DTOs with class-validator decorators, static mappers, and controllers with @TraceBreadcrumb auditing. - Standardized error mapping: Translates typed DomainError instances into HTTP exceptions via ErrorMapperToHttp with a defined status-code catalog (404, 401, 403, 409, 422, 400). - X-Road interoperability: Provides an interceptor template that wraps responses with X-Road headers for service bus publication. - Use Case: After nestjs-architect defines a module structure, ask the agent to implement the demand feature; it writes the controller, service, repository, DTOs, and mappers directly to disk and reports a synthetic summary without dumping code into the chat. ## Quick Start Ask the agent to implement the controller, service, DTOs, and mappers for a specific NestJS feature following the Result pattern and Clean Architecture layers.

Frequently Asked Questions about nestjs-developer

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

FAQPage Schema
How do I implement a NestJS controller with the Result pattern?▼

Have the domain service return Result<T, E> instead of throwing exceptions, then in the controller check output.isFailure and throw ErrorMapperToHttp(output.getError()) before mapping the value with a static ToPresentation mapper.

How to structure DTOs and mappers in NestJS Clean Architecture?▼

Place DTOs in presentation/dtos/ using class-validator decorators like @IsNotEmpty and @IsString, and create static mapper classes with ToDomain and ToPresentation methods that convert between DTOs and domain entities without holding state.

How do I map domain errors to HTTP exceptions in NestJS?▼

Define typed errors extending DomainError (NotFoundError, ConflictError, ValidationError, etc.) and translate them in the controller via ErrorMapperToHttp, which maps each type to the corresponding HttpException such as NotFoundException (404) or ConflictException (409).

Does this approach support X-Road service publication?▼

Yes, it includes an XRoadResponseInterceptor template that extracts x-road-client, x-road-service, and related headers from the request and wraps the response payload with the X-Road header block, status, and timestamp.

When should I not use this NestJS implementation skill?▼

Do not use it for designing module architecture, which belongs to nestjs-architect, or for writing tests, which belongs to nestjs-unit-tester. It is strictly for implementing controllers, services, repositories, DTOs, and mappers after the structure is defined.