prisma-8
Ce qu’il fait
Cette compétence donne à votre agent des consignes à jour pour travailler avec Prisma 8, une boîte à outils de base de données construite autour d'un contrat de données. Elle s'adresse aux développeurs qui construisent une application sur Prisma 8 et veulent que l'agent utilise correctement la version actuelle.
Quand l’utiliser
- ✓Quand vous modifiez le fichier du contrat de données ou lancez la commande qui génère ses artefacts.
- ✓Quand vous devez planifier ou appliquer une migration de base de données dans un projet Prisma 8.
- ✓Quand vous écrivez des requêtes de base de données ou configurez la connexion dans un projet Prisma 8.
Lien du skill
https://github.com/prisma/orm/blob/main/skills/prisma-8/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Peux-tu ajouter un nouveau champ à mon contrat et planifier la migration correspondante dans ce projet Prisma 8 ?”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
L'agent vérifie d'abord que le projet utilise bien Prisma 8, puis s'appuie sur les fichiers de référence fournis avec la version installée. Ces fichiers passent avant ce que l'agent retient de Prisma de mémoire.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis 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
Questions fréquentes
Fonctionne-t-elle avec les anciens projets Prisma ?
Non. La compétence ne s'applique qu'aux projets Prisma 8, et ses instructions casseraient un projet Prisma 7 ou antérieur.
Que faire si la version de la compétence ne correspond pas à mon installation ?
La compétence indique d'exécuter prisma skills sync, puis de relire le fichier avant de continuer.
Que doit-il exister avant le démarrage ?
Les artefacts du contrat, comme contract.json et contract.d.ts, doivent exister et être à jour, donc l'agent lance prisma contract emit s'ils manquent.
Détails
Description originale de l’auteur
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
Popularité
- Étoiles GitHub
- 48k
- Position au classement
- #6313
- Licence
- Apache-2.0
- Mis à jour
- 02/11/2026
Commentaires
- …
Autres skills de ce dépôt
adr-review
48kApprend à votre agent à relire les enregistrements de décisions d'architecture avec un regard neuf, puis à les réécrire pour que la décision soit claire pour les nouveaux lecteurs.
ast-visitor-pattern
48kApprend à votre agent un schéma de code pour les types union gérés à plusieurs endroits, afin que la compilation signale une nouvelle variante ajoutée.
markdown-no-artificial-line-wraps
48kAide votre agent à écrire du Markdown avec des paragraphes entiers sur une seule ligne, pour que le texte se retourne proprement à l'écran et que les modifications de fichiers restent nettes.
multiline-commit-messages
48kMontre à votre agent une manière sûre d'écrire des messages de commit Git sur plusieurs lignes dans un shell, pour que le message ne soit pas altéré.
Skills similaires
api-connector-builder
280kPermet à votre agent de créer de nouvelles connexions API en suivant le modèle existant. À utiliser pour ajouter une intégration sans inventer une nouvelle façon de faire.
api-design
280kAide votre agent à concevoir des API REST selon les bonnes pratiques. Utile pour définir la communication entre API, l'affichage des erreurs et l'organisation des données.
backend-patterns
280kAide votre agent avec les architectures côté serveur et l'optimisation des bases de données. Utile pour créer ou relire du code qui s'exécute sur le serveur.