sdcorejs-review-performance-nestjs

Audit NestJS backends for N+1 queries, missing indexes, and slow queries.

2|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/sdcorejs/sdcorejs-agent --skill sdcorejs-review-performance-nestjs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sdcorejs-review-performance-nestjs
Source: https://github.com/sdcorejs/sdcorejs-agent/tree/main/plugin/skills/sdcorejs-review-performance-nestjs
Command: npx skills add https://github.com/sdcorejs/sdcorejs-agent --skill sdcorejs-review-performance-nestjs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Identifies performance bottlenecks in a NestJS backend (N+1 queries, missing indexes, slow migrations, oversized payloads, connection pool exhaustion, sync/blocking work, and memory leaks) before they hit production.

Core Features & Use Cases

  • N+1 query detection: Counts queries per endpoint and flags list endpoints likely causing N+1 patterns.
  • Index audit & hotspot finding: Checks WHERE-filtered columns for missing indexes and surfaces slow queries via pg_stat_statements.
  • Production-like perf gate reporting: Produces Critical/Important/Minor findings including measurements and actionable fixes, with query plan expectations for Critical items.

Quick Start

Ask the skill to run a performance audit gate for your NestJS API focusing on N+1, slow queries, indexes, migration safety, pool sizing, payload size, and memory behavior, then return Critical/Important/Minor findings with file and line references.

Frequently Asked Questions about sdcorejs-review-performance-nestjs

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

FAQPage Schema
How do I detect N+1 queries and slow database calls in a NestJS backend?

To detect N+1 queries in a NestJS backend, a performance audit counts queries per endpoint and flags list endpoints. This audit checks WHERE-filtered columns for missing indexes and surfaces slow queries using pg_stat_statements.

What is a performance budget gate for NestJS APIs?

A performance budget gate for NestJS APIs is a pre-release check that audits backend performance against defined thresholds. It identifies missing indexes, risky migrations, connection pool issues, oversized payloads, and memory leaks before production deployment.

How do I audit connection pool sizing and memory leaks for NestJS?

You audit connection pool sizing and memory leaks by running probes in a production-like environment to measure p50/p95/p99 metrics. This process evaluates pool exhaustion, blocking I/O, and memory behavior against performance budget thresholds.

Can I use pg_stat_statements to find missing indexes and hotspots in NestJS?

Yes, you can use pg_stat_statements to find missing indexes in NestJS. A performance audit utilizes pg_stat_statements to surface slow queries and checks WHERE-filtered columns to identify missing indexes.

What is the best way to resolve API timeouts and slow DB queries in NestJS?

The best way to resolve API timeouts and slow DB queries in NestJS is running a performance audit gate. It produces Critical, Important, and Minor findings with file references, measurements, and query plan evidence for actionable fixes.