# Nestjs

> NestJS modules, DI, pipes, and guards in TypeScript. Use when the backend is Nest, not a raw Express app.

- Skill: `vostrikovva/nestjs` (Agent Skill)
- Install (CLI): `npx skillmds@latest add vostrikovva/nestjs`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vostrikovva/nestjs/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: vostrikovva (https://skillmd.com/u/vostrikovva)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/vostrikovva/nestjs

---


# NestJS + TypeScript

Use when the server is NestJS. Do not introduce a second Express app alongside it unless the user asked.

Module paths are defaults. Real directories come from the `implement`/`tdd` recon of `package.json` and `tsconfig.json` (monorepo, `paths`).

## Defaults

- Feature modules, injectable providers, constructor DI.
- Validation: `class-validator` + `ValidationPipe` (whitelist) or a typed schema pipe. DTOs are TypeScript classes/types, not loose `any`.
- Authz: guards on controllers. Do not hide authorization only in a random middleware file.
- Config: `ConfigModule`; typed config keys. Do not print secrets in chat.

## When Express is enough

A tiny JSON API with a handful of routes can stay on `express-api`. Nest pays off with multiple modules, shared guards, and a growing team.

## Do not

- Mix Nest HTTP and a parallel Express server in the same process without an explicit architecture decision.

