prisma-client-api

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

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

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, and mistakes lead to runtime errors or inefficient database access. ## 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 and logical filter operators, relation filters (some, every, none, is), and nested write patterns 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: When building an Express endpoint that paginates users with filtered posts inside a transaction, consult the references to compose the correct query options and transaction client usage. ## Quick Start Ask the AI to write a Prisma query that finds all admin users with their published posts, paginated and ordered by creation date.

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 and pagination?▼

Use findMany with the where option for filters, orderBy for sorting, and take/skip or cursor for pagination. Combine operators like contains, gte, and in with logical AND, OR, and NOT for complex conditions.

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 with dependent logic. Interactive transactions accept maxWait, timeout, and isolationLevel options.

Does Prisma Client support raw SQL queries safely?▼

Yes, $queryRaw and $executeRaw use tagged templates that parameterize interpolated values automatically, preventing SQL injection. Avoid $queryRawUnsafe with string concatenation, and use Prisma.raw only for trusted identifiers.

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. Both support nesting for relations, but select and omit cannot be used together on the same query.

Why does Prisma findUnique return null and how to handle it?▼

findUnique returns null when no record matches the unique field. Use findUniqueOrThrow instead to raise a PrismaClientKnownRequestError, which is useful inside transactions to trigger automatic rollback.