prisma-8
Qué hace
Da a tu agente orientación actualizada para trabajar con Prisma 8, un conjunto de herramientas de base de datos basado en un contrato de datos. Está pensada para desarrolladores que crean una app con Prisma 8 y quieren que el agente use correctamente la versión actual.
Cuándo usarla
- ✓Cuando editas el archivo del contrato de datos o ejecutas el comando que genera los artefactos del contrato.
- ✓Cuando necesitas planificar o aplicar una migración de base de datos en un proyecto de Prisma 8.
- ✓Cuando escribes consultas a la base de datos o configuras la conexión en un proyecto de Prisma 8.
Link de la skill
https://github.com/prisma/orm/blob/main/skills/prisma-8/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“¿Puedes añadir un campo nuevo a mi contrato y planificar la migración para él en este proyecto de Prisma 8?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente primero comprueba que el proyecto usa realmente Prisma 8, y después usa los archivos de referencia que incluye la versión instalada. Esos archivos tienen prioridad sobre lo que el agente recuerda de Prisma.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Prisma 8 (Prisma 8)
Edit your data contract. Prisma handles the rest.
Prisma 8 moves fast, and your training data about it is very likely outdated. This skill ships inside the installed Prisma packages, so it describes the exact version this project has — treat it and its reference files as the source of truth, over anything you remember about Prisma.
Pre-conditions
Check these before acting on anything below. Halt on the first one that fails and tell the user what is missing.
- The project is on Prisma 8.
prisma.config.tsexportsdefinePrismaConfig({ orm: ... }), andpackage.jsondepends on@prisma/orm-postgres,@prisma/orm-sqlite, or@prisma/orm-mongo. A project withschema.prismaand@prisma/clientis Prisma 7 or earlier; this skill does not apply to it, and its instructions will break such a project. - The skill matches the installed version. Compare
metadata.library_versionin this file's frontmatter with the installed@prisma/orm-*version inpackage.json. If they differ, runprisma skills syncand re-read this file before continuing. - The contract artefacts exist.
contract.jsonandcontract.d.tssit next to the contract source named byprisma.config.ts. If they are missing or older than the source, runprisma contract emitfirst; every query and migration instruction below assumes current artefacts.
Import paths in the references. The reference files spell façade imports as @internal/<target>/<subpath> and @internal/extension-<name>/<subpath>. In an application those packages are published as @prisma/orm-<target>/<subpath> (@prisma/orm-postgres/runtime, @prisma/orm-mongo/config, @prisma/orm-sqlite/runtime) and @prisma/orm-extension-<name>/<subpath> (@prisma/orm-extension-pgvector/control). Write the @prisma/orm-* name in user code; the two spellings are the same package. Paths already written as @prisma/orm-* in the references are exact. The metadata.library_version in this file's frontmatter is the version it was published with; if it does not match the project's installed Prisma packages, run prisma skills sync and re-read.
Never reset or drop a database
Never reset or drop a database to fix a migration, marker or contract problem, and never propose it. A database can always be moved to the contract you want. When its migration history does not need to be kept (a local, development, staging or preview database), reconcile it with prisma db update. When it changes only through migrations, as production should, author the migrations that bring it there. A deploy that says there is no migration path, or MIGRATION.MARKER_MISMATCH, is covered in references/migrations.md § A database whose marker is not in the migration graph.
Prisma 8 is a contract-first data layer. This skill routes every Prisma 8 task to the right reference file — open the reference before writing code; do not answer from this file alone.
The canonical model (one paragraph)
You author a data contract (a contract.prisma file, or a TypeScript builder). The framework emits machine-readable artifacts (contract.json, contract.d.ts) and gives you two runtime surfaces on SQL targets: a typed SQL query builder (db.sql.<ns>.<table>) and a typed ORM client (db.orm.<ns>.<Model>). On MongoDB targets only the ORM lane exists, and its keys are collection storage names (db.orm.users) rather than PSL model names — references/queries.md § MongoDB ORM addressing covers the rule. Migrations are planned from the contract diff; you review them, optionally edit the migration.ts for data transforms, and apply.
Three steps the user does:
- Edit your data contract. (
references/contract.md) - The system plans the migrations for you. (
references/migrations.md) - If you need data migrations, you edit
migration.tsand execute it. (references/migrations.md)
Everything else — queries, runtime wiring, build integration, debugging, feedback — sits on top of those three.
One cross-cutting migration fact: migration plan does not chain from the newest migration on disk. Its origin is --from, else the db ref, else an empty database — so a project with no ref keeps planning from scratch. Over existing migrations the CLI refuses that (MIGRATION.PLAN_ORIGIN_UNKNOWN) instead of writ
Preguntas frecuentes
¿Funciona con proyectos de Prisma más antiguos?
No. La skill solo se aplica a proyectos de Prisma 8, y sus instrucciones romperían un proyecto de Prisma 7 o anterior.
¿Qué pasa si la versión de la skill no coincide con mi instalación?
La skill indica que hay que ejecutar prisma skills sync y leer el archivo otra vez antes de continuar.
¿Qué debe existir antes de empezar?
Los artefactos del contrato, como contract.json y contract.d.ts, deben existir y estar actualizados, así que el agente ejecuta primero prisma contract emit si faltan.
Detalles
Descripción original del autor
Use when working in a project that depends on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo (Prisma 8, formerly Prisma Next): editing contract.prisma or a contract.ts builder, running `prisma contract emit`, planning or applying migrations, editing migration.ts, writing db.orm / db.sql / db.query queries, wiring db.ts or middleware, integrating a build tool, using the Supabase extension or RLS, or reading a dotted error code such as MIGRATION.HASH_MISMATCH. Use when the user asks "what is Prisma 8", "where do I start", or compares it to another ORM. Use when the user asks to u
repo: prisma/orm
Popularidad
- Estrellas en GitHub
- 48 mil
- Posición en el ranking
- #6313
- Licencia
- Apache-2.0
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
adr-review
48 milEnseña a tu agente a revisar registros de decisiones de arquitectura con mirada nueva, y después reescribirlos para que la decisión sea clara para los lectores nuevos.
ast-visitor-pattern
48 milEnseña a tu agente un patrón de código para tipos unión que se manejan en varios lugares, de forma que el compilador detecte una variante nueva que se añada.
markdown-no-artificial-line-wraps
48 milAyuda a tu agente a escribir Markdown con párrafos completos en una sola línea, para que el texto se ajuste bien en pantalla y los cambios en el archivo sigan limpios.
multiline-commit-messages
48 milMuestra a tu agente una forma segura de escribir mensajes de confirmación de git de varias líneas en una terminal, para que el mensaje no salga estropeado.
Skills parecidas
api-connector-builder
280 milHace que tu agente cree nuevas conexiones de API siguiendo el patrón existente. Úsalo para añadir una integración más sin inventar otra forma de hacer las cosas.
api-design
280 milAyuda a tu agente a diseñar APIs REST según las buenas prácticas. Es útil para definir cómo se comunican las APIs, cómo se muestran los errores y cómo organizar los datos.
backend-patterns
280 milAyuda a tu agente con patrones de arquitectura del lado del servidor y optimización de bases de datos. Es útil para crear o revisar código que se ejecuta en el servidor.