SkillsReviewed · prisma

Prisma Client API (agent skill from Prisma)

This is a set of Markdown instructions from Prisma that gives an AI coding assistant a reference for writing Prisma Client database code in TypeScript, aimed at developers who use Prisma ORM, and its main catch is that it is static documentation tied to a recent Prisma setup (generated client plus driver adapter) that was not run or tested here. It covers CRUD and bulk methods, select/include/omit, filters, relations and nested writes, transactions, raw SQL safety and client configuration, with one index file and eight reference files under an MIT licence.

Researched 13 Nov 2026

In short.

This is an agent skill, a folder of Markdown instructions published by Prisma, that gives an AI coding assistant a reference for writing Prisma Client queries in TypeScript; it suits developers already using Prisma ORM, and its main catch is that it is static documentation for a recent Prisma setup (generated client and driver adapter) that nothing here executed or tested. The folder holds SKILL.md (metadata version 7.9.1, MIT licence) and eight reference files covering client construction, model queries, query options, filters, relations, transactions, raw SQL and client methods. It is useful as a compact, well-organised cheat sheet with concrete code, but it does not cover the Prisma schema language, migrations or the command-line tools, it does not say which databases support several of its filter features, and one constructor example differs from the others in how it builds the Postgres adapter.

Researched and written by an AI model and checked by a second AI model. How it works

The report covers the complete prisma-client-api folder at [https://github.com/prisma/skills/tree/main/prisma-client-api], captured at revision a6f192959cf43b08aa330fe1ffca090267215812: SKILL.md and the eight reference files (constructor, model-queries, query-options, filters, relations, transactions, raw-queries, client-methods). The repository's root LICENSE file (MIT, Copyright 2025 Prisma) is included as the related notice. Linked documentation pages, other folders in the repository, the repository README and any install instructions are excluded and were not read. Nothing was installed or run: no Prisma project, database or AI assistant was used, so the correctness of the code examples and the behaviour of an assistant using the skill are untested.

The overview

What this resource is

The resource is the prisma-client-api skill in the prisma/skills repository on GitHub, at [https://github.com/prisma/skills/tree/main/prisma-client-api]. It was captured at repository revision a6f192959cf43b08aa330fe1ffca090267215812. The folder contains SKILL.md and eight files under references: constructor.md, model-queries.md, query-options.md, filters.md, relations.md, transactions.md, raw-queries.md and client-methods.md. Together they are roughly 40 KB of text.

The SKILL.md front matter gives the name prisma-client-api, the author prisma, a licence of MIT and a metadata version of 7.9.1. Whether that version number maps to a particular Prisma ORM release is not stated in the files. The description says the skill is for writing database queries, CRUD operations, filtering data and configuring Prisma Client, and lists trigger phrases such as prisma query, findMany, create, update, delete and $transaction.

Overall assessment

On reading the text alone, this is a focused and well-structured API reference. SKILL.md works as an index: a when-to-apply list, a priority table with eight categories, quick tables of model methods, query options, client methods and filter operators, and a pointer to each reference file. The reference files then give short, concrete TypeScript examples for each feature. The content is specific to Prisma Client and is internally consistent, apart from the small points listed under limitations. Whether the API details are correct, and which Prisma releases they are compatible with, remains unverified: the only evidence is the documentation itself, not an independent check against Prisma.

The main catches are that it is a snapshot of one API surface, it assumes a particular project setup (a generated client imported from a local path and a driver adapter), and it only covers querying and client configuration. Nothing was installed, run or tested against a database or an AI assistant, so how well an assistant follows it is not assessed.

Who it is for

It is meant for developers who use Prisma Client and who work with an AI coding assistant that can load skills. The examples are written in TypeScript, and the connection examples illustrate PostgreSQL and SQL provider workflows (the PrismaPg adapter, and an adapter option described as required for the SQL provider workflow); the skill also mentions an accelerateUrl option for Accelerate users and does not declare that its audience is exclusively SQL users. It can also serve as a readable cheat sheet for a developer new to Prisma, because each file explains one area with short examples (for example the difference between select, include and omit, or between sequential and interactive transactions).

It is a poor fit for people who need help with Prisma schema modelling, migrations or CLI usage, which the captured files do not cover, and for projects on other ORMs. Teams on older Prisma versions or using the prisma-client-js generator should check the examples carefully: client-methods.md notes that older examples use Prisma.validator() with prisma-client-js, while this skill uses the satisfies pattern with the prisma-client generator.

What it covers

Client construction: constructor.md shows creating PrismaClient with a driver adapter (the example is PrismaPg from @prisma/adapter-pg), the accelerateUrl option with @prisma/extension-accelerate, log levels and event logging, errorFormat, SQL commenter plugins through the comments option, default transactionOptions (maxWait, timeout, isolationLevel) and queryPlanCacheMaxSize. It also gives a development singleton pattern and a Next.js variant.

Queries: model-queries.md lists findUnique, findFirst and their OrThrow forms, findMany, create, createMany, createManyAndReturn, update, updateMany, updateManyAndReturn, upsert, delete, deleteMany, count, aggregate and groupBy, with a return-type table. query-options.md covers select, include, omit (not combinable with select), where, orderBy including nulls handling, take and skip, negative take, cursor pagination and distinct. filters.md covers equality, comparison, list, string, null, logical (AND, OR, NOT), relation (some, every, none, is, isNot), array, JSON and full-text filters.

Relations and transactions: relations.md covers filtered and nested includes, nested writes (create, connect, connectOrCreate, update, updateMany, upsert, disconnect, delete, set) and relation counts. transactions.md covers array transactions, interactive transactions with the tx client, options and isolation levels, automatic transactions for nested writes, and advice to keep transactions short and handle error code P2002.

Raw SQL and extensions: raw-queries.md covers $queryRaw, $executeRaw, Prisma.sql, Prisma.join, Prisma.raw, the Unsafe variants and an injection-prevention comparison, plus BigInt and Date handling. client-methods.md covers $connect, $disconnect, $on and $extends (client, model, query and result extensions) and type helpers such as Prisma.UserGetPayload and satisfies Prisma.UserSelect.

Using it

What you need

The skill assumes an existing Prisma project with a generated client: the client-construction examples import PrismaClient from a local generated path (../generated/client, or @/generated/client in the Next.js pattern), while most query examples contain no import statement. For the SQL workflow it describes the adapter option as required and shows PrismaPg for PostgreSQL. Users of Prisma Accelerate are pointed to accelerateUrl and the Accelerate extension. The SQL commenter example needs three extra packages: @prisma/sqlcommenter-query-insights, @prisma/sqlcommenter-query-tags and @prisma/sqlcommenter-trace-context.

The examples are written in TypeScript. The raw SQL examples lean towards PostgreSQL (quoted identifiers, ANY, the ->> operator) with one MySQL full-text example. Which other databases each feature supports is not stated. The skill needs an AI assistant or host that can load a skill folder with a SKILL.md file; which assistants are supported is not stated in the captured files. No API keys or accounts are mentioned for the skill itself.

How it works

The skill has no standalone executable files; it is Markdown that contains TypeScript and SQL code examples. SKILL.md carries front matter whose description tells an assistant when to load it, then a body with tables and short examples, and finally a list of reference files. Its closing instruction is to pick a category from the priority table and open the matching reference file for details. That gives a layered structure in which the assistant reads the overview first and pulls in a detailed file only when the task needs it. How a given assistant actually decides to load the skill and its files depends on that assistant and was not assessed.

The priority table labels categories by impact: model queries and transactions and raw SQL are marked CRITICAL, client construction, query shape, filtering and relations are HIGH, and client methods are MEDIUM. The files give no explanation of how those labels were chosen.

Setup

The captured files contain no installation instructions, so the exact install command or folder location for any particular assistant is unknown from this evidence. In general terms, setup would mean placing the prisma-client-api folder (SKILL.md and its references folder, kept together so the relative file list still works) where your assistant reads skills, then making sure your own project is configured like the examples: generated client, driver adapter and a DATABASE_URL environment variable.

Before relying on it, compare the skill's setup assumptions with your project's Prisma version and generator. The skill describes itself as guidance for current Prisma projects, but which versions that includes is not spelled out.

Worked example

Suppose you ask an assistant to move money between two accounts safely. The transactions reference shows an interactive transaction: call prisma.$transaction with an async function that receives tx, decrement the sender balance with tx.account.update and data balance decrement, throw an Error if the resulting balance is below zero so the whole transaction rolls back, then increment the recipient balance. It adds that options such as maxWait, timeout and isolationLevel can be passed as a second argument, and that transactions should stay short, with data preparation done outside.

As a second example, the client-methods reference shows a query extension that adds a default deletedAt: null filter to every user findMany by changing args.where and then calling query(args). The raw-queries reference contrasts a tagged-template $queryRaw with an interpolated value (parameterised, marked safe) against $queryRawUnsafe with a string-concatenated value (marked as an injection risk). These describe what the skill instructs; none of it was run for this report.

Assessment & evidence

Limitations and cautions

Scope: the skill covers Prisma Client usage only. The Prisma schema language, migrations, CLI commands and generator configuration are not covered, apart from the import path used in examples. The examples assume an unseen schema with models such as User, Post, Profile and Account, so an assistant must adapt names and fields to the real schema.

Unclear or inconsistent points in the text: in constructor.md most examples build the adapter as new PrismaPg({ connectionString: ... }), but the comments example passes the connection string directly as new PrismaPg(process.env.DATABASE_URL!); the files do not say whether both forms are valid. filters.md shows isSet, array filters (has, hasSome, hasEvery, isEmpty), JSON path filters and full-text search (which needs an @@fulltext index) without saying which databases support them, and mode: insensitive is described only as a default for some databases. createMany with skipDuplicates is shown without database caveats. These should be checked against Prisma's documentation for your database.

Risk of misuse by an assistant: the examples include destructive calls such as deleteMany({}) (delete all rows) and raw SQL DELETE and UPDATE statements, and Prisma.raw and the Unsafe functions are explicitly labelled unsafe for user input. The trigger words in the description include very common words (create, update, delete), so an assistant may load the skill for tasks that are not about Prisma; whether that happens was not assessed. Nothing was executed, so no claim is made that the examples compile or run.

Reasoning behind the assessment

The assessment rests on reading every file in the folder. The index and the references agree: every file named in SKILL.md exists, and each category in the priority table has a matching reference. The content is concrete (named methods, option names, error codes such as P2002 and P2039, and runnable-looking snippets) rather than generic advice. The security-relevant guidance is defensive: it prefers parameterised tagged templates, warns that Prisma.raw and the Unsafe variants are not safe for user input, and tells readers to validate Date input before it reaches raw queries.

Confidence is limited to documentation quality. The report cannot say whether the examples are correct for a given Prisma release, whether an assistant follows the skill well, or whether it improves generated code, because none of that was observed.

Alternatives

The skill itself links to Prisma's own documentation: the Prisma Client API reference [https://www.prisma.io/docs/orm/reference/prisma-client-reference], CRUD operations [https://www.prisma.io/docs/orm/prisma-client/queries/crud] and filtering and sorting [https://www.prisma.io/docs/orm/prisma-client/queries/filtering-and-sorting]. Those pages were not reviewed here and are outside this report. They are the natural source to check when an example here is unclear or may be out of date.

Other options are to write your own short project instructions for your assistant (listing your schema, adapter and conventions), which can fit your project better than a generic reference, or to use documentation for a different ORM if you are not on Prisma. Other folders in the same repository were not examined, so no comparison with them is made.

Evidence behind this report

The report is based on the full text of nine files from revision a6f192959cf43b08aa330fe1ffca090267215812: SKILL.md and the eight reference files for constructor, model queries, query options, filters, relations, transactions, raw queries and client methods, plus the repository LICENSE file. Every claim above comes from those texts.

No code was run, no Prisma project or database was used, no assistant was tested with the skill, and no external pages were fetched, so nothing is claimed about runtime behaviour, accuracy against a specific Prisma release or quality of generated code.

Access & freshness

Costs

The captured files state no price for the skill, and the licence is MIT, so no licence fee is indicated. Any other cost is unknown from this evidence: the files do not describe pricing for Prisma ORM, for Prisma Accelerate (which constructor.md mentions through accelerateUrl), for databases, or for the AI assistant that loads the skill.

There is also a context cost. The nine files total roughly 40 KB, of which SKILL.md is about 6 KB. How many tokens an assistant uses depends on how much it loads per task, and that was not assessed.

Rights and licence

The repository LICENSE file is the MIT License with the notice Copyright (c) 2025 Prisma, and the SKILL.md front matter also declares license: MIT. The MIT terms grant permission to use, copy, modify, merge, publish, distribute, sublicense and sell copies, on the condition that the copyright notice and permission notice are included in copies or substantial portions. The software is provided as is, without warranty.

The LICENSE file sits at the repository root rather than inside the skill folder, and the SKILL.md declaration matches it. The evidence does not address trademarks, the licence of Prisma ORM itself, or any Prisma service terms, so this MIT grant should be read as covering the skill text only. This is a summary of the text, not legal advice.

Freshness

The files were captured on 2026-11-13 at revision a6f192959cf43b08aa330fe1ffca090267215812. SKILL.md labels itself version 7.9.1. The inclusion of fairly recent-looking options (queryPlanCacheMaxSize, SQL commenter plugins, createManyAndReturn, updateManyAndReturn, and a note recommending TypeScript satisfies with the prisma-client generator while mentioning older Prisma.validator() examples with prisma-client-js) suggests the content was written for a recent Prisma release, but the files give no dates or changelog, so how current it is against the latest Prisma release is unknown.

Later revisions of the repository may differ from what was read. If you depend on a specific behaviour, compare against the current repository and Prisma's release notes.

Suggested next steps

First, check your project: confirm your Prisma version, that you use the generated client and a driver adapter as the examples do, and which database you target. Next, read SKILL.md and constructor.md, then the reference that matches your task.

Before trusting an assistant's output, verify the flagged points against Prisma's documentation for your database (the PrismaPg string form in the comments example, isSet, array, JSON and full-text filters, case-insensitive mode, skipDuplicates), and review any generated deleteMany, raw SQL or Unsafe calls by hand. Install the folder using your assistant's own skill instructions, since the captured files give none, and keep the MIT licence notice if you copy or share the files. Pin the revision you reviewed so later changes do not surprise you.

Evidence for this report

LICENSEnotice · checked 2026-11-13
prisma-client-api/SKILL.mdselected · checked 2026-11-13
prisma-client-api/references/constructor.mdselected · checked 2026-11-13
prisma-client-api/references/filters.mdselected · checked 2026-11-13
prisma-client-api/references/model-queries.mdselected · checked 2026-11-13
prisma-client-api/references/query-options.mdselected · checked 2026-11-13
prisma-client-api/references/raw-queries.mdselected · checked 2026-11-13
prisma-client-api/references/relations.mdselected · checked 2026-11-13
prisma-client-api/references/transactions.mdselected · checked 2026-11-13