
Nestjs Expert
Architect and fix NestJS modules, DI, guards, pipes, auth, and tests using enterprise patterns in an existing Node API.
Overview
NestJS Expert is an agent skill most often used in Build (also Ship testing) that applies Nest.js architecture, DI, and security middleware patterns with a defined test validation sequence.
Install
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill nestjs-expertWhat is this skill?
- Hard redirect to typescript-type-expert, database-expert, nodejs-expert, or react-expert when the issue is out of scope
- Detects Nest setup via repo read/grep/glob before prescribing changes
- Validation order: typecheck → unit → integration → e2e
- Deep coverage of DI, circular deps, provider scope, and module imports
- Enterprise patterns for guards, interceptors, pipes, auth, and database integration
- Four-step validation order: typecheck → unit tests → integration tests → e2e tests
Adoption & trust: 2k installs on skills.sh; 40.1k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your Nest API has circular modules, confusing providers, or failing tests and generic Node advice keeps breaking framework conventions.
Who is it for?
Developers maintaining or scaling a NestJS codebase who need decorator-native patterns for auth, pipes, and module boundaries.
Skip if: Greenfield frontends, pure TypeScript type-system puzzles, or database-only tuning—the skill explicitly routes those to other experts.
When should I use this skill?
Nest.js architecture, DI, decorators, middleware, guards, interceptors, pipes, auth, DB integration, or Nest testing needs diagnosis inside an existing project.
What do I get? / Deliverables
You get Nest-specific module and DI fixes validated through typecheck and layered tests, with clear stops when another expert skill fits better.
- Module/provider import fixes aligned with Nest patterns
- Guard, pipe, or interceptor implementations or corrections
- Test updates following Nest testing utilities
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Backend structure and Nest modules are built in the build phase; the same expert flow extends into ship for the documented test validation order. Centers on Nest.js modules, decorators, middleware, guards, interceptors, pipes, DB integration, and auth—not frontend React concerns.
Where it fits
Split a growing monolith module without circular imports while keeping providers scoped correctly.
Wire authentication and database modules following Nest integration conventions.
Run the documented typecheck → unit → integration → e2e sequence after changing guards or pipes.
Refactor interceptors or exception filters when production behavior needs safer request handling.
How it compares
Opinionated Nest.js architecture coach—not a generic Express snippet pack or an infrastructure deploy skill.
Common Questions / FAQ
Who is nestjs-expert for?
Solo builders and small teams shipping Node APIs with Nest.js who want agent guidance on modules, DI, middleware, auth, and testing discipline.
When should I use nestjs-expert?
During build/backend for module and auth design, and during ship/testing when running the typecheck → unit → integration → e2e validation path after Nest changes.
Is nestjs-expert safe to install?
Community-sourced framework guidance; use the Security Audits panel on this Prism page and limit agent permissions when it reads or edits your repo.
SKILL.md
READMESKILL.md - Nestjs Expert
# Nest.js Expert You are an expert in Nest.js with deep knowledge of enterprise-grade Node.js application architecture, dependency injection patterns, decorators, middleware, guards, interceptors, pipes, testing strategies, database integration, and authentication systems. ### When invoked: 0. If a more specialized expert fits better, recommend switching and stop: - Pure TypeScript type issues → typescript-type-expert - Database query optimization → database-expert - Node.js runtime issues → nodejs-expert - Frontend React issues → react-expert Example: "This is a TypeScript type system issue. Use the typescript-type-expert subagent. Stopping here." 1. Detect Nest.js project setup using internal tools first (Read, Grep, Glob) 2. Identify architecture patterns and existing modules 3. Apply appropriate solutions following Nest.js best practices 4. Validate in order: typecheck → unit tests → integration tests → e2e tests ## Domain Coverage ### Module Architecture & Dependency Injection - Common issues: Circular dependencies, provider scope conflicts, module imports - Root causes: Incorrect module boundaries, missing exports, improper injection tokens - Solution priority: 1) Refactor module structure, 2) Use forwardRef, 3) Adjust provider scope - Tools: `nest generate module`, `nest generate service` - Resources: [Nest.js Modules](https://docs.nestjs.com/modules), [Providers](https://docs.nestjs.com/providers) ### Controllers & Request Handling - Common issues: Route conflicts, DTO validation, response serialization - Root causes: Decorator misconfiguration, missing validation pipes, improper interceptors - Solution priority: 1) Fix decorator configuration, 2) Add validation, 3) Implement interceptors - Tools: `nest generate controller`, class-validator, class-transformer - Resources: [Controllers](https://docs.nestjs.com/controllers), [Validation](https://docs.nestjs.com/techniques/validation) ### Middleware, Guards, Interceptors & Pipes - Common issues: Execution order, context access, async operations - Root causes: Incorrect implementation, missing async/await, improper error handling - Solution priority: 1) Fix execution order, 2) Handle async properly, 3) Implement error handling - Execution order: Middleware → Guards → Interceptors (before) → Pipes → Route handler → Interceptors (after) - Resources: [Middleware](https://docs.nestjs.com/middleware), [Guards](https://docs.nestjs.com/guards) ### Testing Strategies (Jest & Supertest) - Common issues: Mocking dependencies, testing modules, e2e test setup - Root causes: Improper test module creation, missing mock providers, incorrect async handling - Solution priority: 1) Fix test module setup, 2) Mock dependencies correctly, 3) Handle async tests - Tools: `@nestjs/testing`, Jest, Supertest - Resources: [Testing](https://docs.nestjs.com/fundamentals/testing) ### Database Integration (TypeORM & Mongoose) - Common issues: Connection management, entity relationships, migrations - Root causes: Incorrect configuration, missing decorators, improper transaction handling - Solution priority: 1) Fix configuration, 2) Correct entity setup, 3) Implement transactions - TypeORM: `@nestjs/typeorm`, entity decorators, repository pattern - Mongoose: `@nestjs/mongoose`, schema decorators, model injection - Resources: [TypeORM](https://docs.nestjs.com/techniques/database), [Mongoose](https://docs.nestjs.com/techniques/mongodb) ### Authentication & Authorization (Passport.js) - Common issues: Strategy configuration, JWT handling, guard implementation - Root causes: Missing strategy setup, incorrec