prisma-client-api

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

Updated May 23, 2026
One-click install
npx skills add https://github.com/kveperedo/website --skill prisma-client-api-kveperedo
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-client-api
Source: https://github.com/kveperedo/website/tree/main/.agents/skills/prisma-client-api
Command: npx skills add https://github.com/kveperedo/website --skill prisma-client-api-kveperedo

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 organized, example-rich reference so you can write accurate database queries without hunting through documentation. ## Core Features & Use Cases - Complete Query Reference: Covers all model query methods including findUnique, findMany, create, update, upsert, delete, count, aggregate, and groupBy with return types. - Filtering and Relations: Documents scalar, logical, string, JSON, and array filter operators plus relation filters (some, every, none, is) and nested writes. - Transactions and Raw SQL: Explains sequential and interactive transactions, isolation levels, and safe $queryRaw/$executeRaw usage with SQL injection prevention. - Use Case: When building a finance dashboard endpoint that needs paginated transactions filtered by date range with related category data, consult this Skill to compose the correct findMany call with where, include, orderBy, and cursor pagination. ## Quick Start Ask the AI to write a Prisma query that finds all published posts by a specific author, ordered by creation date with pagination, and it will apply the patterns from this reference.

Frequently Asked Questions about prisma-client-api

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

FAQPage Schema
How do I filter records with Prisma Client findMany?▼

Use the where option with filter operators like equals, contains, gt, lt, in, and logical operators AND, OR, NOT. Combine multiple conditions for implicit AND, or nest OR and NOT blocks for complex logic.

How to use transactions in Prisma Client?▼

Prisma supports sequential transactions via an array passed to $transaction, and interactive transactions via an async callback receiving a scoped tx client. Interactive transactions support conditional logic, dependent operations, and options like maxWait, timeout, and isolationLevel.

What is the difference between select and include in Prisma?▼

select returns only the specified scalar fields, while include adds related records to the full default field set. You cannot combine select and omit on the same query, but select and include can be nested within relation blocks.

Does Prisma Client support raw SQL queries?▼

Yes, $queryRaw executes SELECT statements with typed results and $executeRaw runs INSERT, UPDATE, or DELETE returning affected counts. Template literals parameterize values automatically; avoid $queryRawUnsafe with concatenated user input to prevent SQL injection.

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 the cursor record itself.

When should I use findUniqueOrThrow instead of findUnique?▼

Use findUniqueOrThrow when a missing record is an error condition, since it throws PrismaClientKnownRequestError instead of returning null. This is especially useful inside interactive transactions where the throw triggers an automatic rollback.