prisma-client-api

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

Updated Sep 17, 2026
One-click install
npx skills add https://github.com/team-zerolatency/cfta --skill prisma-client-api-team-zerolatency
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-client-api
Source: https://github.com/team-zerolatency/cfta/tree/main/packages/database/.windsurf/skills/prisma-client-api
Command: npx skills add https://github.com/team-zerolatency/cfta --skill prisma-client-api-team-zerolatency

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, and mistakes lead to runtime errors or inefficient database access. ## Core Features & Use Cases - Model Query Reference: Covers CRUD methods like findUnique, findMany, create, update, upsert, delete, plus aggregation and groupBy operations. - Filtering and Relations: Documents scalar and logical filter operators, relation filters (some, every, none, is), and nested write patterns. - Transactions and Raw SQL: Explains sequential and interactive $transaction patterns, isolation levels, and safe $queryRaw/$executeRaw usage with SQL injection prevention. - Use Case: When building a Next.js API route that needs paginated, filtered user queries with related posts inside a transaction, consult this reference to write correct, type-safe Prisma Client code. ## Quick Start Ask the AI to write a Prisma Client query that finds users filtered by role with their published posts included and paginated by cursor.

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 precise filtering, and use relation filters like some, every, and none for related records.

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 transaction-scoped client. Interactive transactions support conditional logic, rollback on thrown errors, and options like maxWait, timeout, and isolationLevel.

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 to prevent SQL injection; avoid $queryRawUnsafe with untrusted input.

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

select returns only the specified scalar fields and relations, while include adds all scalar fields plus the specified relations. You cannot combine select and omit in the same query, but include can be nested inside select for fine-grained control.

Why does Prisma Client need a driver adapter in the constructor?▼

The SQL provider workflow requires passing a driver adapter such as PrismaPg with a connectionString to the PrismaClient constructor. The adapter handles the actual database connection, and the client can also be configured with logging, errorFormat, and transaction defaults.