
Nestjs Best Practices
This one gives Claude a solid foundation in NestJS conventions: modular architecture, dependency injection scoping, exception filters, DTO validation with class-validator, and Drizzle ORM integration. You get enforcement rules for keeping modules focused, choosing the right provider scope (singleton vs request vs transient), and structuring the request pipeline correctly. The references break down common anti-patterns like dumping everything in AppModule or skipping validation. Most useful when you're setting up a new NestJS project or reviewing code that's grown messy. The Drizzle patterns are a nice touch since that's less commonly documented than TypeORM approaches.
- skills.sh installs
- 4K
- GitHub stars
- 369
- last updated
- Aug 21, 2026
Install
$ npx -y skills add giuseppe-trisciuoglio/developer-kit --skill nestjs-best-practices --agent claude-codeInstalls into .claude/skills of the current project.
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
SharedModulefor 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:
Sponsors
Details
- Repository
- github.com/giuseppe-trisciuoglio/developer-kit
- Categories
- Backend & APIs, Code Review & Quality, Debugging, Databases
- First seen
- May 16, 2026
More from giuseppe-trisciuoglio/developer-kit
All 102- Nestjs Code Review4K
- Spring Boot Cache4K
- Spring Boot Resilience4j3.9K
- Unit Test Service Layer3.9K
- Nextjs Code Review3.9K
- Spring Ai Mcp Server Patterns3.9K
- Unit Test Wiremock Rest Api3.9K
- Spring Boot Actuator3.9K
- Nextjs Authentication3.9K
- Spring Boot Dependency Injection3.9K
- Unit Test Controller Layer3.9K
- Unit Test Parameterized3.9K
- Unit Test Json Serialization3.9K
- Spring Boot Saga Pattern3.9K
- Spring Data Neo4j3.9K
- Unit Test Security Authorization3.9K
- Nextjs Data Fetching3.9K
- Langchain4j Tool Function Calling Patterns3.9K
- Nx Monorepo3.9K
- Langchain4j Spring Boot Integration3.9K
- Langchain4j Rag Implementation Patterns3.9K
- Unit Test Scheduled Async3.9K
- Rag3.9K
- Unit Test Utility Methods3.9K