typeorm-patterns

Enforce TypeORM implementation patterns for NestJS backend projects.

3|3|Updated Jan 18, 2026
One-click install
npx skills add https://github.com/CodySwannGT/lisa --skill typeorm-patterns
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: typeorm-patterns
Source: https://github.com/CodySwannGT/lisa/tree/main/plugins/lisa-nestjs/skills/typeorm-patterns
Command: npx skills add https://github.com/CodySwannGT/lisa --skill typeorm-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures consistent and maintainable database interactions within a NestJS application by enforcing specific patterns for TypeORM configuration, entity design, and observability.

Core Features & Use Cases

  • Standardized Configuration: Enforces TypeOrmModule.forRootAsync with dataSourceFactory, SnakeNamingStrategy, and disables synchronize.
  • Patterned Entities: Mandates extending TimestampedEntity, using UUIDs, requiring column comments, and indexing foreign keys.
  • Observability: Integrates a custom TypeOrmXRayLogger for tracing database operations.
  • Use Case: When creating new database entities or modifying existing ones, this Skill guides developers to adhere to best practices, preventing common pitfalls and ensuring a robust data layer.

Quick Start

Use the typeorm-patterns skill to create a new TypeORM entity that extends TimestampedEntity and includes required column comments and foreign key indexing.

Frequently Asked Questions about typeorm-patterns

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

FAQPage Schema
How do I configure TypeORM in a NestJS project to use a custom naming strategy?▼

To configure TypeORM in NestJS, use `TypeOrmModule.forRootAsync` with a `dataSourceFactory` and apply `SnakeNamingStrategy` to standardize database column naming conventions across your application.

What's the best way to structure TypeORM entities for maintainability in NestJS?▼

Structure TypeORM entities by extending a base `TimestampedEntity`, using UUIDs for primary keys, adding column comments, and indexing foreign keys to ensure a maintainable and robust data layer.

How do I trace database operations in TypeORM for observability?▼

Trace database operations in TypeORM by integrating a custom logger like `TypeOrmXRayLogger`, which captures and records database interactions for enhanced observability and debugging.

Why should I disable synchronize in TypeORM for a NestJS backend?▼

Disabling `synchronize` in TypeORM prevents automatic schema alterations in production environments, avoiding unintended data loss or structural drift in your NestJS database schema.

Do I need to use UUIDs for TypeORM entity design in NestJS?▼

Using UUIDs for TypeORM entity design is mandated by this pattern to ensure unique identification across distributed systems and prevent predictable sequential ID exposure in your NestJS backend.

Can I use TypeORM patterns for NestJS module setup without foreign key indexing?▼

No, TypeORM patterns for NestJS require indexing foreign keys to optimize query performance and enforce relational database best practices within your entity design structure.