Opinionated NestJS guidance covering modules, DI scoping, exception filters, DTO validation, and Drizzle ORM use.

CCM score
49 of 100
skills.sh installs
4K
GitHub stars
372
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers modular architecture, dependency injection scoping, request lifecycle, error handling, validation, and Drizzle ORM patterns
  • Includes a DI scope table (singleton, request, transient) and a best-practices table contrasting correct and incorrect patterns
  • Enforces a global ValidationPipe with transform and whitelist, and bans forwardRef() in favor of restructuring modules
  • Designed for teams building or reviewing NestJS codebases that use Drizzle ORM

Install

$ npx -y skills add giuseppe-trisciuoglio/developer-kit --skill nestjs-best-practices -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

NestJS Best Practices

Overview

Grounded in the Official NestJS Documentation, this skill enforces modular architecture, dependency injection scoping, exception filters, DTO validation with class-validator, and Drizzle ORM integration patterns.

When to Use

  • Designing/refactoring NestJS modules or dependency injection
  • Creating exception filters, validating DTOs, or integrating Drizzle ORM
  • Reviewing code for anti-patterns or onboarding to a NestJS codebase

Instructions

1. Modular Architecture

Follow strict module encapsulation. Each domain feature should be its own @Module():

  • Export only what other modules need — keep internal providers private
  • Use forwardRef() only as a last resort for circular dependencies; prefer restructuring
  • Group related controllers, services, and repositories within the same module
  • Use a SharedModule for cross-cutting concerns (logging, configuration, caching)

See references/arch-module-boundaries.md for enforcement rules.

2. Dependency Injection

Choose the correct provider scope based on use case:

Details

Repository
github.com/giuseppe-trisciuoglio/developer-kit
Categories
Backend & APIs, Databases
First seen
May 16, 2026

More from giuseppe-trisciuoglio/developer-kit

All 95

Similar to Nestjs Best Practices

More Backend & APIs