giuseppe-trisciuoglio/developer-kit / plugins/developer-kit-typescript/skills/nestjs-drizzle-crud-generator
nestjs-drizzle-crud-generator
VerifiedGenerates complete CRUD modules for NestJS applications with Drizzle ORM. Use when building server-side features in NestJS that require database operations, including creating new entities with full CRUD endpoints, services with Drizzle queries, Zod-validated DTOs, and unit tests. Triggered by requests like "generate a user module", "create a product CRUD", "add a new entity with endpoints", or when setting up database-backed features in NestJS.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.3 KB |
| assets/templates/controller-template.ts | script | 1.4 KB |
| assets/templates/dto-template.ts | script | 1003 B |
| assets/templates/module-template.ts | script | 1.2 KB |
| assets/templates/service-template.ts | script | 3.5 KB |
| assets/templates/table-template.ts | script | 709 B |
| assets/templates/test-template.ts | script | 5.1 KB |
| references/field-types.md | markdown | 1.3 KB |
| scripts/generate_crud.py | script | 12.0 KB |
assets/templates/controller-template.ts
View on GitHubimport {
Body,
Controller,
Delete,
Get,
Param,
Patch,
Post,
Query,
} from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { ZodCustomPipe } from '@your-org/server-utils';
import { {{FeatureName}}Service } from './{{featureName}}.service';
import {
Create{{FeatureName}}Dto,
Create{{FeatureName}}Schema,
Update{{FeatureName}}Dto,
Update{{FeatureName}}Schema,
FindAll{{FeatureName}}QueryDto,
FindAll{{FeatureName}}QuerySchema,
} from './dto/{{featureName}}.dto';
@ApiTags('{{featureName}}')
@Controller('{{featureName}}')
export class {{FeatureName}}Controller {
constructor(private readonly service: {{FeatureName}}Service) {}
@Post()
async create(
@Body(new ZodCustomPipe(Create{{FeatureName}}Schema))
dto: Create{{FeatureName}}Dto,
) {
return this.service.create(dto);
}
@Get()
async findAll(
@Query(new ZodCustomPipe(FindAll{{FeatureName}}QuerySchema))
query: FindAll{{FeatureName}}QueryDto,
) {
return this.service.findAll(query);
}
@Get(':id')
async findOne(@Param('id') id: string) {
return this.service.findOne(id);
}
@Patch(':id')
async update(
@Param('id') id: string,
@Body(new ZodCustomPipe(Update{{FeatureName}}Schema))
dto: Update{{FeatureName}}Dto,
) {
return this.service.update(id, dto);
}
@Delete(':id')
async remove(@Param('id') id: string) {
return this.service.remove(id);
}
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |