nestjs-expert

Diagnose Nest.js dependency injection and module architecture issues.

Updated Jan 31, 2026
One-click install
npx skills add https://github.com/tuyenht/Antigravity-Core --skill nestjs-expert-tuyenht
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nestjs-expert
Source: https://github.com/tuyenht/Antigravity-Core/tree/main/.agent/skills/nestjs-expert
Command: npx skills add https://github.com/tuyenht/Antigravity-Core --skill nestjs-expert-tuyenht

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides expert guidance and solutions for complex challenges encountered during Nest.js application development, ensuring robust, scalable, and maintainable code.

Core Features & Use Cases

  • Dependency Injection & Module Architecture: Resolve circular dependencies, optimize module imports, and configure provider scopes.
  • Request Handling & Security: Implement guards, interceptors, pipes, and authentication strategies (JWT, Passport).
  • Database Integration: Troubleshoot TypeORM and Mongoose connections, entity configurations, and migrations.
  • Testing & Debugging: Guide through effective testing strategies with Jest and Supertest, and debug common runtime errors.
  • Use Case: A developer is struggling with a "Nest can't resolve dependencies" error in a complex module. This Skill analyzes the module structure, identifies the missing provider, and suggests the correct way to import or export it, ensuring the application starts correctly.

Quick Start

Use the nestjs-expert skill to help resolve a circular dependency issue in the user-auth module.

Frequently Asked Questions about nestjs-expert

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

FAQPage Schema
How do I resolve circular dependencies in a NestJS module?

To resolve circular dependencies in a NestJS module, analyze the module structure to identify missing providers and optimize imports. Use forward references or correctly export the required provider to ensure the application starts without dependency injection errors.

How do I implement JWT authentication and guards in NestJS?

Implement JWT authentication in NestJS by applying Passport strategies, guards, and interceptors. This secures request handling by validating tokens and protecting routes, ensuring only authorized users access specific endpoints.

What is the best way to configure TypeORM and Mongoose database connections in NestJS?

Configuring TypeORM and Mongoose database connections in NestJS involves defining entity schemas and managing migrations. Troubleshoot connection problems by verifying provider scopes and ensuring correct module imports for robust database integration.

How do I test a NestJS API using Jest and Supertest?

Test a NestJS API using Jest and Supertest by writing unit and e2e tests for request handling. This testing strategy validates module architecture and authentication logic, helping debug common runtime errors effectively.

Why does NestJS throw a cannot resolve dependencies error during startup?

NestJS throws a cannot resolve dependencies error when a required provider is missing from the module imports. Fix this by analyzing the module structure and ensuring all necessary services are correctly imported, exported, and injected.

Can I use interceptors and pipes to handle request validation in NestJS?

Yes, you can use interceptors and pipes for request validation in NestJS. They process the request payload before it reaches the controller, ensuring data integrity and handling errors during the request handling lifecycle.