Nestjs database

From HoangNguyen0403/agent-skills-standard · View interactive version

Nestjs database is an AI agent skill from the GitHub repository HoangNguyen0403/agent-skills-standard. Implement data access patterns, Scaling, Migrations, and ORM selection in NestJS. Use when implementing TypeORM/Prisma repositories, migrations, or database patterns in NestJS.

How to use this skill

Skill file

NestJS Database Standards

**Priority: P0 (CRITICAL)**

Selection Strategy

See references/persistence_strategy.md for database selection matrix and scaling patterns (Connection Pooling, Sharding).

Patterns

Configuration (TypeORM)

Migrations

Best Practices

  1. Pagination: Mandatory. Use limit/offset or cursor-based pagination.
  2. Indexing: Define indexes in code (decorators/schema) for frequently filtered columns (where, order by).
  3. Transactions: Use QueryRunner (TypeORM) or $transaction (Prisma) for all multi-step mutations to ensure atomicity.

Anti-Patterns

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.