nestjs-expert

Create NestJS modules, controllers, services, DTOs, guards, and interceptors with TypeScript.

1|Updated May 16, 2026
One-click install
npx skills add https://github.com/enigmaicon-eng/AI-Enterprise-OS --skill nestjs-expert-enigmaicon-eng
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nestjs-expert
Source: https://github.com/enigmaicon-eng/AI-Enterprise-OS/tree/main/examples/claude-skills/skills/nestjs-expert
Command: npx skills add https://github.com/enigmaicon-eng/AI-Enterprise-OS --skill nestjs-expert-enigmaicon-eng

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you implement production-ready NestJS APIs instead of relying on ad-hoc structure, weak validation, or inconsistent error handling.

Core Features & Use Cases

It guides you to scaffold modular NestJS architecture (modules, controllers, services) with robust dependency injection, then add security via JWT/Passport guards, and finally ensure correctness with DTO validation and thorough unit/E2E testing. Use it when building enterprise TypeScript REST or GraphQL services that need maintainable module boundaries, authenticated endpoints, documented APIs, and repeatable test coverage (e.g., controllers with Swagger decorators, services with typed exceptions, DTOs using class-validator, and Jest-based unit tests plus Supertest E2E tests).

Quick Start

Use nestjs-expert to generate a NestJS feature module with a controller and service, secure the routes with JWT/roles guards, and validate request DTOs with class-validator while documenting endpoints and adding unit tests.

Frequently Asked Questions about nestjs-expert

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

FAQPage Schema
How do I structure a NestJS module with controllers and services for enterprise APIs?

Structure NestJS modules by scaffolding controllers, services, and DTOs with robust dependency injection to maintain clear module boundaries. This approach ensures maintainable enterprise TypeScript REST or GraphQL services with typed exception handling and consistent request validation.

What's the best way to add JWT authentication and role guards to NestJS routes?

The best way to add JWT authentication to NestJS is using Passport guards to secure routes and enforce role-based access. This secures endpoints by validating tokens and restricting requests based on user roles before they reach the controller.

How does DTO validation with class-validator work in NestJS?

DTO validation in NestJS works by using class-validator decorators on Data Transfer Objects to enforce request payload rules. This ensures incoming data matches expected types and formats before processing, providing consistent request validation and typed HTTP exception handling.

Does this NestJS setup support Swagger OpenAPI documentation decorators?

Yes, this NestJS setup supports Swagger OpenAPI decorator coverage to document REST API endpoints. By adding decorators to controllers and DTOs, you generate consistent API documentation that describes request schemas, response types, and authentication requirements.

Can I use Jest unit tests and Supertest E2E tests with NestJS modules?

Yes, you can implement Jest-based unit tests and Supertest-based E2E tests for NestJS modules. This ensures repeatable test coverage by mocking dependency injection in services and validating HTTP endpoints end-to-end.

Does this approach work with TypeORM or Prisma for database persistence?

Yes, this NestJS architecture supports persistence integration with both TypeORM and Prisma. You inject repository services into modules using dependency injection, allowing enterprise APIs to interact securely with databases while maintaining testable module boundaries.