Nestjs Architecture
ASecurityOrganize the application by business capability. Each feature module should own its controllers, application services, and persistence adapters; keep cross-cutting configuration and database modules in a core area, and export only genuinely shared stateless helpers. Keep controllers thin, put orchestration in services/use cases, and register dependencies once in the module graph. Use singleton providers by default; choose request scope only for measured request-local state such as tenant cont...
- 584 stars
- 0 votes
- 0 copies
- 6 views
- Added September 5, 2026
Security analysis
100/100Pro scans all 11 files and shows the line behind each finding
npx -y skills add HoangNguyen0403/agent-skills-standard --skill nestjs-architecture --agent claude-codeAre you the author of Nestjs Architecture?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-nestjs-architecture-agent-skills-standard)Organize the application by business capability. Each feature module should own its controllers, application services, and persistence adapters; keep cross-cutting configuration and database modules in a core area, and export only genuinely shared stateless helpers.
Keep controllers thin, put orchestration in services/use cases, and register dependencies once in the module graph. Use singleton providers by default; choose request scope only for measured request-local state such as tenant context or request caching. Validate DTOs at the edge, configure through `ConfigService`, and use `forwardRef()` only after refactoring contracts cannot remove a circular dependency.
```ts
@Module({
imports: [TypeOrmModule.forFeature([OrderEntity])],
controllers: [OrdersController],
providers: [OrdersService, OrdersRepository],
exports: [OrdersService],
})
export class OrdersModule {}
```
Avoid mixed grab-bag modules, manual `new Service()` calls, raw entity responses, and unexplained request-scoped provider chains.
Files in this skill
- eval-1.baseline.md
- eval-1.with-skill.md
- eval-2.baseline.md
- eval-2.with-skill.md
- eval-3.baseline.md
- eval-3.with-skill.md
- trigger-1.md
- trigger-2.md
- trigger-3.md
- trigger-4.md
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.