root-cause

Trace NestJS layers to diagnose zoppy-api bugs and runtime failures.

Updated Mar 1, 2026
One-click install
npx skills add https://github.com/Zoppy-crm/.github --skill root-cause-zoppy-crm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: root-cause
Source: https://github.com/Zoppy-crm/.github/tree/main/skills/backend/root-cause
Command: npx skills add https://github.com/Zoppy-crm/.github --skill root-cause-zoppy-crm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a deterministic, layer-by-layer methodology to find the root cause of errors, failing tests, unexpected behavior, permission failures, and stalled queue jobs in the zoppy-api NestJS codebase so engineers stop guessing and quickly produce actionable fixes.

Core Features & Use Cases

  • Trace Path: A stepwise inspection order from HTTP controllers to application, domain, session context, queues, and external integrations that narrows down where behavior diverges from expectations.
  • Common Pitfall Catalog: Lists frequent project-specific issues (missing setSession in processors, wrong guard order, floating Promises, Sequelize include pitfalls) and where to look for them.
  • Evidence-Driven Output: Prescribes an output format (Root Cause, Evidence, Fix, Prevention) to deliver reproducible findings and concrete code or configuration changes.
  • Use Cases: Investigating 403/401 surprises, empty query results, silent job successes, failing background processors, or incorrect external provider routing.

Quick Start

Investigate the failing endpoint by following the trace path from HTTP controller into application, domain, session, and queue layers and report the root cause, evidence lines, a concrete fix, and a prevention suggestion.

Frequently Asked Questions about root-cause

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

FAQPage Schema
How do I debug failing NestJS queue processors and stalled background jobs?

Debug stalled NestJS queue processors by inspecting for missing setSession calls and floating Promises in background job handlers. A structured root-cause analysis traces from queue processors through session context to identify where silent successes or stalled jobs originate.

Why am I getting unexpected 403 or 401 permission errors in my NestJS application?

Unexpected 403 or 401 permission errors in NestJS often stem from wrong guard order or missing session context. Root-cause analysis inspects controllers, session context, and domain layers to produce concrete evidence confirming the exact permission failure trigger.

What is the best way to troubleshoot empty query results in a NestJS Sequelize integration?

Troubleshoot empty NestJS Sequelize query results by checking for Sequelize include pitfalls within repository adapters. A systematic trace path inspects application and domain layers to find where query expectations diverge from actual database returns.

How do I trace incorrect external provider routing in a NestJS codebase?

Trace incorrect external provider routing in NestJS by inspecting provider strategies and external integrations layer-by-layer. Root-cause analysis follows a stepwise inspection order from controllers through application layers to identify the exact routing divergence.

Can I use this root-cause analysis method for failing HTTP endpoints and tests simultaneously?

Yes, this root-cause analysis method applies to failing HTTP endpoints, tests, queue processors, and external integrations. It inspects controllers, application layers, domain layers, and session context to produce reproducible findings and concrete code fixes across all scenarios.