Agent skill

NestJS Architecture

Standards for scalable, modular NestJS backend architecture.

Stars 163
Forks 31

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, never process.env directly.

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-validator decorators 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

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results