Skip to content
Back to skills

Nestjs Scaffold

ASecurity

Production-ready NestJS API scaffold with feature modules, DI, global ValidationPipe, Prisma/Drizzle, auth guards and testing. Use to start a new NestJS backend.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 14, 2026
developmentgobashsqldockerawstestinggitapibackend

Works with

  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned November 14, 2026

npx -y skills add SebastianLuser/claude-code-arcane --skill nestjs-scaffold --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nestjs Scaffold?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Nestjs Scaffold
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sebastianluser-nestjs-scaffold/badge)](https://www.skillsdirectory.com/skills/sebastianluser-nestjs-scaffold)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: nestjs-scaffold
description: "Production-ready NestJS API scaffold with feature modules, DI, global ValidationPipe, Prisma/Drizzle, auth guards and testing. Use to start a new NestJS backend."
category: "backend"
argument-hint: "[project-name]"
user-invocable: true
allowed-tools: Read, Glob, Grep, Bash, Write, Edit, Task
---
# nestjs-scaffold — NestJS API Scaffolder

## MANDATORY WORKFLOW

**Before generating any code, complete these steps in order.**

### Step 0: Gather Requirements
1. **Service name** (kebab-case)
2. **Transport:** REST (default) / GraphQL / microservice
3. **ORM:** Prisma (default) / Drizzle / TypeORM
4. **DB:** PostgreSQL (default) / MySQL
5. **Auth:** JWT + refresh (default) / OAuth / none
6. **Deploy:** Docker (default) / Railway / AWS ECS

### Step 1: Create the base
```bash
npm i -g @nestjs/cli
nest new <name> --package-manager pnpm
cd <name>
nest g module users && nest g controller users && nest g service users
```

### Step 2: Structure (feature modules — NOT by layer)
```
src/
  users/   { users.module.ts, users.controller.ts, users.service.ts, dto/, entities/ }
  auth/    { auth.module.ts, jwt.strategy.ts, guards/, decorators/ }
  common/  { filters/, interceptors/, pipes/ }
  config/  { config.module.ts, env.validation.ts }
  main.ts
```

### Step 3: Non-negotiable bootstrap (`main.ts`)
```ts
app.useGlobalPipes(new ValidationPipe({ whitelist: true, forbidNonWhitelisted: true, transform: true }));
app.useGlobalFilters(new AllExceptionsFilter());
app.enableShutdownHooks();           // graceful shutdown
app.enableVersioning({ type: VersioningType.URI });
```

### Step 4: Defaults
- Constructor injection always; zero `ModuleRef.get()` at runtime
- Decorated DTOs (`class-validator`) on every endpoint
- Declarative guards for auth/authz
- `ConfigModule` with env validation (Joi/Zod) at boot
- Versioned migrations, `synchronize: false`
- Health check (`@nestjs/terminus`) + structured logging (pino)
- Tests: `Test.createTestingModule` (unit) + supertest (e2e)

### Step 5: Verify
`npm run build` + `npm run test`. Review against the `nestjs-code` rule and the `nestjs-best-practices` skill. Build + tests green → scaffold **READY**.

## Stack Defaults

| Component | Default |
|------------|---------|
| Framework | NestJS 10+ |
| ORM | Prisma |
| DB | PostgreSQL |
| Auth | JWT + refresh tokens |
| Validation | class-validator + ValidationPipe |
| Testing | Jest + supertest |
| Deploy | Docker |

---

_Inspired by the NestJS skills from [kadajett/agent-nestjs-skills](https://github.com/kadajett/agent-nestjs-skills) and [giuseppe-trisciuoglio/developer-kit](https://github.com/giuseppe-trisciuoglio/developer-kit). Adapted to the Arcane format._

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.