prisma-client-api

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

Updated Jul 30, 2026
One-click install
npx skills add https://github.com/iukumarasiri-dev/JobNest-AI --skill prisma-client-api-iukumarasiri-dev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-client-api
Source: https://github.com/iukumarasiri-dev/JobNest-AI/tree/main/job-assistant/.windsurf/skills/prisma-client-api
Command: npx skills add https://github.com/iukumarasiri-dev/JobNest-AI --skill prisma-client-api-iukumarasiri-dev

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 options. This Skill gives you an on-demand reference so you can write accurate database queries without leaving your workflow to search documentation. ## Core Features & Use Cases - Model Query Reference: Covers all CRUD methods including findUnique, findMany, create, update, upsert, delete, count, aggregate, and groupBy with return types. - Filtering and Relations: Documents scalar, logical, relation, array, and JSON filter operators plus nested writes like connect, connectOrCreate, and disconnect. - 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, and include their published posts. Reference this Skill to compose the correct findMany call with where, orderBy, take, cursor, and a filtered include. ## Quick Start Ask the AI to write a Prisma query that finds all admin users with their published posts, ordered by creation date and limited to ten results.

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, in, gt, and lt, combined with logical operators AND, OR, and NOT. For example, where: { role: 'ADMIN', email: { contains: '@prisma.io' } } filters by multiple conditions.

How to use transactions in Prisma Client?▼

Prisma supports sequential transactions via prisma.$transaction([...]) for batched operations and interactive transactions via prisma.$transaction(async (tx) => {...}) for dependent logic. Interactive transactions accept maxWait, timeout, and isolationLevel options.

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

select returns only the specified scalar fields, while include loads related records alongside all scalar fields. You cannot combine select and omit on the same query, but select and include can be nested within relation clauses.

Does Prisma Client support raw SQL queries?▼

Yes, use $queryRaw for SELECT queries with typed results and $executeRaw for 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 cursor pagination?▼

Combine take, skip, and cursor with orderBy on a unique field. Fetch the first page with take: 10, then pass cursor: { id: lastId } with skip: 1 to retrieve the next page without offset scanning.

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.