prisma-client-api

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

Updated Aug 18, 2026
One-click install
npx skills add https://github.com/manab-debnath/trello --skill prisma-client-api-manab-debnath
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-client-api
Source: https://github.com/manab-debnath/trello/tree/main/packages/db/.agents/skills/prisma-client-api
Command: npx skills add https://github.com/manab-debnath/trello --skill prisma-client-api-manab-debnath

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. This Skill gives you an authoritative, structured reference so you can write accurate queries the first time. ## Core Features & Use Cases - Complete CRUD Reference: Covers findUnique, findMany, create, update, upsert, delete, and bulk operations with return-type documentation. - 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/$executeRaw usage with SQL injection prevention. - Use Case: You need to paginate users, filter by role, and include their published posts. Look up query-options.md and relations.md to compose the correct findMany call with cursor pagination and filtered includes. ## Quick Start Ask the AI to write a Prisma query that finds all admin users with their published posts, ordered by creation date and limited to ten results.

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 sorting?▼

Use the where option with filter operators like equals, contains, gt, and in, combined with orderBy for sorting. For example, prisma.user.findMany({ where: { role: 'ADMIN' }, orderBy: { createdAt: 'desc' }, take: 10 }) returns filtered, sorted, paginated results.

How to use Prisma transactions for multiple database operations?▼

Use prisma.$transaction with an array for sequential independent operations, or pass an async function for interactive transactions with conditional logic. Interactive transactions support options like maxWait, timeout, and isolationLevel such as Serializable.

Does Prisma Client support raw SQL queries safely?▼

Yes, $queryRaw and $executeRaw use tagged templates that automatically parameterize values, preventing SQL injection. Avoid $queryRawUnsafe with string concatenation; use Prisma.sql and Prisma.join for dynamic query construction instead.

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. You can nest select inside include or vice versa, but select and omit cannot be used together on the same query.

Why does my Prisma query fail with a connection error?▼

Prisma Client requires a driver adapter like PrismaPg configured with a valid DATABASE_URL connection string. Use prisma.$connect() at startup to fail fast on connection issues, and ensure the singleton pattern prevents multiple client instances in development.