prisma-next-queries

prisma-next-queries is a skill for Claude Code, Codex from prisma/prisma-next. It costs 257 tokens per session (3,734 once invoked), scanned A, original, Apache-2.0.

A query-writing guide for Prisma Next, a data-access toolkit that connects applications to PostgreSQL, SQLite, or MongoDB. It covers reading, changing, filtering, sorting, joining, and summarising stored data.

In plain words
What is it for?
Use it to fetch, create, update, delete, paginate, sort, filter, or aggregate records, including related records.
Why use it?
It helps developers choose the right query style and avoid hand-writing common database operations. It also explains when to use transactions, which keep related changes together.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { db } from '../prisma/db';.

Good fit Use it to fetch, create, update, delete, paginate, sort, filter, or aggregate records, including related records.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/prisma/prisma-next
agentmods
npx agentmods add skills/prisma/prisma-next/prisma-next-queries

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for prisma-next-queries

README.md
[![agentmods](https://agentmods.dev/badge/skills/prisma/prisma-next/prisma-next-queries/github.svg)](https://agentmods.dev/skills/prisma/prisma-next/prisma-next-queries)
Your own site
<a href="https://agentmods.dev/skills/prisma/prisma-next/prisma-next-queries"><img src="https://agentmods.dev/badge/skills/prisma/prisma-next/prisma-next-queries/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for prisma-next-queries

Your own site · 80×15
<a href="https://agentmods.dev/skills/prisma/prisma-next/prisma-next-queries"><img src="https://agentmods.dev/badge/skills/prisma/prisma-next/prisma-next-queries.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 257 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,734 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 14 Sept 2026
  • Snyk pass 14 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00257 $0.03734
Opus 5.5 $0.00103 $0.01494
Sonnet 5.5 $0.00051 $0.00747
Haiku 4.5 $0.00026 $0.00373

Measured 1mo ago against content hash e8619ad48746, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

prisma-next-queries scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/prisma-next-queries/SKILL.md · 186 lines

How it starts

The opening of the file, as written. The whole thing — 186 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Prisma Next — Queries

Edit your data contract. Prisma handles the rest.

Once the contract is emitted and the DB is up to date, this skill covers everything you do with the data: reading, writing, eager-loading relations, aggregating, and the choice between the ORM and the lower-level query lane.

When to Use

  • User wants to read, write, update, or delete data.
  • User wants to include / eager-load relations.
  • User wants to paginate, sort, filter, project.
  • User wants to wrap operations in a transaction (db.transaction(...) — Postgres and SQLite).
  • User wants to aggregate (count, sum, avg, …).
  • User asks about query lanes (ORM vs SQL builder / query builder).
  • User mentions: query, select, where, orderBy, take, skip, include, eager load, first, all, count, aggregate, create, update, delete, upsert, returning, drizzle-style, kysely-style, prisma client.

When Not to Use

  • User wants to add / change a model → prisma-next-contract.
  • User wants to wire db.ts or add middleware → prisma-next-runtime.
  • User is querying through a Supabase role-bound db (asUser / asAnon / asServiceRole, RLS, auth.* admin reads) → prisma-next-supabase for the role-binding surface; everything in this skill then applies to the returned RoleBoundDb.
  • User wants to debug a query failure (structured error envelope) → prisma-next-debug.

Pick your target

Prisma Next ships two query lanes per target on the same db value from src/prisma/db.ts. Before writing queries, read db.ts and load the matching target guide:

Runtime import in db.ts Load
@prisma-next/postgres/runtime postgres.md — db.orm.<Model> + db.sql.<table>
@prisma-next/mongo/runtime mongo.md — db.orm.<root> + db.query.from(...)
@prisma-next/extension-supabase/runtime postgres.md — a Supabase RoleBoundDb is a Postgres surface (db.orm.<Model> + db.sql.<table>); bind a role first via prisma-next-supabase

Read the full file on GitHub · 186 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 186 lines · 257 tokens per session scan A e8619ad48746

Subscribe to this mod's changes

prisma-next-queries is a skill published in the GitHub repository prisma/prisma-next (412 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 257 tokens to every session and 3,734 once invoked, about $0.0010 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

ring:mapping-service-resources

Mapping a Go service's Service -> Module -> Resource hierarchy for dispatch-layer registration: detects modules and per-module PostgreSQL/MongoDB/RabbitMQ resources, database names, and shared databases, generates MongoDB index migration pairs (.up.json/.down.json), detects existing Postgres migrations, emits an HTML…

LerianStudio/ring · 97 tokens

fastapi-init-skill

A tool that creates a complete FastAPI web-service starting point, including database choices, login protection, file uploads, streaming responses, API documentation, and start or restart scripts.

jiushiwon/wg-skills · 229 tokens

vector-backend-operations

Select and connect the right vector-store backend for the vector-mcp MCP server — chromadb, postgres/pgvector, qdrant, couchbase, or mongodb — and supply the correct dbtype/connection parameters that every collection and search call needs. Use when the agent must decide which engine to target, wire up…

Knuckles-Team/vector-mcp · 113 tokens

supabase-firebase

Backend-as-a-Service patterns. Supabase and Firebase for auth, database, storage, and real-time. Use when building apps with BaaS platforms.

hoangatg/ai-agent-toolkit · 36 tokens

ck:backend-development

Build robust backend systems with modern technologies (Node.js, Python, Go, Rust), frameworks (NestJS, FastAPI, Django), databases (PostgreSQL, MongoDB, Redis), APIs (REST, GraphQL, gRPC), authentication (OAuth 2.1, JWT), testing strategies, security best practices (OWASP Top 10), performance optimization, scalability…

Bek85/claudekit-marketing · 137 tokens

backend-development

Build robust backend systems with modern technologies (Node.js, Python, Go, Rust), frameworks (NestJS, FastAPI, Django), databases (PostgreSQL, MongoDB, Redis), APIs (REST, GraphQL, gRPC), authentication (OAuth 2.1, JWT), testing strategies, security best practices (OWASP Top 10), performance optimization, scalability…

OpenAnalystInc/10x-Team · 135 tokens