prisma-client-api

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

2|1|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/zester4/zilmate --skill prisma-client-api-zester4
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-client-api
Source: https://github.com/zester4/zilmate/tree/main/.agents/skills/prisma-client-api
Command: npx skills add https://github.com/zester4/zilmate --skill prisma-client-api-zester4

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 & Relations: Documents scalar operators, logical operators (AND/OR/NOT), relation filters (some/every/none), and nested writes. - Transactions & Raw SQL: Explains sequential and interactive $transaction patterns plus 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 an interactive transaction — this Skill provides the exact patterns for each step. ## Quick Start Ask the AI to write a Prisma query that finds all verified users with at least one published post, 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 a Prisma findMany query with filters?

Use prisma.model.findMany with a where clause containing filter operators like equals, contains, in, gt, or lt. Combine conditions with AND, OR, and NOT, and add orderBy, take, and skip for sorting and pagination.

How to use Prisma transactions for multiple operations?

Use prisma.$transaction with an array for sequential independent operations, or pass an async function for interactive transactions where later operations depend on earlier results. Interactive transactions support maxWait, timeout, and isolationLevel options.

What is the difference between select and include in Prisma?

select returns only the specified scalar fields, while include adds full related records to the result. You can nest select inside include or vice versa, but select and omit cannot be used together on the same query.

Does Prisma Client support raw SQL queries safely?

Yes, use $queryRaw and $executeRaw with tagged template literals so user input is automatically parameterized. Avoid $queryRawUnsafe with string concatenation, which creates SQL injection risk; use Prisma.sql and Prisma.join for dynamic fragments.

How do I filter Prisma queries by related records?

Use relation filters in the where clause: some matches records with at least one matching relation, every requires all to match, and none requires zero matches. For one-to-one relations, use is and isNot.

When should I use upsert instead of create in Prisma?

Use upsert when a record may already exist and you want to update it or create it otherwise, keyed on a unique field. It takes where, update, and create arguments, avoiding separate existence checks and race conditions.