prisma-client-api

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

Updated Aug 10, 2026
One-click install
npx skills add https://github.com/AlvaroCG123/BancoAtividade --skill prisma-client-api-alvarocg123
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-client-api
Source: https://github.com/AlvaroCG123/BancoAtividade/tree/main/AtividadeBanco/.windsurf/skills/prisma-client-api
Command: npx skills add https://github.com/AlvaroCG123/BancoAtividade --skill prisma-client-api-alvarocg123

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 SQL injection risks. ## Core Features & Use Cases - Model Query Reference: Covers all CRUD methods including findUnique, findMany, createManyAndReturn, upsert, aggregate, and groupBy with return types. - Filtering and Relations: Documents scalar operators, logical operators (AND/OR/NOT), relation filters (some/every/none), and nested writes. - Transactions and Raw SQL: Explains sequential and interactive $transaction patterns plus safe $queryRaw usage with parameterization guidance. - Use Case: When building a Next.js API route that paginates users, filters by role, and includes post counts, consult this reference to compose the correct findMany call with where, orderBy, take, cursor, and _count options. ## Quick Start Ask the AI to write a Prisma query that finds all published posts by a specific author ordered by creation date with 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 filter records with Prisma Client where clauses?▼

Use the where option with operators like equals, contains, gt, lt, in, and logical combinators AND, OR, NOT. For relations, apply some, every, or none filters, and use is/isNot for one-to-one relations.

How to paginate query results in Prisma?▼

Use take and skip for offset pagination, or cursor-based pagination by passing a cursor with the last record's unique field plus skip: 1. Negative take values return records from the end of the result set.

What is the difference between sequential and interactive transactions in Prisma?▼

Sequential transactions pass an array of operations to $transaction and run them in order with better performance. Interactive transactions use an async callback with a tx client, supporting dependent operations and conditional logic.

Does Prisma Client prevent SQL injection in raw queries?▼

Yes, $queryRaw and $executeRaw with tagged templates parameterize interpolated values automatically. Avoid $queryRawUnsafe with string concatenation, and use Prisma.raw only for trusted identifiers like column names.

When should I use select versus include in Prisma queries?▼

Use select to return only specific scalar fields and reduce payload size. Use include to load full related records; both support nesting, filtering, and _count for relation counts, but select and omit cannot be combined.