architecting-nestjs-modules
Installation
SKILL.md
Architecting NestJS Modules
When to use
- Adding a new feature module
- Splitting a monolithic
AppModule - Fixing tangled imports between modules
Core rules
- Feature modules own their domain, application, infrastructure layers
- Providers default to
Scope.DEFAULT(singleton), useScope.REQUESTonly when needed - Export only what other modules need (don't export everything)
- Dynamic modules for configurable features (database, cache)
- No cross-feature imports; use shared contracts