# Build Reliable NestJS Applications

NestJS architecture and debugging require careful module, provider, database, and authentication decisions. This skill guides diagnosis, implementation, review, and validation with established patterns.

## Install

```bash
npx skillstore add sickn33/nestjs-expert
```

## Metadata

- Status: approved
- Slug: sickn33-nestjs-expert
- Skillstore revision: r2
- Version status: missing
- Tree hash: 74d44a52a4ff3cc4b6b7354e908114c8640103f87cd20eb2a729e28580e5af68
- Author: sickn33
- GitHub username: sickn33
- License: MIT
- Repository: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/nestjs-expert
- Ref: 81e05e636292629114b76cbb3922fbe57672fc02
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network
- Quality score: 77
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/sickn33-nestjs-expert
- Manifest: https://skillstore.pages.dev/api/skills/sickn33-nestjs-expert/manifest

## Capabilities

- Diagnoses module imports, provider exports, circular dependencies, and injection token problems.
- Guides controller validation, guards, interceptors, pipes, exception filters, and request lifecycle design.
- Provides Jest, Supertest, repository mocking, integration testing, and end-to-end testing patterns.
- Troubleshoots TypeORM, Mongoose, Prisma, database connections, entities, transactions, and query performance.
- Reviews Passport, JWT, configuration, logging, caching, and production performance practices.

## Use Cases

- Repair Dependency Injection: Trace missing providers, exports, imports, scopes, and circular dependencies in a NestJS application.
- Design a Tested Feature: Plan modules, controllers, services, DTO validation, mocks, and end-to-end coverage for a new feature.
- Review Production Readiness: Assess authentication, database handling, errors, logging, caching, performance, and test coverage before release.

## Prompt Templates

### Diagnose a NestJS Error

```
Diagnose this NestJS error: [error]. Explain the likely cause, files to inspect, smallest fix, and validation steps.
```

### Implement a Feature Module

```
Design a NestJS module for [feature]. Include controllers, services, DTO validation, provider boundaries, error handling, and focused tests.
```

### Review Architecture

```
Review this NestJS architecture: [context]. Identify module boundary, dependency injection, database, authentication, testing, and performance risks. Prioritize concrete changes.
```

### Plan a Production Migration

```
Plan the migration from [current design] to [target design]. Preserve behavior, stage database changes, address security, and define rollback and validation steps.
```

## Limitations

- The skill provides guidance and examples but cannot verify behavior without access to the target project.
- Database, authentication, and deployment advice requires adaptation to local infrastructure and security requirements.
- Referenced commands depend on scripts and packages already configured in the project.
- Specialized TypeScript, database, Node.js runtime, and frontend issues may require another expert.

## Best Practices

- Provide the exact error, relevant module metadata, framework version, and expected behavior.
- Match existing project conventions and request the smallest change that resolves the confirmed cause.
- Validate changes in order with build, unit, integration, and relevant end-to-end tests.

## Anti Patterns

- Do not add broad module imports or forward references before confirming the dependency path.
- Do not expose secrets, production tokens, or complete environment files in prompts.
- Do not accept framework examples without adapting them to project versions and infrastructure.

## Security Audit

- Audited at: 2026-08-04T15:42:51.131\+00:00
- Summary: All 61 static findings are false positives caused by Markdown syntax, bounded diagnostic examples, documentation links, or security troubleshooting prose. No executable payload, credential access, exfiltration intent, prompt injection, or unsafe command construction was found.

## Stats

- Views: 103
- Downloads: 13
- Favorites: 0
- Popularity score: 0
