using-nestjs-pipes-guards-interceptors

Installation
SKILL.md

Using NestJS Pipes, Guards, Interceptors

When to use

  • Implementing authentication/authorization
  • Adding logging, caching, response shaping
  • Cross-cutting concerns that shouldn't live in controllers

Core rules

  1. Pipes: transform/validate input (use ValidationPipe globally)
  2. Guards: authenticate/authorize requests (AuthGuard, RolesGuard)
  3. Interceptors: transform responses, log, cache, timeout (ClassSerializerInterceptor)
  4. Implement as @Injectable() classes, register globally or at controller/route level
  5. No logic in controllers that belongs in these cross-cutting components

Reference shape (TypeScript)

Installs
3
GitHub Stars
1
First Seen
May 4, 2026
using-nestjs-pipes-guards-interceptors — j4flmao/agent_skills_nodejs_nestjs