nestjs-best-practices

Enforce consistent NestJS patterns across modules and services.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/salesadriano/eventos --skill nestjs-best-practices-salesadriano
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nestjs-best-practices
Source: https://github.com/salesadriano/eventos/tree/main/.github/agents/skills/nestjs-best-practices
Command: npx skills add https://github.com/salesadriano/eventos --skill nestjs-best-practices-salesadriano

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

NestJS best practices and architecture patterns for building production-ready applications. This skill should be used when writing, reviewing, or refactoring NestJS code to ensure proper patterns for modules, dependency injection, security, and performance.

Core Features & Use Cases

  • Architecture guidelines across modules, DI, error handling, security, performance, testing, ORM, API design, microservices, and DevOps.
  • Use cases include writing new NestJS modules, reviewing code for architecture and security issues, refactoring existing codebases, and optimizing performance.
  • Guidance for consistent module boundaries, explicit DI, and safe error handling, serialization, and deployment readiness.

Quick Start

Use this skill to review and refactor NestJS projects to align with standard patterns.

Frequently Asked Questions about nestjs-best-practices

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

FAQPage Schema
How do I structure NestJS modules for scalable and maintainable architecture?

To structure scalable NestJS modules, enforce consistent module boundaries, explicit dependency injection, and safe error handling. This approach ensures proper module organization for production-ready applications and maintains clear separation of concerns across services.

What is the best way to review existing NestJS code for architecture and security issues?

The best way to review NestJS code is to evaluate it against standard patterns for explicit dependency injection, safe error handling, and API DTO serialization. This process identifies architectural inconsistencies and security vulnerabilities to improve overall codebase health.

How do I set up explicit dependency injection and safe error handling in NestJS?

Setting up explicit dependency injection and safe error handling in NestJS requires applying consistent architectural patterns across modules and services. This ensures proper DI container management and predictable application behavior during runtime exceptions.

Can I use these NestJS patterns for microservices and DevOps deployment readiness?

Yes, these NestJS patterns apply to microservices and DevOps deployment readiness. The guidelines cover architecture, ORM, API design, and health checks, satisfying requirements for production deployment across various execution contexts.

When do I need to refactor a NestJS codebase to improve performance and security?

You need to refactor a NestJS codebase to improve performance and security when existing modules lack explicit dependency injection, consistent boundaries, or safe error handling. Refactoring aligns the code with standard patterns for optimization and vulnerability prevention.

How does API DTO serialization work in production-ready NestJS applications?

API DTO serialization in production-ready NestJS applications works by enforcing consistent patterns for data transfer objects across module boundaries. This ensures safe data transformation and validation during API request and response cycles.