prisma-knowledge-patch
Prisma changes since training cutoff (latest: 7.3) — v7 ESM rewrite, prisma-client generator, driver adapters, prisma.config.ts, TypedSQL, SQL comments. Load before working with Prisma.
What this skill does
# Prisma 5.19+ / 7.x Knowledge Patch
Claude's baseline knowledge covers Prisma through 5.18. This skill provides changes from 5.19.0 onwards, with major focus on the Prisma 7 rewrite.
## Prisma 7 Breaking Changes Quick Reference
| What Changed | Old (v6) | New (v7+) |
|--------------|----------|-----------|
| Generator | `prisma-client-js` | `prisma-client` (required) |
| Output | Auto in `node_modules` | `output` field required |
| Import | `from "@prisma/client"` | `from "./generated/prisma/client"` |
| DB connection | Connection string in schema | Driver adapter required |
| Config | `schema.prisma` datasource | `prisma.config.ts` at project root |
| Module format | CJS | ESM only (`"type": "module"`) |
| Env vars | Auto-loaded `.env` | Manual load (use `dotenv`) |
| Middleware | `$use()` | Client Extensions `$extends()` |
| Seeding | Auto after `migrate dev` | Manual `prisma db seed` |
| Generate | Auto after `migrate dev` | Manual `prisma generate` |
| SSL certs | Ignored invalid certs | Validated by `node-pg` |
## Prisma 7 Setup
```prisma
// schema.prisma
generator client {
provider = "prisma-client"
output = "../src/generated/prisma"
}
```
```ts
// prisma.config.ts (project root)
import "dotenv/config"
import { defineConfig, env } from "prisma/config"
export default defineConfig({
schema: "prisma/schema.prisma",
migrations: { path: "prisma/migrations", seed: "tsx prisma/seed.ts" },
datasource: { url: env("DATABASE_URL") },
})
```
```ts
// app.ts — PostgreSQL
import { PrismaClient } from "./generated/prisma/client"
import { PrismaPg } from "@prisma/adapter-pg"
const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL })
export const prisma = new PrismaClient({ adapter })
```
```ts
// app.ts — SQLite
import { PrismaClient } from "./generated/prisma/client"
import { PrismaBetterSqlite3 } from "@prisma/adapter-better-sqlite3"
const adapter = new PrismaBetterSqlite3({ url: "file:./dev.db" })
export const prisma = new PrismaClient({ adapter })
```
```ts
// app.ts — Prisma Accelerate (no adapter)
import { PrismaClient } from "./generated/prisma/client"
import { withAccelerate } from "@prisma/extension-accelerate"
export const prisma = new PrismaClient({
accelerateUrl: process.env.DATABASE_URL,
}).$extends(withAccelerate())
```
See [references/prisma7-migration.md](references/prisma7-migration.md) for full upgrade guide.
## TypedSQL (5.19.0+)
Write `.sql` files in `prisma/sql/`, generate typed functions:
```sql
-- prisma/sql/getUsersByAge.sql
SELECT * FROM "User" WHERE "age" > $1
```
```ts
import { getUsersByAge } from "@prisma/client/sql" // v6
// or from "./generated/prisma/sql" in v7
const users = await prisma.$queryRawTyped(getUsersByAge(18))
```
## SQL Comments / Observability (7.1.0+)
```ts
import { queryTags, withQueryTags } from '@prisma/sqlcommenter-query-tags'
import { traceContext } from '@prisma/sqlcommenter-trace-context'
const prisma = new PrismaClient({
adapter,
comments: [queryTags(), traceContext()],
})
// Per-request tags
const users = await withQueryTags(
{ route: '/api/users', requestId: 'abc-123' },
() => prisma.user.findMany(),
)
// SQL: SELECT ... FROM "User" /*requestId='abc-123',route='/api/users'*/
```
Custom plugins implement `SqlCommenterPlugin` from `@prisma/sqlcommenter`.
## Other New Features
- **6.3.0**: `limit` on `updateMany()` and `deleteMany()`
- **6.3.0**: `NOT EXISTS` replaces `NOT IN` for PostgreSQL relation filters (better perf)
- **7.0.0**: MongoDB not yet supported in v7 (continue using v6)
- **7.0.0**: `prisma migrate diff` options renamed: `--from-url` → `--from-config-datasource`
- **7.3.0**: `compilerBuild` option (`"fast"` | `"small"`) in generator block
- **7.3.0**: Raw queries (`$executeRaw`/`$queryRaw`) bypass query compiler with driver adapters
## Prerequisites (v7)
| Requirement | Minimum | Recommended |
|-------------|---------|-------------|
| Node.js | 20.19.0 | 22.x |
| TypeScript | 5.4.0 | 5.9.x |
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.