- Home
- Skills
- Ehtbanton
- Claudeskillsrepo
- Nestjs Module Generator
nestjs-module-generator_skill
- TypeScript
0
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill ehtbanton/claudeskillsrepo --skill nestjs-module-generator- SKILL.md748 B
Overview
This skill generates complete NestJS modules ready for immediate use in a TypeScript project. It produces module, controller, service, DTO, and entity files following NestJS conventions and best practices. Use simple trigger phrases like "create nestjs module" or "generate nest module" to produce a full resource scaffold. The output is valid TypeScript tailored for common CRUD patterns.
How this skill works
When invoked, the skill creates a set of files: *.module.ts, *.controller.ts, *.service.ts, *.dto.ts, and an entity file. Each file follows NestJS structure and wiring: controllers inject services, services handle business logic, DTOs validate and type input, and entities define persistence models. The generated code is idiomatic TypeScript that integrates with typical NestJS setups (providers, exports, imports).
When to use it
- Scaffolding a new resource quickly (e.g., orders, users, products).
- Starting a CRUD endpoint with DTO validation and persistence models.
- Prototyping APIs to validate domain models and request/response shapes.
- Standardizing module layout across a NestJS codebase.
- Onboarding new projects to ensure consistent file patterns.
Best practices
- Provide the resource name and desired fields to generate meaningful DTOs and entities.
- Review and adapt generated entity decorators for your ORM (TypeORM, Sequelize, Prisma).
- Add explicit validation decorators in DTOs and adjust service stubs to match business rules.
- Keep controller methods thin; move logic to services and inject repositories via providers.
- Run static type checks and linting after generation to align with project config.
Example use cases
- Create NestJS module for orders with id, customerId, total, and status fields.
- Generate nest module for a user resource including create/update DTOs and a User entity.
- Nest crud module for products with search and pagination-ready controller methods.
- Generate a module scaffold during sprint planning to speed backend implementation.
FAQ
Yes. The generator produces common entity shapes; update decorators and types to match your chosen ORM and database schema.
Does the skill wire up routing and providers?
Generated modules include standard NestJS imports, controllers, and providers. You still need to register the module in your application module if not automated.
Will DTOs include validation?
DTOs include common validation decorators. Adjust constraints and add custom validators as needed for business rules.