debug:nestjs

Diagnose NestJS dependency, guard, pipe, microservice, and gateway issues.

9|1|Updated Jan 12, 2026
One-click install
npx skills add https://github.com/SnakeO/claude-debug-and-refactor-skills-plugin --skill debug-nestjs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug:nestjs
Source: https://github.com/SnakeO/claude-debug-and-refactor-skills-plugin/tree/main/plugins/debug-and-refactor/skills/debug-nestjs
Command: npx skills add https://github.com/SnakeO/claude-debug-and-refactor-skills-plugin --skill debug-nestjs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

NestJS projects often encounter runtime DI errors, module/import misconfigurations, guard/interceptor issues, pipe validation failures, or microservice and WebSocket gateway problems. This skill provides a repeatable, phase-based debugging workflow to identify and fix these issues efficiently.

Core Features & Use Cases

  • Four-phase debugging methodology: gather context, isolate the problem, debug and fix, verify and document.
  • Covers common error patterns: dependency resolution, circular dependencies, guards/interceptors, pipes, microservice communication, and WebSocket/gateway errors.
  • Practical templates, code snippets, and commands to implement fixes in real projects.
  • Use Case: When a NestJS app throws "Nest cannot create the module" or "Cannot read property canActivate of undefined", follow the steps to locate the faulty provider, adjust module imports, and re-run tests.

Quick Start

Start by enabling NestJS debugging in your project (for example, nest start --debug --watch) and follow the four-phase workflow to reproduce and fix issues.

Frequently Asked Questions about debug:nestjs

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

FAQPage Schema
How do I fix Nest circular dependencies and dependency injection errors?

Fix NestJS dependency injection errors by following a phase-based workflow: gather context, isolate the faulty provider, adjust module imports, and verify the fix. It also resolves circular dependencies using forward references and module restructuring.

Why does my NestJS guard or interceptor return undefined during execution?

NestJS guard or interceptor undefined errors often stem from incorrect provider scoping or missing module imports. Diagnose these issues systematically by isolating the execution context, checking guard registration, and applying concrete configuration snippets.

What is the best way to debug WebSocket gateway problems in a NestJS microservice?

The best way to debug WebSocket gateway problems in NestJS is applying a four-phase methodology to isolate microservice communication failures. This targets gateway initialization, message payload validation, and transport layer misconfigurations.

Can I use this debugging workflow for pipe validation errors in NestJS?

Yes, you can use this workflow for pipe validation errors in NestJS. It provides structured guidance to isolate validation failures, trace incorrect payload transformations, and implement concrete code templates to correct the pipe logic.

How do I start debugging a NestJS app that throws module creation errors?

Start debugging a NestJS module creation error by enabling debug mode with `nest start --debug --watch`. Follow the four-phase workflow to reproduce the error, locate the faulty provider, adjust imports, and re-run tests.