prisma-client-api

Provides Prisma Client API reference for database queries, filters, relations, and transactions.

1|Updated Jun 18, 2026
One-click install
npx skills add https://github.com/Sima-Malla/Digital_Menu --skill prisma-client-api-sima-malla
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-client-api
Source: https://github.com/Sima-Malla/Digital_Menu/tree/main/my-app/.windsurf/skills/prisma-client-api
Command: npx skills add https://github.com/Sima-Malla/Digital_Menu --skill prisma-client-api-sima-malla

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing correct Prisma Client queries requires knowing dozens of methods, filter operators, relation patterns, and transaction APIs. This Skill gives you an authoritative reference so you can write accurate database queries without guessing syntax or digging through external docs. ## Core Features & Use Cases - Complete CRUD Reference: Covers findUnique, findMany, create, update, upsert, delete, aggregations, and groupBy with typed examples. - Filtering and Relations: Documents scalar operators, logical operators (AND/OR/NOT), relation filters (some/every/none), and nested writes. - Transactions and Raw SQL: Explains sequential and interactive $transaction patterns, isolation levels, and safe $queryRaw/$executeRaw usage with SQL injection prevention. - Use Case: You need to paginate users, filter by role, include their published posts, and wrap a balance transfer in a transaction. This Skill provides the exact query shapes and transaction code to implement it correctly. ## Quick Start Ask the AI to write a Prisma query that finds all admin users with their published posts, ordered by creation date with cursor pagination.

Frequently Asked Questions about prisma-client-api

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

FAQPage Schema
How do I write Prisma Client queries with filters and relations?

Use findMany with a where clause for filters and include or select for relations. For example, filter users by role with where: { role: 'ADMIN' } and load related posts with include: { posts: true }. Filter operators like contains, gt, and in handle complex conditions.

How to use Prisma transactions for multiple database operations?

Use prisma.$transaction with an array for sequential operations or an async callback for interactive transactions with dependent logic. Interactive transactions support conditional checks and rollback automatically if any operation throws. You can set maxWait, timeout, and isolationLevel options.

Does Prisma Client support raw SQL queries safely?

Yes, $queryRaw and $executeRaw use tagged templates that parameterize interpolated values, preventing SQL injection. Avoid $queryRawUnsafe with string concatenation of user input. Use Prisma.sql and Prisma.join to build dynamic queries safely.

What is the difference between select, include, and omit in Prisma?

select returns only specified fields, include adds related records to the result, and omit excludes specific fields like passwords. You cannot combine select and omit in the same query. Both select and include support nested relation options and filtering.

How do I paginate results with Prisma Client?

Use take and skip for offset pagination, or cursor with take for cursor-based pagination. For cursor pagination, pass the last record's unique field as cursor and skip: 1 to exclude it. Negative take values return records from the end.

Why should I use a singleton pattern for PrismaClient in Next.js?

Next.js hot reloading in development creates new PrismaClient instances on each reload, exhausting database connections. Storing the client on globalThis ensures a single instance persists across reloads while production creates one instance per process.