prisma-client-api

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

Updated Jul 8, 2026
One-click install
npx skills add https://github.com/NarixHine/uni-chem --skill prisma-client-api-narixhine
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-client-api
Source: https://github.com/NarixHine/uni-chem/tree/main/.agents/skills/prisma-client-api
Command: npx skills add https://github.com/NarixHine/uni-chem --skill prisma-client-api-narixhine

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. This Skill gives the AI a complete, structured reference so it generates accurate Prisma Client code for CRUD operations, filtering, relations, and raw SQL without guesswork. ## 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, logical, relation, array, and JSON filter operators plus nested writes 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 a Next.js API route that needs paginated, filtered user queries with relation counts, the AI consults this Skill to produce correct Prisma Client code with proper select, include, and cursor pagination. ## Quick Start Ask the AI to write a Prisma query that finds all published posts with their authors, ordered by creation date and paginated by cursor.

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 with skip or cursor for pagination. Combine operators like contains, gte, and in inside where, and use cursor-based pagination for efficient large-dataset traversal.

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 accept maxWait, timeout, and isolationLevel options, and roll back automatically on errors.

Does Prisma Client support raw SQL queries safely?▼

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

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

select returns only the specified scalar fields and relations, while include adds all scalar fields plus the specified relations. You cannot combine select and omit in the same query, but include supports nested filtering, ordering, and take.

How do I filter Prisma queries by related records?▼

Use relation filter operators: some matches records with at least one related record, every requires all to match, and none requires zero matches. For one-to-one relations, use is and isNot to filter on the related record's fields.