generate-module

generate-module is a command for Cursor from phuoctrung-ppt/ai-sdlc-workflow. It costs 32 tokens per session (473 once invoked), scanned A, original, MIT.

A command for scaffolding a complete backend feature module using the project's existing conventions. It creates the parts commonly needed for an API feature, such as routes, business logic, data models, input schemas, and tests.

In plain words
What is it for?
Starting a backend feature with a module, controller, service, create/update schemas, database entity, service tests, and exports.
Why use it?
It removes repetitive setup work and helps keep new modules consistent with the codebase. It first checks project guidance so generated files go in the right place and follow the right framework patterns.

Command for Cursor

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/phuoctrung-ppt/ai-sdlc-workflow/generate-module
Clone the repo
git clone --depth 1 https://github.com/phuoctrung-ppt/ai-sdlc-workflow

Made for: Cursor.

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 generate-module

README.md
[![agentmods](https://agentmods.dev/badge/commands/phuoctrung-ppt/ai-sdlc-workflow/generate-module.svg)](https://agentmods.dev/commands/phuoctrung-ppt/ai-sdlc-workflow/generate-module)
Your own site
<a href="https://agentmods.dev/commands/phuoctrung-ppt/ai-sdlc-workflow/generate-module"><img src="https://agentmods.dev/badge/commands/phuoctrung-ppt/ai-sdlc-workflow/generate-module.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 473 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.00032 $0.00473
Opus 5 $0.00016 $0.00236
Sonnet 5 $0.00006 $0.00095
Haiku 4.5 $0.00003 $0.00047

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

Security

Grade A, and why

generate-module 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 3d ago.

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.

.cursor/commands/generate-module.md · 50 lines

What it actually says

Act as Backend Worker. Scaffold a complete feature module for: {feature_name}

  1. Run context-builder first:
    python3 .cursor/context/context-builder.py \
      --phase implement-backend --task "scaffold {feature_name} module" --agent backend-worker \
      --keywords "module,service,controller,scaffold"
    
  2. Obey Context Packet tiers — read tier2 backend/framework skill SKILL.md
  3. Read .memory/constraints.md and AGENTS.md §3 for backend app path

Module Location

Determined by AGENTS.md §3 — typically:

<backend_app_path>/src/modules/{feature_name}/

Files to Generate

Scaffold these files using your framework's conventions (names and structure from AGENTS.md §2):

File Purpose
{feature_name}.module.* Module/router registration
{feature_name}.controller.* Route handlers / endpoints
{feature_name}.service.* Business logic
dto/create-{feature_name}.* Create input schema/DTO
dto/update-{feature_name}.* Update input schema/DTO
entities/{feature_name}.* DB model / entity
{feature_name}.service.spec.* Unit tests for service layer
index.* Barrel export

Requirements

  • Input validation at boundary (framework's schema/pipe system from AGENTS.md §2)
  • Shared type contracts in the shared package (see AGENTS.md §3)
  • Auth guard on all routes — public routes explicitly marked (auth method from AGENTS.md §2)
  • Structured logger — no console.log
  • Unit tests with 70%+ service layer coverage
  • Compliance items from AGENTS.md §5 applied (multi-tenancy, GDPR, RBAC, etc.)
  • API docs annotations if the project uses them (check AGENTS.md §2)

Output complete file contents for each file.

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. 3d ago First seen · 50 lines · 32 tokens per session scan A e3a90f95b1db

Subscribe to this mod's changes

generate-module is a command published in the GitHub repository phuoctrung-ppt/ai-sdlc-workflow (2 stars, last pushed 17d ago), licensed MIT. It adds 32 tokens to every session and 473 once invoked, about $0.0002 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-08-31.