prisma-8
O que ela faz
Dá ao seu agente orientações atualizadas para trabalhar com o Prisma 8, um kit de ferramentas de banco de dados construído em torno de um contrato de dados. Ela é para desenvolvedores que criam um app com o Prisma 8 e querem que o agente use a versão atual corretamente.
Quando usar
- ✓Quando você editar o arquivo do contrato de dados ou executar o comando que gera os artefatos do contrato.
- ✓Quando precisar planejar ou aplicar uma migração de banco de dados em um projeto Prisma 8.
- ✓Quando escrever consultas ao banco de dados ou configurar a conexão com ele em um projeto Prisma 8.
Link da skill
https://github.com/prisma/orm/blob/main/skills/prisma-8/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Pode adicionar um campo novo ao meu contrato e planejar a migração dele neste projeto Prisma 8?”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O agente primeiro confirma que o projeto realmente usa o Prisma 8 e depois usa os arquivos de referência que vêm com a versão instalada. Esses arquivos têm prioridade sobre o que o agente lembra sobre o Prisma.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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
Perguntas frequentes
Ela funciona com projetos Prisma mais antigos?
Não. A skill se aplica apenas a projetos Prisma 8, e suas instruções quebrariam um projeto Prisma 7 ou anterior.
E se a versão da skill não corresponder à minha instalação?
A skill diz para executar prisma skills sync e ler o arquivo de novo antes de continuar.
O que deve existir antes de ela começar?
Os artefatos do contrato, como contract.json e contract.d.ts, devem existir e estar atualizados, então o agente executa prisma contract emit primeiro se eles estiverem faltando.
Detalhes
Descrição original do 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
Popularidade
- Estrelas no GitHub
- 48 mil
- Posição no ranking
- #6313
- Licença
- Apache-2.0
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
adr-review
48 milEnsina seu agente a revisar registros de decisão de arquitetura com olhar novo e depois reescrevê-los para que a decisão fique clara para leitores novos.
ast-visitor-pattern
48 milEnsina seu agente um padrão de código para tipos união tratados em vários lugares, para que uma nova variante seja detectada pelo compilador.
markdown-no-artificial-line-wraps
48 milAjuda seu agente a escrever Markdown com parágrafos inteiros em uma só linha, para que o texto quebre bem na tela e as alterações nos arquivos fiquem limpas.
multiline-commit-messages
48 milMostra ao seu agente uma forma segura de escrever mensagens de commit do git com várias linhas em um shell, para que a mensagem não saia corrompida.
Skills parecidas
api-connector-builder
280 milFaz seu agente construir novas conexões com APIs seguindo o padrão já existente. Use quando precisar adicionar mais uma integração sem criar um novo jeito de fazer.
api-design
280 milAjuda seu agente a projetar APIs REST seguindo as melhores práticas. É útil para definir como as APIs se comunicam, como os erros são mostrados e como organizar os dados.
backend-patterns
280 milAjuda seu agente com padrões de arquitetura do lado do servidor e otimização de banco de dados. É útil para construir ou revisar o código que roda no servidor.