create-module

Scaffold business modules with SQL and TS templates and register them in tables.ts.

14|5|Updated Jul 9, 2024
One-click install
npx skills add https://github.com/sail-sail/nest --skill create-module-sail-sail
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-module
Source: https://github.com/sail-sail/nest/tree/main/codegen/.github/skills/create-module
Command: npx skills add https://github.com/sail-sail/nest --skill create-module-sail-sail

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create new business modules by scaffolding boilerplate (SQL + TS) and wiring them into the central registry, reducing manual setup when expanding the codebase.

Core Features & Use Cases

  • Scaffold module directory with SQL and TS templates for {mod}.
  • Register the new module in the central configuration so it is picked up by the system.
  • Simplify expansion workflows when adding modules like ec or crm.

Quick Start

Create the module under src/tables/{mod}/ with {mod}.sql and {mod}.ts, then register it in src/tables/tables.ts.

Frequently Asked Questions about create-module

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

FAQPage Schema
How do I scaffold a new business module with SQL and TypeScript templates?

Scaffolding a new business module requires creating a directory under src/tables/{mod}/ with {mod}.sql and {mod}.ts templates, then registering it in src/tables/tables.ts to ensure the system picks it up.

What is the standard structure for adding new modules like ec or crm to a code generation repository?

The standard structure for adding modules like ec or crm requires generating both a {mod}.sql file and a {mod}.ts file inside src/tables/{mod}/, followed by updating the central registration in src/tables/tables.ts.

How do I register a new TypeScript module in a central configuration file?

Registering a new TypeScript module involves updating the central configuration file at src/tables/tables.ts after generating the required SQL and TS templates, ensuring the new module is properly wired into the system.

Can I use this scaffolding workflow to generate only SQL files without TypeScript?

This scaffolding workflow enforces a standard structure requiring both {mod}.sql and {mod}.ts files. It does not support generating only SQL without the corresponding TypeScript templates for your business modules.

Why does adding a new module require updating src/tables/tables.ts?

Updating src/tables/tables.ts is required because it serves as the central registration file. Wiring the new module into this registry ensures the code generation repository recognizes and picks up the newly scaffolded SQL and TS templates.

What's the best way to reduce manual boilerplate setup when expanding a TypeScript codebase with new modules?

The best way to reduce manual boilerplate setup is to automate module scaffolding, which generates the required SQL and TS templates and wires them into the central registry, enforcing a standard structure across the codebase.