prisma-client-api

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

Updated Jul 26, 2026
One-click install
npx skills add https://github.com/PrimotionStudio/turbo-repo-is-cool --skill prisma-client-api-primotionstudio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-client-api
Source: https://github.com/PrimotionStudio/turbo-repo-is-cool/tree/main/packages/db/.agents/skills/prisma-client-api
Command: npx skills add https://github.com/PrimotionStudio/turbo-repo-is-cool --skill prisma-client-api-primotionstudio

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, and transaction patterns, and mistakes lead to runtime errors or inefficient database access. ## Core Features & Use Cases - Model Query Reference: Covers all CRUD methods including findUnique, findMany, createManyAndReturn, upsert, and aggregate with return type documentation. - Filtering and Relations: Documents scalar operators, logical operators, relation filters (some, every, none), and nested write patterns. - Transactions and Raw SQL: Explains sequential and interactive $transaction patterns, isolation levels, and safe $queryRaw usage with SQL injection prevention. - Use Case: When building a Next.js API route that needs paginated user queries with filtered relations and a balance-transfer transaction, consult the references for exact syntax and best practices. ## Quick Start Ask the AI to write a Prisma query that finds all published posts with their authors, 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?

Use the where clause with operators like equals, contains, gt, lt, in, and logical combinators AND, OR, NOT. For relations, apply some, every, or none filters to match related records.

How to use transactions in Prisma Client?

Use prisma.$transaction with an array for sequential operations or an async callback for interactive transactions with dependent logic. Interactive transactions accept maxWait, timeout, and isolationLevel options.

Does Prisma Client support raw SQL queries?

Yes, $queryRaw runs SELECT queries with typed results and $executeRaw runs INSERT, UPDATE, DELETE returning affected counts. Template literals parameterize values automatically to prevent SQL injection.

How do I paginate results with Prisma findMany?

Use take and skip for offset pagination, or cursor with take for cursor-based pagination. A negative take value returns records from the end of the result set.

When should I use select versus include in Prisma?

Use select to return only specific scalar fields, and include to load full related records. Both support nesting, but select and omit cannot be combined in the same query.