Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/prisma/prisma-next/prisma-next-supabasenpx skills add prisma/prisma-next --skill prisma-next-supabasegit clone --depth 1 https://github.com/prisma/prisma-nextWrote 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.
[](https://agentmods.dev/skills/prisma/prisma-next/prisma-next-supabase)<a href="https://agentmods.dev/skills/prisma/prisma-next/prisma-next-supabase"><img src="https://agentmods.dev/badge/skills/prisma/prisma-next/prisma-next-supabase.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00244 | $0.05503 |
| Opus 5 | $0.00122 | $0.02752 |
| Sonnet 5 | $0.00049 | $0.01101 |
| Haiku 4.5 | $0.00024 | $0.00550 |
Grade A, and why
prisma-next-supabase 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 249 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Prisma Next — Supabase
Edit your data contract. Prisma handles the rest.
This skill covers using Prisma Next against a Supabase project end-to-end: composing the Supabase extension pack, referencing Supabase-owned tables from your contract, authoring row-level-security (RLS) policies, and running role-bound queries through the supabase() runtime.
When to Use
- User has a Supabase project (or wants one) and is wiring Prisma Next into it.
- User wants RLS policies on their tables (
policy_select,@@rls,auth.uid()). - User wants per-request role binding (
asUser(jwt),asAnon(),asServiceRole()). - User wants a foreign key into
auth.users(cross-space FK). - User wants to read Supabase-internal tables (
auth.*,storage.*) as an admin. - User mentions: supabase, RLS, row level security, policy, anon, authenticated, service_role, auth.users, auth.uid(), JWT, jwtSecret, jwksUrl, SUPABASE.JWT_INVALID, RoleBoundDb, session pooler.
When Not to Use
- General contract editing (models, fields, relations) →
prisma-next-contract. - Non-Supabase
db.tswiring, middleware, teardown →prisma-next-runtime. - General query shapes (filtering, includes, aggregates) →
prisma-next-queries— everything there applies to a role-bounddbtoo. - Migration planning / applying →
prisma-next-migrations.
Key Concepts
- The pack is an
externalcontract space.@prisma-next/extension-supabase/packships a complete, introspection-generated contract of everything Supabase owns — theauthandstorageschemas, their native enum types, and the platform roles (anon,authenticated,service_role) — all with control policyexternal. Composed viaextensions, it means: the migration planner emits no DDL for those objects (Supabase manages them), anddb verifyconfirms they exist in the live database. Your own tables staymanagedas usual. - Roles come from the pack; you never declare them. RLS
roles = [authenticated]identifiers resolve against the composed contract. Pointing the runtime at a non-Supabase Postgres fails verify with anot-foundissue naming the missing role — the common "wrong database" misconfiguration surfaces before queries run. - The runtime is role-first.
supabase()returns aSupabaseDbwith no top-level query surface — there is nodb.sql/db.ormuntil you bind a role.await db.asUser(jwt)/db.asAnon()/db.asServiceRole()each return aRoleBoundDbexposing.sql,.orm,.raw,.execute(plan), and.transaction(fn). This is deliberate: in a Supabase app there is no meaningful "no role" execution context, and defaulting to the connection's login role is a silent-RLS-bypass footgun. - Role binding is below middleware and cannot leak. Each role-bound query runs on a connection that had
set_config('role', …)andset_config('request.jwt.claims', …)applied beneath the user-middleware chain, withRESET ALLon release. Postgres-sideauth.uid()/auth.jwt()read those session vars — RLS enforcement is Postgres's job; the runtime's job is binding the context. - RLS is enforced by policies and grants. Policies filter rows;
GRANTcontrols table access. Prisma Next authors and migrates the policies; it does not author grants (see What Prisma Next doesn't do yet). A role with policies but noGRANTgets a permission error, not filtered rows. On Supabase yourpublictables already carry the platform-role grants via default privileges — the grant that is actually missing out of the box isservice_role's onauth.*/storage.*(see Workflow — Grants). - JWT validation is eager and configurable — current Supabase projects need
jwksUrl.asUser(jwt)verifies the token (viajose) before any connection is acquired: signature + expiry againstjwksUrl(asymmetric signing keys — the default on current Supabase projects, which sign ES256) xorjwtSecret(the symmetric HS256 secret — legacy projects only). Both or neither → a structured error with codeSUPABASE.CONFIG_INVALID. Bad tokens throw a structured error with codeSUPABASE.JWT_INVALIDand a typedmeta.reason— including a mismatch between the token's algorithm and the configured key source (an ES256 token against ajwtSecretclient names the problem and tells you to switch tojwksUrl). The Postgres role is derived from the token'sroleclaim (defaults toauthenticated). Note:supabase statusstill prints aJWT_SECRETeven on projects that sign ES256 — its presence does not mean your project uses it. - Admin access to
auth.*/storage.*is a secondary root onservice_roleonly — and needs a one-time grant.db.asServiceRole().supabaseexposes the pack's own contract (.sql,.orm,.nativeEnums,.execute). The root exists only onservice_roleby design, but a real Supabase project grantsservice_roleno table privileges onauth.*/storage.*(only schemaUSAGE; onlypostgresholds table grants). Before the admin root can read a Supabase-internal table, run the narrow grant once (see Workflow — Grants).asUser/asAnonhave no.supabase, and the primaryasServiceRole().sql/.ormstay scoped to your contract.
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.
- 2d ago First seen · 249 lines · 244 tokens per session scan A e8d8f12358e9
prisma-next-supabase is a skill published in the GitHub repository prisma/prisma-next (419 stars, last pushed 11d ago), licensed Apache-2.0. It adds 244 tokens to every session and 5,503 once invoked, about $0.0012 per session on Opus 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.
Other skills, from other repositories
prisma-8
Comprehensive guide for building with Prisma 8 (Prisma Next), the contract-first data layer. Use whenever working on Prisma code in a project that uses it — authoring or editing the data contract (contract.prisma, PSL, TypeScript builders), migrations, queries (db.orm / db.sql), runtime wiring (db.ts, middleware…
create-pr
Creates a GitHub PR with a Linear-ticket-prefixed title and a decision-led, narrative description for prisma-next. Use when the user wants to create a pull request, open a PR, or submit changes for review.
review-implement-phase
Implements triaged review actions, commits focused fixes, and posts Done plus resolves threads. Use when the user wants only the implementation phase of the review-framework workflow.
alloydb-basics
Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations. Use when creating, configuring, or administering AlloyDB databases. Do NOT use for general PostgreSQL instances (e.g. Cloud SQL) or other GCP databases.
write-architecture-docs
Write or rewrite architecture subsystem docs, ADRs, and reference material for the engineering team. Use when creating, updating, or reviewing docs under docs/architecture docs/, or when the user asks you to write documentation that describes the system's design.
postgresql-table-design
Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.