prisma

Implement Prisma 7 ORM best practices for schemas, migrations, and queries.

15|2|Updated May 23, 2026
One-click install
npx skills add https://github.com/VKirill/antigravity-for-claude-code --skill prisma-vkirill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma
Source: https://github.com/VKirill/antigravity-for-claude-code/tree/main/skills/prisma
Command: npx skills add https://github.com/VKirill/antigravity-for-claude-code --skill prisma-vkirill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents brittle Prisma 7 setups and production incidents by guiding you through correct schema modeling, migrations, client generation, and high-stakes query and transaction patterns.

Core Features & Use Cases

  • Prisma 7 schema + modeling: define models, relations, indexes, enums, and safe defaults for production workloads.
  • Migrations with drift protection: generate and deploy migrations safely using prisma.config.ts, shadow DB, and custom SQL when Prisma can’t express constraints.
  • Correct client usage at runtime: write efficient queries (select vs include), safe raw SQL ($queryRaw), robust transactions ($transaction + P2034 retry), and edge/runtime-friendly adapters (PrismaPg/Neon/LibSQL/D1).
  • Operational hardening: troubleshoot generated client issues, pool exhaustion (P2024), ESM/CJS mismatch, adapter peer-dep mismatches, and common anti-patterns.

Quick Start

Ask your AI assistant: “Help me migrate my existing Prisma 6 project to Prisma 7 by moving datasource URL into prisma.config.ts, wiring the correct driver adapter, and updating the generator output/imports.”

Frequently Asked Questions about prisma

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

FAQPage Schema
How do I migrate my existing Prisma project to Prisma 7 and configure prisma.config.ts?

To migrate to Prisma 7, move your datasource URL into prisma.config.ts, wire the correct driver adapter, and update generator output paths and imports to ensure type-safe client generation.

How do I resolve database drift and pool exhaustion errors in Prisma ORM?

Resolve Prisma database drift and pool exhaustion (P2024) by applying migration best practices with a shadow DB, and troubleshooting driver adapter peer-dependency mismatches and runtime connection limits.

What is the best way to write safe raw SQL and transactions in Prisma 7?

Write safe raw SQL and transactions in Prisma 7 by applying guardrails for $queryRaw, using $transaction with P2034 retry logic, and ensuring correct driver adapter wiring for your runtime.

Does Prisma 7 work with edge adapters and serverless runtimes like D1 and LibSQL?

Yes, Prisma 7 works with edge adapters and serverless runtimes by wiring edge-friendly driver adapters like PrismaPg, Neon, LibSQL, and D1 to prevent ESM/CJS mismatch and adapter version incompatibilities.

When should I use select vs include for query optimization in Prisma?

Use select versus include for Prisma query optimization to enforce disciplined data fetching, bounded pagination, and safe defaults, preventing over-fetching and production performance bottlenecks.

Why is my generated Prisma client missing or throwing ESM/CJS mismatch errors?

A missing Prisma client or ESM/CJS mismatch error occurs when generator output paths are misconfigured in prisma.config.ts or when driver adapter peer-dependencies conflict with your TypeScript runtime.