prisma-adapter

prisma-adapter is a skill for Claude Code from kavo-labs/kavo. It costs 88 tokens per session (1,187 once invoked), scanned A, original, MIT.

A setup guide for connecting Kavo, a Nest application tool, to Prisma, a database toolkit for TypeScript. It explains the marker classes and configuration needed for Prisma models.

In plain words
What is it for?
Use it when adding Kavo to a Prisma project or answering questions about Kavo and Prisma integration.
Why use it?
It prevents confusion caused by Prisma not creating runtime model classes, and clarifies why its setup differs from TypeORM.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the kavo-skills plugin — 15 skills shipped together

Good fit Use it when adding Kavo to a Prisma project or answering questions about Kavo and Prisma integration.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kavo-labs/kavo/prisma-adapter
Install

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.

Any agent
npx skills add kavo-labs/kavo --skill prisma-adapter
Clone the repo
git clone --depth 1 https://github.com/kavo-labs/kavo

Made for: Claude Code.

Or install kavo-skills, the plugin that ships this one along with the rest of its 15 skills.

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-adapter

README.md
[![agentmods](https://agentmods.dev/badge/skills/kavo-labs/kavo/prisma-adapter/github.svg)](https://agentmods.dev/skills/kavo-labs/kavo/prisma-adapter)
Your own site
<a href="https://agentmods.dev/skills/kavo-labs/kavo/prisma-adapter"><img src="https://agentmods.dev/badge/skills/kavo-labs/kavo/prisma-adapter/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-adapter

Your own site · 80×15
<a href="https://agentmods.dev/skills/kavo-labs/kavo/prisma-adapter"><img src="https://agentmods.dev/badge/skills/kavo-labs/kavo/prisma-adapter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,187 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
  • NVIDIA SkillSpector pass 7 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.00088 $0.01187
Opus 5 $0.00044 $0.00593
Sonnet 5 $0.00018 $0.00237
Haiku 4.5 $0.00009 $0.00119

Measured 4d ago against content hash 04d099bf199f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

prisma-adapter 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 4d 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.

extensions/skills/prisma-adapter/SKILL.md · 135 lines

How it starts

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

Prisma adapter

@kavo/prisma adapts Kavo to a Prisma Client. The engine, routes, query grammar, DTO slots, and error shapes are identical to every other adapter — only the wiring below differs.

npm install @kavo/core @kavo/nest @kavo/prisma

@prisma/client (^5.0.0 || ^6.0.0) is a peer dependency.

The one thing that is not like TypeORM: marker classes

Prisma generates no runtime class for a model. prisma generate produces types and a client with delegates (prisma.book), but nothing that survives to runtime as a constructor — and @Kavo(Entity) needs a stable runtime identity to key an entity by.

So each model needs a small marker class: an empty class whose name matches the Prisma model exactly.

// book.entity.ts
export class Book {
  id!: number;
  title!: string;
}

This is the shape of the trap. The natural guess — passing the delegate, the way you would pass an entity class with TypeORM — does not work:

@Kavo(prisma.book)        // ✗ wrong — a delegate is not an identity
@Kavo(Book)               // ✓ the marker class

Declare the fields anyway — they are what gives you type safety. At runtime @kavo/prisma reads only .name off the class and takes all real metadata from Prisma's DMMF, so an empty class Book {} still produces working routes. But the declared fields are what type createCrud's generic parameters, so an empty marker class collapses Entity to {} and every typed surface built on it silently stops checking anything: allowed.filterable/sortable/selectable, query.defaultSort, and the DTO slot generics all stop rejecting misspelled field names at compile time.

Name-matching is what binds class to model, so a marker class named Books for a model named Book will not resolve — that one fails loudly, as a bootstrap ConfigurationException rather than a silent no-op. See ADR-0017 for the full rationale.

Wiring

// app.module.ts
import { Module } from "@nestjs/common";
import { KavoModule } from "@kavo/nest";
import { createInfrastructure } from "@kavo/prisma";
import { PrismaClient, Prisma } from "@prisma/client";
import { Book } from "./book.entity.js";
import { BookController } from "./book.controller.js";

const prisma = new PrismaClient();

@Module({
  imports: [
    KavoModule.forRoot({
      infrastructure: createInfrastructure(prisma, {
        datamodel: Prisma.dmmf.datamodel,
        entities: [Book],
      }),
    }),
  ],
  controllers: [BookController],
})
export class AppModule {}

Read the full file on GitHub · 135 lines

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. 4d ago Changed 04d099bf199f
  2. 7d ago First seen · 135 lines · 88 tokens per session scan A f7762aeb83e6

Subscribe to this mod's changes

prisma-adapter is a skill published in the GitHub repository kavo-labs/kavo (14 stars, last pushed yesterday), licensed MIT. It adds 88 tokens to every session and 1,187 once invoked, about $0.0004 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-02.

Related

Other skills, from other repositories

servicenow-table-api

Foundational ServiceNow data access — generic Table API CRUD, Aggregate/stats roll-ups, and raw REST escape-hatch via the servicenow-api MCP server. Use when the agent must read, insert, update, patch, delete, count, or aggregate records in ANY ServiceNow table (including scoped app tables with no dedicated API), or…

Knuckles-Team/servicenow-api · 180 tokens

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…

prisma/orm · 220 tokens

horse-database-pooling

Guide for setting up thread-safe database connection pooling (FireDAC / UniDAC) in multithreaded Horse applications.

HashLoad/horse · 30 tokens

ocli-api

Turn any OpenAPI/Swagger API into CLI commands and call them. Search endpoints with BM25, check parameters, execute — no MCP server needed.

EvilFreelancer/openapi-to-cli · 34 tokens

db-infra-mocks

Propose minimal seams and local substitutes so tests run without real RDBMS/Redis/Mongo infrastructure.

pilinux/gorest · 27 tokens

mail-time

Use when building, wiring, reviewing, or debugging MailTime and ostrio:mailer email queues for horizontally scaled Node.js, Bun, or Meteor apps. Trigger on MailTime, MongoQueue, RedisQueue, PostgresQueue, mailTimePreset, JoSk email scheduling, Redis Cluster / KeyDB Cluster / Valkey useHashTags, KeyDB…

veliovgroup/mail-time · 179 tokens