SQLite Setup. Reference when using this Prisma feature.
npx skills add https://github.com/prisma/cursor-plugin --skill prisma-database-setup-sqlite
Configure Prisma with SQLite.
In prisma/schema.prisma:
datasource db {
provider = "sqlite"
}
generator client {
provider = "prisma-client"
output = "../generated"
}
In prisma.config.ts:
import { defineConfig, env } from 'prisma/config'
export default defineConfig({
schema: 'prisma/schema.prisma',
datasource: {
url: env('DATABASE_URL'),
},
})
In .env:
DATABASE_URL="file:./dev.db"
file:PATH
prisma/schema.prisma location usually, but in v7 check prisma.config.ts context). Usually relative to the schema file.Prisma ORM 7 uses the query compiler by default, so you must use a driver adapter.
npm install @prisma/adapter-better-sqlite3 better-sqlite3
import { PrismaClient } from '../generated/client'
import { PrismaBetterSqlite3 } from '@prisma/adapter-better-sqlite3'
const adapter = new PrismaBetterSqlite3({
url: process.env.DATABASE_URL ?? 'file:./dev.db',
})
const prisma = new PrismaClient({ adapter })
For edge compatibility or Turso:
npm install @prisma/adapter-libsql @libsql/client
import { PrismaClient } from '../generated/client'
import { PrismaLibSql } from '@prisma/adapter-libsql'
const adapter = new PrismaLibSql({
url: process.env.TURSO_DATABASE_URL,
authToken: process.env.TURSO_AUTH_TOKEN,
})
const prisma = new PrismaClient({ adapter })
String[] is not supported directly.Ensure the path in DATABASE_URL is correct relative to where Prisma is running or the schema file. file:./dev.db creates it next to schema.
Take prisma/prisma-database-setup-sqlite from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npm.
Without those the skill loads but fails at the first command.