nestjs-expert

Implement modular NestJS backend architectures with REST and GraphQL APIs.

14|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/alexander-danilenko/ai-skills --skill nestjs-expert-alexander-danilenko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nestjs-expert
Source: https://github.com/alexander-danilenko/ai-skills/tree/main/skills/nestjs-expert
Command: npx skills add https://github.com/alexander-danilenko/ai-skills --skill nestjs-expert-alexander-danilenko

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Help teams design and implement modular, testable, and secure TypeScript backends using NestJS, removing uncertainty around architecture, dependency injection, validation, and testing best practices.

Core Features & Use Cases

  • Architectural Guidance: Plan modules, providers, controllers, and dependency boundaries for scalable codebases.
  • Implementation Patterns: Create controllers, services, DTOs with class-validator, guards, interceptors, and exception filters following enterprise conventions.
  • Integration & Migration: Integrate TypeORM or Prisma, set up JWT/Passport authentication, and migrate Express apps to NestJS with minimal disruption.
  • Example: Implement a users module with DTO validation, a JWT auth guard, service-level error handling, Swagger docs, and unit + e2e tests.

Quick Start

Create a NestJS module with a controller, service, DTOs, JWT guard, and basic unit tests for a users resource.

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 backend with modular controllers and services?

Structure a NestJS backend by defining modules, providers, and controllers with clear dependency boundaries. Use dependency injection for services and DTOs with class-validator to ensure scalable, testable TypeScript architectures.

What is the best way to set up JWT authentication in a NestJS API?

The best way to set up JWT authentication in NestJS is using Passport strategies with custom guards. Implement service-level error handling and interceptors to secure REST and GraphQL API endpoints effectively.

How do I validate DTOs in NestJS using class-validator?

Validate DTOs in NestJS by applying class-validator decorators to class properties. Enforce validation pipes at the controller level to ensure incoming data conforms to TypeScript definitions before reaching services.

Can I use TypeORM or Prisma for database integration in NestJS?

Yes, you can integrate TypeORM or Prisma into NestJS modules. Establish database connections within providers and use repository patterns to manage data access while maintaining modular dependency injection.

How do I write unit and e2e tests for NestJS modules?

Write unit and e2e tests for NestJS modules by mocking dependency injection and testing controllers and services independently. Execute e2e tests using Supertest to validate API endpoints and exception filters.

Does NestJS support automatic Swagger documentation generation?

Yes, NestJS supports Swagger documentation generation. Decorate controllers and DTOs with Swagger annotations to automatically produce API documentation that reflects validation rules and endpoint structures.