Skip to content
Back to skills

Api Feature Module

ASecurity

Generate NestJS feature module with CqrsModule, handler registration, and exports. Use when creating new feature modules or configuring CQRS dependencies.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
toolsbashapi

Works with

  • api

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill api-feature-module --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Feature Module?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Api Feature Module
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-api-feature-module/badge)](https://www.skillsdirectory.com/skills/david-li0406-api-feature-module)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: api-feature-module
description: Generate NestJS feature module with CqrsModule, handler registration, and exports. Use when creating new feature modules or configuring CQRS dependencies.
allowed-tools:
  - Read
  - Write
  - Edit
  - Glob
  - Grep
---

# Feature Module

## Purpose

Generate a NestJS feature module that imports `CqrsModule`, registers all command/query handlers, event handlers, and exports services and repositories for other modules to use.

## When to Use

- Creating new feature modules
- Setting up module dependencies
- Configuring CQRS module for a feature
- Organizing module providers and exports

## What It Generates

```
apps/api/src/modules/{feature}/{feature}.module.ts
```

## Patterns Enforced

### CqrsModule Import

All feature modules must import `CqrsModule` from `@nestjs/cqrs`:

- Enables CommandBus and QueryBus
- Enables EventBus for domain events
- Required for @CommandHandler, @QueryHandler, @EventsHandler decorators

### Provider Registration

- Command handlers registered as providers
- Query handlers registered as providers
- Event handlers registered as providers
- Services registered as providers
- Repositories registered as providers

### Exports

- Services exported for use by other modules
- Repositories exported for use by other modules
- Guards or interceptors if shared

## Usage Example

```bash
/skill feature-module --name=Users --commands='create,update,delete' --queries='get,list' --events='created,updated,deleted'
```

## Related Files

- [Feature CQRS](../feature-cqrs/SKILL.md) - Complete CQRS feature with module
- [API Controller](../api-controller/SKILL.md) - Generate controller for module

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…