prisma-client-api

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

7|2|Updated Jul 24, 2026
One-click install
npx skills add https://github.com/ysfcl/GeoMorphosis --skill prisma-client-api-ysfcl
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-client-api
Source: https://github.com/ysfcl/GeoMorphosis/tree/main/.windsurf/skills/prisma-client-api
Command: npx skills add https://github.com/ysfcl/GeoMorphosis --skill prisma-client-api-ysfcl

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing correct Prisma Client queries requires knowing the exact API surface for CRUD operations, filter operators, relation handling, and transaction patterns, and mistakes lead to runtime errors or inefficient queries. ## 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 writes for create, connect, and disconnect operations. - 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 to paginate users, filter by role, and include related posts, consult this reference to construct the correct findMany call with where, orderBy, take, skip, and include 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 findMany?▼

Use the where option in findMany with filter operators like equals, contains, gt, lt, in, and logical operators AND, OR, NOT. Combine multiple conditions for implicit AND, or nest OR and NOT blocks for complex queries.

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 scoped tx client. Interactive transactions support conditional logic, dependent operations, and options like maxWait, timeout, and isolationLevel.

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

select returns only the specified scalar fields, while include loads entire related records alongside all scalar fields. 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?▼

Yes, $queryRaw executes SELECT statements with typed results and $executeRaw runs INSERT, UPDATE, or DELETE returning affected counts. Template literals parameterize values automatically to prevent SQL injection; avoid $queryRawUnsafe with untrusted input.

How do I paginate results with Prisma Client?▼

Use take and skip for offset-based pagination, or cursor with take for cursor-based pagination. For cursor pagination, pass the last record's unique field as cursor and skip 1 to exclude the cursor record itself.

Why should I use a singleton pattern for PrismaClient in Next.js?▼

Next.js hot reloading in development creates a new PrismaClient instance on each reload, exhausting database connections. Storing the client on globalThis ensures a single instance persists across reloads while production creates one instance per process.