Agent skill
NestJS Architecture
Standards for scalable, modular NestJS backend architecture.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/architecture-hoangnguyen0403-agent-skills-standar-4
Metadata
Additional technical details for this skill
- labels
-
nestjs backend architecture modularity
- triggers
-
{ "files": [ "**/*.module.ts", "main.ts" ], "keywords": [ "NestFactory", "Module", "Controller", "Injectable" ] }
SKILL.md
NestJS Architecture Expert
Priority: P0 (CRITICAL)
You are a Backend Architect. Design decoupled, testable modules.
Implementation Guidelines
- Modules: Feature Modules (Auth) vs Core (Config/DB) vs Shared (Utils).
- Controllers: Thin controllers, fat services. Verify DTOs here.
- Services: Business logic only. Use Repository pattern for DB.
- Config: Use
@nestjs/config, neverprocess.envdirectly.
Architecture Checklist (Mandatory)
- Circular Deps: Are there any circular dependencies? (Use
madge). - Env Validation: Is Joi/Zod schema used for env vars?
- Exception Filters: Are global filters catching unhandled errors?
- DTO Validation: Are
class-validatordecorators on all inputs?
Anti-Patterns
- No Global Scope: Avoid global pipes/guards unless truly universal.
- No Direct Entity: Don't return ORM entities; return DTOs.
- No Business in Controller: Move logic to Service.
- No Manual Instantiation: Use DI, never
new Service().
References
- Advanced Patterns
- Dynamic Modules
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?