nestjs-best-practices

Installation
Summary

40 NestJS best practices organized by priority across architecture, dependency injection, security, and performance.

  • Covers 10 rule categories from critical (architecture, DI) to low-medium (DevOps), each with specific, actionable patterns and anti-patterns
  • Includes rules for modules, controllers, services, error handling, authentication, database optimization, testing, and microservices
  • Each rule provides explanation, incorrect vs. correct code examples, and context for when to apply
  • Designed to guide automated refactoring and code generation in production NestJS applications
SKILL.md

NestJS Best Practices

Comprehensive best practices guide for NestJS applications. Contains 40 rules across 10 categories, prioritized by impact to guide automated refactoring and code generation.

When to Apply

Reference these guidelines when:

  • Writing new NestJS modules, controllers, or services
  • Implementing authentication and authorization
  • Reviewing code for architecture and security issues
  • Refactoring existing NestJS codebases
  • Optimizing performance or database queries
  • Building microservices architectures

Rule Categories by Priority

Priority Category Impact Prefix
Installs
15.8K
GitHub Stars
155
First Seen
Jan 19, 2026