prisma-client-api

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

2|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/UdayPandey01/Healix --skill prisma-client-api-udaypandey01
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-client-api
Source: https://github.com/UdayPandey01/Healix/tree/main/core/.agents/skills/prisma-client-api
Command: npx skills add https://github.com/UdayPandey01/Healix --skill prisma-client-api-udaypandey01

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 an AI assistant a complete, structured Prisma Client reference so it generates accurate database code instead of guessing at method names or filter syntax. ## Core Features & Use Cases - Model Query Reference: Covers all CRUD methods including findUnique, findMany, create, update, upsert, deleteMany, aggregate, and groupBy with return-type documentation. - Filtering and Relations: Documents scalar operators, logical operators (AND/OR/NOT), relation filters (some/every/none/is), and nested write patterns 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 guidance. - Use Case: Ask the assistant to write a paginated query that filters users by role, includes their published posts, and wraps a balance transfer in an interactive transaction — it produces correct Prisma Client code using the reference files. ## Quick Start Ask the assistant to write a Prisma Client query that finds all admin users with their published posts, 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 write Prisma Client queries with filters and relations?

Use findMany with a where clause containing filter operators like equals, contains, gt, or in, and add include or select to load relations. Relation filters like some, every, and none let you filter parent records by related record conditions.

How to use transactions in Prisma Client?

Prisma supports sequential transactions via prisma.$transaction with an array of operations, and interactive transactions using an async callback with a tx client. Interactive transactions support conditional logic, isolation levels, and timeout options.

What is the difference between findUnique and findFirst in Prisma?

findUnique locates one record by a unique field or composite unique key, while findFirst returns the first record matching arbitrary filter conditions. Both have OrThrow variants that raise an error when no record is found.

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, and use Prisma.sql and Prisma.join for dynamic query fragments.

How do I paginate results with Prisma Client?

Use take and skip for offset pagination, or cursor-based pagination by passing a cursor pointing to a unique field of the last record. Negative take values return records from the end of the result set.

When should I use select versus include in Prisma queries?

Use select to return only specific scalar fields, reducing payload size, and include to load full related records. They can be nested for relations, but select and omit cannot be combined on the same query level.