nestjs-expert

Guide NestJS application design with module boundaries, DI, and testing patterns.

1|Updated Apr 13, 2026
One-click install
npx skills add https://github.com/Inteligentsensingsolutions/tdd-dev-workflow --skill nestjs-expert-inteligentsensingsolutions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nestjs-expert
Source: https://github.com/Inteligentsensingsolutions/tdd-dev-workflow/tree/main/skills/nestjs-expert
Command: npx skills add https://github.com/Inteligentsensingsolutions/tdd-dev-workflow --skill nestjs-expert-inteligentsensingsolutions

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Helps backend developers design, organize, and harden NestJS applications by providing clear module boundaries, dependency injection patterns, request-pipeline guidance, testing strategies, and production-ready integration advice so teams avoid common runtime errors and maintain scalable systems.

Core Features & Use Cases

  • Module Architecture & Boundaries: Guidance on structuring feature modules, shared modules, provider exports, and avoiding circular dependencies.
  • Request Pipeline & Cross-cutting Concerns: Clear patterns for middleware, guards, pipes, interceptors, and exception filters to ensure consistent request handling.
  • Testing, Validation & Integrations: Practical advice for unit and E2E testing, DTO validation strategies (Zod/class-validator), repository abstractions, JWT authentication, and BullMQ background jobs.
  • Use Case: Refactor an authentication and users feature to a testable, injectable repository pattern with global validation, role-based guards, and queue-backed email delivery.

Quick Start

Analyze my NestJS project and produce a module-by-module refactor plan prioritizing dependency injection correctness, test coverage improvements, and secure JWT-based authentication.

Frequently Asked Questions about nestjs-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure NestJS modules to avoid circular dependencies?

Structure NestJS modules by establishing clear module boundaries, organizing feature and shared modules, and carefully managing provider exports to prevent circular dependency runtime errors and maintain scalable backend systems.

What's the best way to order middleware, guards, pipes, and interceptors in NestJS?

Order NestJS request-pipeline components by applying clear patterns for middleware, guards, pipes, and interceptors to ensure consistent cross-cutting concern handling and predictable request processing.

How do I implement a testable repository pattern with JWT authentication in NestJS?

Implement a testable repository pattern in NestJS by using dependency injection for provider exports, applying role-based guards for JWT authentication, and isolating data access to improve unit and E2E test coverage.

Can I use Zod or class-validator for DTO validation strategies in NestJS?

You can use Zod or class-validator for NestJS DTO validation strategies to enforce global validation rules, ensuring consistent data shape and type checking across incoming application requests.

Does this NestJS guidance cover integrating BullMQ for background jobs?

This NestJS guidance covers BullMQ integration to handle queue-backed background jobs, such as email delivery, ensuring production-ready asynchronous task processing within your TypeScript backend architecture.

Why does my NestJS dependency injection fail when refactoring features?

NestJS dependency injection fails during refactoring when module boundaries are unclear or providers are not properly exported, causing runtime errors that require strict module organization and DI provider correction.