prisma-client-api

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

Updated Jul 9, 2026
One-click install
npx skills add https://github.com/DimonikRV/ghost-pilot-project --skill prisma-client-api-dimonikrv
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-client-api
Source: https://github.com/DimonikRV/ghost-pilot-project/tree/main/.agents/skills/prisma-client-api
Command: npx skills add https://github.com/DimonikRV/ghost-pilot-project --skill prisma-client-api-dimonikrv

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. This Skill gives you an authoritative reference so you can write accurate database queries without guessing syntax or digging through external documentation. ## Core Features & Use Cases - Complete Query Reference: Covers all model query 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), nested writes, and connect/disconnect 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 to fetch paginated users with their published posts inside a transaction, consult this Skill to get the exact query options, cursor pagination syntax, and transaction client patterns. ## Quick Start Ask the AI to write a Prisma query that finds all admin users with their published posts ordered by creation date, and it will apply the correct findMany, where, include, and orderBy syntax from this reference.

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 findMany queries with filters and sorting?▼

Use prisma.model.findMany with a where clause for filters, orderBy for sorting, and take/skip for pagination. Combine operators like contains, gte, and in with logical AND, OR, and NOT for complex conditions.

How do I use Prisma transactions for multiple operations?▼

Use prisma.$transaction with an array for sequential independent operations, or pass an async function for interactive transactions where later operations depend on earlier results. Interactive transactions support maxWait, timeout, and isolationLevel options.

Does Prisma Client support relation queries and nested writes?▼

Yes, Prisma supports include and select for loading relations, plus nested writes like create, connect, connectOrCreate, disconnect, and set for modifying related records in a single operation. Relation filters some, every, and none filter parents by related records.

Is it safe to use $queryRaw with user input in Prisma?▼

Tagged template $queryRaw automatically parameterizes interpolated values, making it safe for user input. Avoid $queryRawUnsafe with string concatenation, which creates SQL injection risk; use Prisma.sql and Prisma.join for dynamic fragments instead.

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

Current Prisma versions require a driver adapter like PrismaPg passed to the PrismaClient constructor for the SQL provider workflow. The adapter manages the database connection using your DATABASE_URL connection string.