SKILL

prisma-patterns

Prisma ORM patterns for TypeScript backends — schema design, query optimization, transactions, pagination, and critical traps like updateMany returning count not records, $transaction timeouts, migrate dev resetting the DB, @updatedAt skipped on bulk writes, and serverless connection exhaustion. Use when writing a Prisma schema or query, or debugging transactions, migrations, or serverless connection limits.

Target: Design & content creation. Automatically collected · unverified.

Excerpt from the author’s documentation

Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.

Read the original English text

Topics in the source

  • Prisma Patterns
  • When to Activate
  • Core Concepts
  • ID Strategy
  • Schema Defaults
  • include vs select
  • Transaction Form Selection
  • PrismaClient Singleton

Production patterns and non-obvious traps for Prisma ORM in TypeScript backends. Check your version before applying patterns. The Prisma API surface has evolved across major releases: bash npx prisma --version Notable API differences across versions: - relationJoins can load relations via JOIN rather than separate queries, but may cause row explosion on large 1:N relations or deep include — benchmark both approaches - omit field modifier and prisma.$extends Client Extensions API were added - Newer installs: the package may be named prisma instead of @prisma/client; PrismaClient may require a driver adapter (e.g. @prisma/adapter-pg); datasource.url may live in prisma.config.ts instead of schema.prisma - CLI commands (migrate dev, migrate deploy, generate) are unchanged across versions Designing or modifying Prisma schema models and relations Writing queries, transactions, or pagination logic Using updateMany, deleteMany, or any bulk operation Running or planning database migrations Deploying to serverless environments (Vercel, Lambda, Cloudflare Workers) Implementing soft delete or multi-tenant row filtering | Strategy | Use When | Avoid When | |---|---|---| | @default(cuid()) | Def

This is an excerpt. Refer to the complete source and its current requirements.

Source repository
affaan-m/ECC
Source file
pi/core/skills/prisma-patterns/SKILL.md
Fixed revision
d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
Read the complete original documentation ↗

Requirements

  • Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.

A small first task

先阅读原作者说明,再决定是否在自己的 AI 工具中使用。

Instructions for your AI tool

Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.

Sources and evidence

This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.

Author: affaan-m/ECC · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T15:01:43.181Z.

Categories are inferred from names, descriptions and paths. They do not establish compatibility.

License and attribution

MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.

Original license ↗

Synchronization, copying and user-reported success do not mark a resource as runtime-tested.

Limitations and notes

  • Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.