create-module

Generate a Clean Architecture feature module skeleton in a NestJS project.

13|1|Updated Jun 28, 2023
One-click install
npx skills add https://github.com/jovicon/nestjs-clean-architecture-event-driven-template --skill create-module-jovicon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-module
Source: https://github.com/jovicon/nestjs-clean-architecture-event-driven-template/tree/main/.claude/skills/create-module
Command: npx skills add https://github.com/jovicon/nestjs-clean-architecture-event-driven-template --skill create-module-jovicon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create a complete feature module skeleton following Clean Architecture for a given domain, eliminating repetitive boilerplate and ensuring a consistent structure across the codebase.

Core Features & Use Cases

  • Structured module skeleton: Generates the domain, application, adapters, and infrastructure layers with a clear folder layout and placeholder files.
  • Enforced layering: Adheres to dependency rules (Infrastructure → Adapters → Application → Domain) and standard naming conventions.
  • Extensible scaffolding: Prepares domain entities, ports, use cases, and NestJS wiring to be extended as the project evolves.

Quick Start

Provide the module name when prompted to generate the structure.

Frequently Asked Questions about create-module

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a NestJS module with Clean Architecture?

To scaffold a NestJS module with Clean Architecture, provide a module name and the tool generates a complete skeleton under src/modules/<name>. It creates domain, application, adapters, and infrastructure layers with placeholder files and NestJS wiring.

What is the folder structure for a domain-driven NestJS feature module?

A domain-driven NestJS feature module uses a strict layered folder structure separating domain, application, adapters, and infrastructure. This enforces dependency rules where infrastructure depends on adapters, which depend on application, ultimately isolating domain logic from framework specifics.

Can I generate use cases and ports automatically for a NestJS project?

Yes, you can generate use cases and ports automatically. The scaffolding process prepares placeholder files for domain entities, ports, use cases, and adapters, ensuring the feature module is ready to be extended with domain-driven logic.

Does this Clean Architecture scaffolding enforce dependency rules?

Yes, this Clean Architecture scaffolding enforces strict dependency rules across layers. It structures the module so Infrastructure points to Adapters, Adapters point to Application, and Application points to Domain, ensuring no leakage of framework specifics into domain logic.

What's the best way to eliminate boilerplate in a NestJS Clean Architecture project?

The best way to eliminate boilerplate is using a module scaffolding tool that automatically generates conventional directory structures and placeholder files. This ensures consistent layering and naming conventions across the codebase without manual repetitive folder creation.