Skip to content
affaan-m avatar

Nestjs Patterns

Architecture patterns for NestJS modules, DTO validation, guards, and production TypeScript backends.

CCM score
75 of 100
skills.sh installs
11.9K
GitHub stars
312.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers modules, controllers, providers, DTO validation, guards, interceptors, exception filters, config, persistence, and testing
  • Includes code examples for global ValidationPipe setup, thin controllers with injectable services, and a shared error envelope
  • Enforces whitelist and forbidNonWhitelisted on public APIs and validates env at boot rather than on first request
  • Designed for teams building or reviewing modular NestJS backends with Prisma or TypeORM

Install

$ npx -y skills add affaan-m/ecc --skill nestjs-patterns -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

NestJS Development Patterns

Production-grade NestJS patterns for modular TypeScript backends.

When to Activate

  • Building NestJS APIs or services
  • Structuring modules, controllers, and providers
  • Adding DTO validation, guards, interceptors, or exception filters
  • Configuring environment-aware settings and database integrations
  • Testing NestJS units or HTTP endpoints

Project Structure

src/
├── app.module.ts
├── main.ts
├── common/
│   ├── filters/
│   ├── guards/
│   ├── interceptors/
│   └── pipes/
├── config/
│   ├── configuration.ts
│   └── validation.ts
├── modules/
│   ├── auth/
│   │   ├── auth.controller.ts
│   │   ├── auth.module.ts
│   │   ├── auth.service.ts
│   │   ├── dto/
│   │   ├── guards/
│   │   └── strategies/
│   └── users/
│       ├── dto/
│       ├── entities/
│       ├── users.controller.ts
│       ├── users.module.ts
│       └── users.service.ts
└── prisma/ or database/
  • Keep domain code inside feature modules.
  • Put cross-cutting filters, decorators, guards, and interceptors in common/.
  • Keep DTOs close to the module that owns them.

Bootstrap and Global Validation

Details

Repository
github.com/affaan-m/ecc
Categories
Backend & APIs, Frontend & UI Code
First seen
Jul 14, 2026

Questions

What does the nestjs-patterns skill do?

The nestjs-patterns skill gives the agent NestJS architecture patterns for modules, controllers, providers, DTO validation, guards, interceptors, config, and production-grade TypeScript backends. It covers building or reviewing a NestJS backend, including modules, providers, DTO validation, guards, or interceptors.

How do I install the nestjs-patterns skill?

Run npx -y skills add affaan-m/ecc --skill nestjs-patterns -y in your project. After that, the agent can follow the NestJS patterns when you build or review a NestJS backend.

Where does nestjs-patterns rank in the Backend & APIs category?

nestjs-patterns ranks in the top 100 of the Backend & APIs category on Claude Marketplaces. It is aimed at developers building or reviewing NestJS APIs and services, with guidance on DTO validation, guards, interceptors, exception filters, config, and testing.

Which skills lead nestjs-patterns in the Backend & APIs category?

The other top skills in the Backend & APIs category include entra-app-registration, neon, firebase-basics, firebase-auth-basics, and workers-best-practices. nestjs-patterns covers NestJS-specific architecture, so it suits projects built on that framework.

More from affaan-m/ecc

All 257

Similar to Nestjs Patterns

More Backend & APIs