nestjs-best-practices
Installation
SKILL.md
NestJS Best Practices
Conventions for NestJS applications using configurable dynamic modules, custom domain exceptions, Mongoose, and feature-based module organization.
When to Apply
- Writing new NestJS modules, services, or controllers
- Refactoring existing NestJS code to follow these patterns
- Implementing authentication, validation, or data access
- Organizing code by feature (not by technical layer)
Rule Categories
Architecture
- arch-dynamic-modules — Use ConfigurableModuleBuilder,
*-module-definition.ts, andstatic register()for dynamic modules. See rules/arch-dynamic-modules.md. - arch-feature-modules — Organize by feature under
src/modules/<feature>/with*.module.ts,*.module-definition.ts, andindex.ts. See rules/arch-feature-modules.md.