prisma-client-api (prisma/skills)
prisma-client-api: no measurable effect: all 18 runs pass every check (5.0 control, 5.0 one-liner, 5.0 skill); the model already writes idiomatic Prisma
24.0 / 30
Lift over no skill: +0.00
Situational: the lift +0.00 is under +1.0. Recommended needs a total of 22/30, output quality of 3.5, and a lift of +1.0.
SOTA
PassTested with Codex.
Covers Codex, Claude Code
Codex CLI 0.166 (SOTA tier): 18 graded runs. A pass here also covers Claude Code under our tier rule; it says nothing about the second tier.
Scores
Each dimension is 0 to 5 and the six add up to the total out of 30. 5 is better on every dimension. Cost 5 means cheap and fast. Install 5 means easy.
- Trigger reliability
- 5.0
- Lift over no skill
- 2.0
- Output quality
- 5.0
- Token and time cost
- 5.0
- Install and portability
- 3.0
- Safety
- 4.0
Security review
SafeStatic scan: 9 CRITICAL / 9 HIGH / 0 MEDIUM. Manual review: Safe to run in a no-network sandbox (scanner findings explained). A clean scan does not prove a skill safe.
Install
npx skills@latest add prisma/skills --skill prisma-client-api
Pinned commit: 8ea289b730c2e89f7ff1f518af128b113d842a92
Tested: 2026-11-02
What we tested
- Write typed queries from a description — Write src/queries.ts using Prisma Client with these functions: getUserWithPosts(id) returning the user and only their published posts, newest first, max 10; searchPosts(term, cursor?) a cursor-paginated (page size 20) case-insensitive title search; upsertUser(…
- Remove an N+1 query — src/report.ts is slow on large tables. Fix the performance problem in src/report.ts and keep the returned shape the same.
- Review Prisma code for mistakes — Review src/search.ts and src/report.ts for Prisma mistakes and anything risky; list the problems most serious first. Do not change any files.
Pros
- The skill was picked up without being named: Skill file read in 6/6 treatment runs.
- No token overhead: 1.05x the tokens of no skill.
- High absolute quality with the skill: 5.0 out of 5.
Cons
- No measurable lift over no skill (+0.00, inside the noise).
- A one-sentence prompt scored 5.0, against 5.0 with the skill (+0.00).
- The control already scores 5.0: a ceiling effect, so the test cannot show a lift.
- n=2 per task per arm; differences under about 1 point are noise.
Review
Codex CLI 0.166 (gpt-6-astra, low reasoning) on a dedicated Windows test PC, a fresh temporary project and temporary HOME/TMPDIR/caches per run, skill installed (treatment) or absent (control) or absent with the skill's core requirement squeezed into one sentence appended to the prompt (one-liner group), 2 runs per group per task, network off, /tmp writes blocked. The prompts never mention the skill (except the wording noted below). A small Prisma project (schema, seed, src files). Tasks: write src/queries.ts with five typed query functions (user with last 10 published posts, cursor-paginated case-insensitive search, upsert, atomic transfer of posts, a groupBy count), fix an N+1 in src/report.ts keeping its output shape, and review two files for Prisma mistakes (a raw query built with string interpolation and others). Prompts do not name Prisma features. The one-liner lists the idiomatic features in one sentence.
Three-arm comparison
| Arm | Mean score (0-5) | Tokens per run |
|---|---|---|
| Without the skill | 5.0 | 92k |
| One-sentence prompt | 5.0 | 88k |
| With the skill | 5.0 | 97k |
Measured with Codex CLI over 18 runs, scored by rule-based checks with no LLM judge. Total 24.0 / 30, verdict Situational.
Verdict: Situational (24.0 / 30). Source: prisma/skills, prisma-client-api, pinned at commit 8ea289b. Install: npx skills@latest add prisma/skills --skill prisma-client-api. Licence: Apache-2.0 (repo LICENSE).
What it is
The prisma-client-api skill (prisma/skills): a reference for the Prisma Client query API (findUnique/findMany, select/include, filters, cursor pagination, upsert, transactions, groupBy, raw queries) plus documentation-style guidance, delivered as SKILL.md and rule files.
How we tested
Codex CLI 0.166 (gpt-6-astra, low reasoning) on a dedicated Windows test PC, a fresh temporary project and temporary HOME/TMPDIR/caches per run, skill installed (treatment) or absent (control) or absent with the skill's core requirement squeezed into one sentence appended to the prompt (one-liner group), 2 runs per group per task, network off, /tmp writes blocked. The prompts never mention the skill (except the wording noted below).
A small Prisma project (schema, seed, src files). Tasks: write src/queries.ts with five typed query functions (user with last 10 published posts, cursor-paginated case-insensitive search, upsert, atomic transfer of posts, a groupBy count), fix an N+1 in src/report.ts keeping its output shape, and review two files for Prisma mistakes (a raw query built with string interpolation and others). Prompts do not name Prisma features. The one-liner lists the idiomatic features in one sentence.
- Write typed queries from a description — Write src/queries.ts using Prisma Client with these functions: getUserWithPosts(id) returning the user and only their published posts, newest first, max 10; searchPosts(term, cursor?) a cursor-paginated (page size 20) case-insensitive title search; upsertUser(…
- Remove an N+1 query — src/report.ts is slow on large tables. Fix the performance problem in src/report.ts and keep the returned shape the same.
- Review Prisma code for mistakes — Review src/search.ts and src/report.ts for Prisma mistakes and anything risky; list the problems most serious first. Do not change any files.
Scoring is programmatic (hidden tests / planted-issue recall / constraint checks / render+OCR where relevant), 0–5 per run. No LLM judge decided any score.
Results
The one-liner given to the third group: "Use Prisma Client idiomatically: findUnique on unique fields, include/select to avoid N+1 and over-fetching, filters with mode: 'insensitive', cursor pagination with take, upsert for insert-or-update, $transaction or updateMany for atomic changes, groupBy for aggregates, and never $queryRawUnsafe with interpolated input."
| Task | Control score | One-liner | With skill | Control tokens | One-liner tokens | With-skill tokens | Skill read |
|---|---|---|---|---|---|---|---|
| t1-queries | 5.0 | 5.0 | 5.0 | 83k | 83k | 105k | 2/2 |
| t2-n-plus-1 | 5.0 | 5.0 | 5.0 | 103k | 103k | 100k | 2/2 |
| t3-review | 5.0 | 5.0 | 5.0 | 89k | 75k | 84k | 2/2 |
Mean score: 5.0 without vs 5.0 with the skill (delta +0.0). Tokens per run: 92k vs 97k (1.05x); time 44s vs 40s. One-liner group: 5.0 (the skill's gain over the one-liner: +0.0; one-liner's own gain over no skill: +0.0); one-liner tokens 88k per run, so the skill costs 1.10x the one-liner.
What happened
- Every run in every group passed every check: control 5.00, one-liner 5.00, skill 5.00 (n=6 each). The generated queries use findUnique,
mode: 'insensitive', cursor + take, upsert, $transaction/updateMany and groupBy; the N+1 was fixed with include/select or batching; the review found the unsafe raw interpolation in every run. - The skill was read in 6/6 treatment runs and cost 97k tokens per run against 92k control and 88k one-liner (1.05x): a small overhead, no gain.
- Treatment runs copy the skill's rule files into the project (9.7 files per run on average).
- The check set has a ceiling effect: with all runs at the maximum it can only say the skill did no harm, not that it never helps. Harder tasks (Prisma 7 driver adapters, newer features the model may not know) would be needed to find a benefit.
Dimension scores
| Dimension | Score | Why |
|---|---|---|
| 1_output_quality | 5.0 | Mean score 5.00/5 with the skill (programmatic checks, see per-task table). |
| 2_lift_vs_no_skill | 2.0 | +0.00 points vs 5.00 without the skill (n=2 per task; under ~1 point is noise). |
| 3_trigger | 5.0 | Skill file read in 6/6 treatment runs. |
| 4_instructions_portability | 3 | SKILL.md plus about ten rule files; docs only. |
| 5_efficiency | 5 | 1.05x tokens (97k vs 92k per run) and 0.92x time (40s vs 44s). |
| 6_safety_hygiene | 4 | Scanner reports 9 CRITICAL, all documentation mentions of
|
Limits of this test
- Rule-based checks on code text; no Prisma client was generated and no query was executed (offline, no database).
- All groups at the ceiling: the tasks measure basic idiomatic Prisma that the base model already knows.
- n=2 per cell; newer-API knowledge (the part a docs-style skill is most likely to add) is not exercised.
- n = 2 per group per task: differences under about 1 point are noise.
- Rule-based scoring measures what the checks can see; it cannot judge taste or whether a result is the best possible.
Security
See security.md. Scan: 9 CRITICAL / 9 HIGH / 0 MEDIUM. Verdict: safe to run (no-network sandbox). A clean scan does not prove a skill safe.
Bottom line
On everyday Prisma Client work plain Codex is already correct, so the skill adds a small token cost for no visible change here. It may matter for very new Prisma features this test did not touch.
Transcript
Run log for prisma-client-api: Codex CLI, network off, per-run temp HOME/TMPDIR, one row per graded run. Columns: task, arm-run, score (0-5), tokens, seconds, checks passed, skill files the agent opened. t1-queries control-1: score 5.0, tokens 84040, secs 35.0, checks 7/7, opened nothing t1-queries control-2: score 5.0, tokens 83803, secs 36.4, checks 7/7, opened nothing t1-queries oneliner-1: score 5.0, tokens 83731, secs 38.4, checks 7/7, opened nothing t1-queries oneliner-2: score 5.0, tokens 83779, secs 38.1, checks 7/7, opened nothing t1-queries treatment-1: score 5.0, tokens 110031, secs 39.9, checks 7/7, opened prisma-client-api t1-queries treatment-2: score 5.0, tokens 100691, secs 36.8, checks 7/7, opened prisma-client-api t2-n-plus-1 control-1: score 5.0, tokens 103258, secs 57.7, checks 3/3, opened nothing t2-n-plus-1 control-2: score 5.0, tokens 103374, secs 54.2, checks 3/3, opened nothing t2-n-plus-1 oneliner-1: score 5.0, tokens 103307, secs 51.8, checks 3/3, opened nothing
18 runs, 3 artifacts
Sample output
SOTA · With the skill: src/queries.ts (t1-queries, run 1, Codex)
import { prisma } from "./db"; export function getUserWithPosts(id: number) { return prisma.user.findUnique({ where: { id }, include: { posts: { where: { published: true }, orderBy: [{ createdAt: "desc" }, { id: "desc" }], take: 10, }, }, }); } // Pass the last post's id as the cursor for the next page. export function searchPosts(term: string, cursor?: number) { return prisma.post.findMany({ where: { title: { contains: term, mode: "insensitive" } }, orderBy: { id: "asc" }, take: 20, ...(cursor !== undefined ? { cursor: { id: cursor }, skip: 1 } : {}), }); } export function upsertUser(email: string, name: string | null) { return prisma.user.upsert({ where: { email }, update: { name }, create: { email, name }, }); } // Returns { count } with the number of posts transferred. export function transferPosts(fromId: number, toId: number) { return prisma.$transaction(async (tx) => { await tx.user.findUniqueOrThrow({ where: { id: fromId } }); await tx.user.findUniqueOrThrow({ where: { id: toId } }); return tx.post.updateMany({ where: { authorId: fromId }, data: { authorId: toId }, }); }); } // Includes authors with posts; each row has { authorId, _count: { _all } }. export function postCountsByAuthor() { return prisma.post.groupBy({ by: ["authorId"], _count: { _all: true }, orderBy: { authorId: "asc" }, }); }