Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
giuseppe-trisciuoglio avatar

Nestjs Drizzle Crud Generator

  • 1.5k installs
  • 311 repo stars
  • Updated June 22, 2026
  • giuseppe-trisciuoglio/developer-kit

nestjs-drizzle-crud-generator is an agent skill for generate nestjs crud modules with drizzle orm entities, dtos, and services.

About

The nestjs-drizzle-crud-generator skill is designed for generate NestJS CRUD modules with Drizzle ORM entities, DTOs, and services. NestJS Drizzle CRUD Generator Overview Automatically generates complete CRUD modules for NestJS applications using Drizzle ORM. Creates all necessary files following the zaccheroni-monorepo patterns: feature modules, controllers, services, Zod-validated DTOs, Drizzle schemas, and Jest unit tests. Invoke when the user needs NestJS CRUD modules, Drizzle schemas, or entity scaffolding.

  • Creating new entity modules with full CRUD endpoints.
  • Building database-backed features in NestJS.
  • Generating type-safe DTOs with Zod validation.
  • Adding services with Drizzle ORM queries.
  • Creating unit tests with mocked database.

Nestjs Drizzle Crud Generator by the numbers

  • 1,491 all-time installs (skills.sh)
  • +59 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #318 of 4,386 Backend & APIs skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

nestjs-drizzle-crud-generator capabilities & compatibility

Capabilities
creating new entity modules with full crud endpo · building database backed features in nestjs · generating type safe dtos with zod validation · adding services with drizzle orm queries
From the docs

What nestjs-drizzle-crud-generator says it does

Generates complete CRUD modules for NestJS applications with Drizzle ORM. Use when building server-side features in NestJS that require database operations, including creating new
SKILL.md
Generates complete CRUD modules for NestJS applications with Drizzle ORM. Use when building server-side features in NestJS that require database operations, inc
SKILL.md
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill nestjs-drizzle-crud-generator

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1.5k
repo stars311
Security audit2 / 3 scanners passed
Last updatedJune 22, 2026
Repositorygiuseppe-trisciuoglio/developer-kit

How do I generate nestjs crud modules with drizzle orm entities, dtos, and services?

Generate NestJS CRUD modules with Drizzle ORM entities, DTOs, and services.

Who is it for?

Backend developers scaffolding NestJS database modules with Drizzle.

Skip if: Skip for non-NestJS stacks or ORMs other than Drizzle without adaptation.

When should I use this skill?

User needs NestJS CRUD modules, Drizzle schemas, or entity scaffolding.

What you get

Completed nestjs-drizzle-crud-generator workflow with documented commands, files, and expected deliverables.

  • CRUD controller
  • service with Drizzle queries
  • Zod DTOs and unit tests

By the numbers

  • Generates six layers per entity: module, controller, service, Drizzle queries, Zod DTOs, and unit tests

Files

SKILL.mdMarkdownGitHub ↗

NestJS Drizzle CRUD Generator

Overview

Automatically generates complete CRUD modules for NestJS applications using Drizzle ORM. Creates all necessary files following the zaccheroni-monorepo patterns: feature modules, controllers, services, Zod-validated DTOs, Drizzle schemas, and Jest unit tests.

When to Use

  • Creating new entity modules with full CRUD endpoints
  • Building database-backed features in NestJS
  • Generating type-safe DTOs with Zod validation
  • Adding services with Drizzle ORM queries
  • Creating unit tests with mocked database

Instructions

Step 1: Define Entity Fields

Gather entity definition:

  • Entity name (e.g., user, product, order)
  • List of fields with types (see references/field-types.md for supported types)
  • Required fields vs optional fields with defaults

Step 2: Run the Generator

python scripts/generate_crud.py --feature <name> --fields '<json-array>' --output <path>

Step 3: Verify Generated Files

Check that all expected files were created:

ls -la libs/server/<feature-name>/src/lib/

Expected structure:

controllers/
services/
dto/
schema/
<feature>-feature.module.ts

Step 4: Run TypeScript Compilation

cd libs/server && npx tsc --noEmit

Step 5: Execute Unit Tests

cd libs/server && npm test -- --testPathPattern=<feature-name>

Examples

Generate a User module

python scripts/generate_crud.py \
  --feature user \
  --fields '[{"name": "name", "type": "string", "required": true}, {"name": "email", "type": "email", "required": true}, {"name": "password", "type": "string", "required": true}]' \
  --output ./libs/server

Generate a Product module

python scripts/generate_crud.py \
  --feature product \
  --fields '[{"name": "title", "type": "string", "required": true}, {"name": "price", "type": "number", "required": true}, {"name": "description", "type": "text", "required": false}, {"name": "inStock", "type": "boolean", "required": false, "default": true}]' \
  --output ./libs/server

Generated Structure

libs/server/{feature-name}/
├── src/
│   ├── index.ts
│   └── lib/
│       ├── {feature}-feature.module.ts
│       ├── controllers/
│       │   ├── index.ts
│       │   └── {feature}.controller.ts
│       ├── services/
│       │   ├── index.ts
│       │   ├── {feature}.service.ts
│       │   └── {feature}.service.spec.ts
│       ├── dto/
│       │   ├── index.ts
│       │   └── {feature}.dto.ts
│       └── schema/
│           └── {feature}.table.ts

Features

Module

  • Uses forRootAsync pattern for lazy configuration
  • Exports generated service for other modules
  • Imports DatabaseModule for feature tables

Controller

  • Full CRUD endpoints: POST, GET, PATCH, DELETE
  • Query parameter validation for pagination
  • Zod validation pipe integration

Service

  • Drizzle ORM query methods
  • Soft delete support (via deletedAt column)
  • Pagination with limit/offset
  • Filtering support
  • Type-safe return types

DTOs

  • Zod schemas for Create and Update
  • Query parameter schemas for filtering
  • NestJS DTO integration

Tests

  • Jest test suite
  • Mocked Drizzle database
  • Test cases for all CRUD operations

Manual Integration

After generation, integrate into your app module:

// app.module.ts
import { {{FeatureName}}FeatureModule } from '@your-org/server-{{feature}}';

@Module({
  imports: [
    {{FeatureName}}FeatureModule.forRootAsync({
      useFactory: () => ({
        defaultPageSize: 10,
        maxPageSize: 100,
      }),
    }),
  ],
})
export class AppModule {}

Dependencies

Required packages:

  • @nestjs/common
  • @nestjs/core
  • drizzle-orm
  • drizzle-zod
  • zod
  • nestjs-zod

Best Practices

1. Verify before commit: Always run tsc --noEmit and tests before committing generated code 2. Customize services: Add business logic to generated services after validation 3. Database migrations: Create migrations separately for generated Drizzle schemas 4. Use generated types: Reference generated types in your application code 5. Review DTOs: Adjust Zod validation rules based on your API requirements

Constraints and Warnings

  • Soft delete only: Delete operations use soft delete (deletedAt timestamp). Hard deletes require manual modification
  • No authentication: Generated code does not include auth guards - add them based on your security requirements
  • Basic CRUD only: Complex queries, transactions, or business logic must be implemented manually
  • JSON escaping: Use single quotes around the JSON array when passing fields on command line

Related skills

Forks & variants (1)

Nestjs Drizzle Crud Generator has 1 known copy in the catalog totaling 21 installs. They canonicalize to this original listing.

How it compares

Use nestjs-drizzle-crud-generator for opinionated full-module codegen; hand-write services when CRUD shape diverges heavily from REST defaults.

FAQ

What does nestjs-drizzle-crud-generator do?

Generate NestJS CRUD modules with Drizzle ORM entities, DTOs, and services.

When should I use nestjs-drizzle-crud-generator?

User needs NestJS CRUD modules, Drizzle schemas, or entity scaffolding.

Is nestjs-drizzle-crud-generator safe to install?

Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.