Skip to content
affaan-m avatar

Prisma Patterns

Production patterns and traps for Prisma ORM in TypeScript backends, covering schema design through serverless connection limits.

CCM score
75 of 100
skills.sh installs
8.5K
GitHub stars
312.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers ID strategy, schema defaults, include versus select, transaction forms, client singletons, N+1 queries, and pagination
  • Includes runnable TypeScript examples for cursor pagination, soft delete, and DTO mapping, plus version checks via npx prisma --version
  • Flags traps such as updateMany returning a count rather than records, $transaction timeouts, and migrate dev resetting the database
  • Designed for backend teams writing Prisma schemas and queries, or debugging migrations and serverless connection exhaustion

Install

$ npx -y skills add affaan-m/ecc --skill prisma-patterns -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Prisma Patterns

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:

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

When to Activate

Details

Repository
github.com/affaan-m/ecc
Categories
Databases, Backend & APIs
First seen
Jul 14, 2026

Questions

What does the prisma-patterns skill cover?

The prisma-patterns skill gives Prisma ORM patterns for TypeScript backends, covering schema design, query optimization, transactions, and pagination. It also flags non-obvious traps such as updateMany returning a count instead of records, $transaction timeouts, migrate dev resetting the database, and serverless connection exhaustion.

How do I install the prisma-patterns skill?

Run npx -y skills add affaan-m/ecc --skill prisma-patterns -y in your project. This installs the skill from the affaan-m/ecc repository so your agent can apply Prisma patterns while writing schemas, queries and migrations.

Where does prisma-patterns rank among Databases skills?

prisma-patterns ranks in the top 100 of the Databases category on Claude Marketplaces. Related skills in that category include prisma-client-api, prisma-database-setup, prisma-cli and prisma-postgres, which cover neighboring Prisma topics.

When should I use prisma-patterns?

Use it when writing a Prisma schema or query, or when debugging transactions, migrations or serverless connection limits. It is aimed at production Prisma work in TypeScript backends.

More from affaan-m/ecc

All 257

Similar to Prisma Patterns

More Databases