new-module

Scaffolds layered TypeScript feature modules with controllers, services, repositories, and Jest tests.

Updated Apr 2, 2026
One-click install
npx skills add https://github.com/nico0695/ai-tools --skill new-module-nico0695
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: new-module
Source: https://github.com/nico0695/ai-tools/tree/main/projects/slack-bot/skills/new-module
Command: npx skills add https://github.com/nico0695/ai-tools --skill new-module-nico0695

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Manually creating a new feature module in the slack-bot project requires writing many boilerplate files across multiple layers and remembering project-specific conventions, which is slow and error-prone. ## Core Features & Use Cases - Full Layered Scaffolding: Generates the Slack controller, Express web controller, service, TypeORM data source, entity, shared interfaces, and constants for a new domain module. - Convention Enforcement: Applies project rules such as singleton patterns, private #fields, module loggers, GenericResponse wrappers, and repository-throws/service-catches error handling. - Test Generation: Produces Jest test templates for the web controller and service layers with mocked dependencies. - Use Case: Ask for a new "reminders" module and receive the complete directory structure under src/modules/reminders/ plus the entity file, ready to register in src/app.ts. ## Quick Start Create a new feature module called bookmarks for the slack-bot project following the standard layered architecture.

Frequently Asked Questions about new-module

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

FAQPage Schema
How do I create a new feature module in a TypeScript Slack bot project?▼

Provide a module name such as bookmarks or reminders, and the scaffold generates the controller, service, data source, entity, interfaces, constants, and tests under src/modules/. You then register the controllers and routes in src/app.ts.

What files are generated when scaffolding a new module?▼

The scaffold creates a Slack controller, an Express web controller, a service class, a TypeORM data source repository, shared interfaces and constants, Jest test files, and an entity file under src/entities/.

Does the module need manual TypeORM entity registration?▼

No manual registration is needed. Entities are auto-loaded via a glob pattern matching src/entities/*{.ts,.js}, so placing the entity file in that directory is sufficient.

How is error handling structured between services and repositories?▼

Data source methods throw errors on failure, while service methods wrap calls in try/catch and return a GenericResponse object with either data or an error message. Services never throw to their callers.

What testing framework do the generated module tests use?▼

The generated tests use Jest with mocked dependencies. The web controller test mocks the auth middleware decorators and service layer, while the service test mocks the data source repository.