create-module
Create a new feature module following Clean Architecture structure. Use when adding a new business domain or feature module to the project.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create a new feature module following Clean Architecture structure. Use when adding a new business domain or feature module to the project.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Analyze NestJS project architecture against Clean Architecture, DDD, and best practices. Use when reviewing code structure, checking layer boundaries, validating architectural patterns, or auditing module compliance.
Analyze code quality including ESLint, Prettier, tests, TypeScript, and NestJS best practices. Use when reviewing code quality, checking test coverage, or auditing for best practices.
Quick reference guide for architectural decisions and patterns in Clean Architecture + DDD + Event-Driven systems. Use for learning or when making architectural decisions.
Create a domain event and its handler following DDD patterns. Use when you need to publish domain events for asynchronous reactions.
Create a new domain entity or aggregate root following DDD patterns. Use when modeling business entities with identity and lifecycle.
Create repository adapter with MongoDB schema following the ports & adapters pattern. Use when adding persistence for domain entities.
| name | create-module |
| description | Create a new feature module following Clean Architecture structure. Use when adding a new business domain or feature module to the project. |
| argument-hint | ["module-name"] |
| disable-model-invocation | true |
Create a new feature module named "$0" following the Clean Architecture pattern.
Create the following directory structure in src/modules/$0/:
$0/
├── domain/
│ ├── $0.ts # Main aggregate
│ └── events/ # Domain events
│ └── .gitkeep
├── application/
│ ├── ports/ # Interface definitions
│ │ └── $0.port.ts
│ ├── events/ # Event handlers
│ │ └── handlers/
│ │ └── .gitkeep
│ ├── useCases/ # Use cases
│ │ └── .gitkeep
│ └── ms/ # Microservice entry points
│ ├── http/
│ │ └── .gitkeep
│ ├── websocket/
│ │ └── .gitkeep
│ └── tcp/
│ └── .gitkeep
├── adapters/ # Port implementations
│ └── repository/
│ ├── $0.service.ts
│ ├── $0.adapter.ts
│ ├── $0.schema.ts
│ └── $0.module.ts
└── infrastructure/ # NestJS wiring
└── $0.module.ts
Follow these requirements:
Create all files with proper imports and basic structure based on the Order module example.