nestjs-pro

Codify NestJS patterns for API design and PostgreSQL RLS tenant context.

1|Updated Jul 3, 2026
One-click install
npx skills add https://github.com/truongnat/skills --skill nestjs-pro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nestjs-pro
Source: https://github.com/truongnat/skills/tree/main/skills/nestjs-pro
Command: npx skills add https://github.com/truongnat/skills --skill nestjs-pro

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Professional NestJS backend development is complex; this skill codifies best practices to help teams design modular, secure, DX-friendly NestJS apps with RLS integration and production-ready patterns.

Core Features & Use Cases

  • Module design and API/DX quality guidelines.
  • Security patterns, guards, pipes, interceptors, and OpenAPI integration.
  • PostgreSQL RLS integration patterns with NestJS; transaction boundaries and tenant context management.

Quick Start

Audit your NestJS project structure and implement per-request tenant context initialization before database access.

Frequently Asked Questions about nestjs-pro

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

FAQPage Schema
How do I implement PostgreSQL Row Level Security with NestJS and TypeORM or Prisma?

Implement PostgreSQL Row Level Security (RLS) in NestJS by initializing per-request tenant context using SET LOCAL or set_config. This ensures transaction-scoped session variables securely isolate multi-tenant database access across modules.

What is the best way to design production-ready NestJS APIs with secure multi-tenant database patterns?

Production-ready NestJS APIs enforce secure multi-tenant patterns using guards, pipes, and interceptors. Establish consistent error handling and OpenAPI documentation to ensure maintainable code across tenant-specific database edge cases.

How does per-request tenant context initialization work in NestJS before database access?

Per-request tenant context initialization in NestJS sets transaction-scoped session variables before database access. Applying SET LOCAL or set_config within transaction boundaries isolates tenant data securely during API request processing.

Does this NestJS API design pattern support both TypeORM and Prisma for tenant context management?

Yes, the NestJS API design patterns support tenant context management for both TypeORM and Prisma. Guidelines apply transaction-scoped session variables and RLS integration to ensure secure multi-tenant data access across supported ORMs.

Why do I need transaction-scoped session variables for NestJS multi-tenant databases?

Transaction-scoped session variables are needed for NestJS multi-tenant databases to securely bind tenant context to specific transactions. This prevents cross-tenant data leakage and ensures RLS policies enforce isolation correctly during request handling.

How to audit an existing NestJS project structure for secure API design and DX quality?

Audit a NestJS project structure by reviewing modules, guards, and OpenAPI integration against API design and DX guidelines. Codify production-grade patterns to identify missing tenant context initialization and inconsistent error handling.