module-create

module-create is a command for coding agents from smicolon/ai-kit. It costs 14 tokens per session (2,208 once invoked), scanned A, original, MIT.

A NestJS module creator that builds modules with entities, services, controllers, DTOs, and consistent import and database-field conventions.

In plain words
What is it for?
Use it to create backend modules for resources such as users, including database entities, API controllers, business services, and request data types.
Why use it?
It removes the repetitive setup needed to start a well-organized NestJS feature and helps keep modules structurally consistent.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/smicolon/ai-kit/module-create
Clone the repo
git clone --depth 1 https://github.com/smicolon/ai-kit

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for module-create

README.md
[![agentmods](https://agentmods.dev/badge/commands/smicolon/ai-kit/module-create.svg)](https://agentmods.dev/commands/smicolon/ai-kit/module-create)
Your own site
<a href="https://agentmods.dev/commands/smicolon/ai-kit/module-create"><img src="https://agentmods.dev/badge/commands/smicolon/ai-kit/module-create.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,208 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00014 $0.02208
Opus 5 $0.00007 $0.01104
Sonnet 5 $0.00003 $0.00442
Haiku 4.5 $0.00001 $0.00221

Measured yesterday against content hash ece5cd450f9f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

module-create scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packs/nestjs/commands/module-create.md · 370 lines

How it starts

The opening of the file, as written. The whole thing — 370 lines — stays where its author put it; the contents beside it link to each section on GitHub.

NestJS Module Creation

You are a NestJS module creation specialist. Your task is to create a complete NestJS module that strictly follows clean architecture and NestJS modular standards.

Core Requirements

Import Pattern (CRITICAL)

ALWAYS use absolute imports from barrel exports:

// ✅ CORRECT - Absolute imports from barrel exports
import { User } from 'src/users/entities'
import { UsersService } from 'src/users/services'
import { CreateUserDto } from 'src/users/dto'

// ❌ WRONG - Relative imports
import { User } from './entities/user.entity'
import { User } from '../entities'

Standard Entity Fields (MANDATORY)

Every entity MUST include:

import {
  Entity,
  PrimaryGeneratedColumn,
  Column,
  CreateDateColumn,
  UpdateDateColumn,
  DeleteDateColumn
} from 'typeorm'

@Entity('table_name')
export class YourEntity {
  @PrimaryGeneratedColumn('uuid')
  id: string

  @CreateDateColumn()
  createdAt: Date

  @UpdateDateColumn()
  updatedAt: Date

  @DeleteDateColumn()
  deletedAt?: Date

  // Your custom fields here
}

Module Structure

Every module needs these files:

src/module-name/
├── index.ts                 # Barrel export (REQUIRED)
├── module-name.module.ts
├── entities/
│   ├── index.ts            # Barrel export
│   └── entity-name.entity.ts
├── dto/
│   ├── index.ts            # Barrel export
│   ├── create-entity.dto.ts
│   └── update-entity.dto.ts
├── services/
│   ├── index.ts            # Barrel export
│   └── module-name.service.ts
├── controllers/
│   ├── index.ts            # Barrel export
│   └── module-name.controller.ts
└── guards/ (if needed)
    ├── index.ts
    └── custom.guard.ts

Workflow

  1. Understand Requirements: Ask user for:

    • Module name and purpose
    • Entity fields needed
    • API endpoints (CRUD operations)
    • Access control needs
  2. Generate Files: Create all necessary files with:

    • Entity with standard fields
    • DTOs with validation
    • Service with business logic
    • Controller with guards
    • Module configuration
    • Barrel exports

Read the full file on GitHub · 370 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 370 lines · 14 tokens per session scan A ece5cd450f9f

Subscribe to this mod's changes

module-create is a command published in the GitHub repository smicolon/ai-kit (6 stars, last pushed yesterday), licensed MIT. It adds 14 tokens to every session and 2,208 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.