nestjs_specialist

Implements NestJS backend applications with Drizzle ORM database integration and testing patterns.

Updated Jan 14, 2026
One-click install
npx skills add https://github.com/jvsandhu/agentic-skills --skill nestjs-specialist-jvsandhu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nestjs_specialist
Source: https://github.com/jvsandhu/agentic-skills/tree/main/skills/nestjs_specialist
Command: npx skills add https://github.com/jvsandhu/agentic-skills --skill nestjs-specialist-jvsandhu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @nestjs/common, @nestjs/core, @nestjs/jwt, @nestjs/graphql, @nestjs/microservices, drizzle-orm, drizzle-kit, pg, class-validator, class-transformer, supertest, rxjs.

What problem does it solve? Building production NestJS backends requires coordinating modules, dependency injection, authentication, validation, and database access, and this Skill provides proven patterns and code templates for each layer. ## Core Features & Use Cases - NestJS Architecture Patterns: Ready-to-use templates for modules, controllers, services, guards, interceptors, exception filters, and custom decorators. - Drizzle ORM Integration: Complete setup for schema definition, repositories, transactions, soft deletes, and migrations with PostgreSQL. - Testing & Security: Unit and E2E testing patterns with Jest and supertest, plus JWT authentication guards and role-based access control. - Use Case: When scaffolding a new REST API with user management, apply the repository pattern with Drizzle, protect routes with JWT and roles guards, and verify behavior with E2E tests against a real database. ## Quick Start Ask the agent to scaffold a NestJS users module with Drizzle ORM, JWT authentication, and E2E tests following this skill's patterns.

Frequently Asked Questions about nestjs_specialist

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

FAQPage Schema
How do I integrate Drizzle ORM with NestJS?

Create a DatabaseService that initializes drizzle with a node-postgres Pool and your schema, then inject it into repository classes. Repositories use db.select, insert, update, and delete with eq filters, keeping Drizzle code out of services.

How to implement JWT authentication in NestJS?

Implement a JwtAuthGuard as a CanActivate that extracts the Bearer token from the authorization header and verifies it with JwtService. Attach the decoded payload to request.user, then combine with a RolesGuard using Reflector for role-based access control.

Drizzle ORM vs TypeORM for NestJS projects?

Drizzle ORM offers a lightweight, SQL-like query API with strong TypeScript inference and schema defined in code via pgTable. TypeORM uses decorator-based entities and active record patterns. This skill covers Drizzle with migrations via drizzle-kit.

How do I run database migrations with Drizzle in NestJS?

Generate migration files with npx drizzle-kit generate, then run them programmatically using the migrate function from drizzle-orm/node-postgres/migrator inside a MigrationService. Migrations can also run during E2E test setup before app initialization.

How to write E2E tests for NestJS with a real database?

Create a TestingModule importing AppModule, run Drizzle migrations against a test database, and clean tables in beforeEach. Use supertest against app.getHttpServer to assert HTTP responses while seeding data directly through the DatabaseService.