मुख्य सामग्री पर जाएँ
Skillpedia
API और सर्वर (backend)48k · #6313

prisma-8

यह क्या करती है

यह आपके एजेंट को Prisma 8 के साथ काम करने के लिए मौजूदा मार्गदर्शन देती है, जो data contract के आसपास बना database toolkit है। यह उन डेवलपर्स के लिए है जो Prisma 8 पर ऐप बना रहे हैं और चाहते हैं कि एजेंट मौजूदा वर्ज़न सही ढंग से इस्तेमाल करे।

कब इस्तेमाल करें

  • ✓जब आप data contract फ़ाइल संपादित करते हैं या contract artifacts बनाने वाला कमांड चलाते हैं।
  • ✓जब आपको Prisma 8 प्रोजेक्ट में database migration की योजना बनानी या लागू करनी है।
  • ✓जब आप Prisma 8 प्रोजेक्ट में database queries लिखते हैं या database कनेक्शन सेट करते हैं।

Skill का लिंक

https://github.com/prisma/orm/blob/main/skills/prisma-8/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/prisma/orm/blob/main/skills/prisma-8/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“क्या आप इस Prisma 8 प्रोजेक्ट में मेरे contract में एक नया field जोड़ सकते हैं और उसके लिए migration की योजना बना सकते हैं?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट पहले जाँचता है कि प्रोजेक्ट सच में Prisma 8 इस्तेमाल करता है, फिर इंस्टॉल वर्ज़न के साथ आई reference फ़ाइलों का इस्तेमाल करता है। वे फ़ाइलें एजेंट की Prisma के बारे में याददाश्त से पहले मानी जाती हैं।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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.

  1. The project is on Prisma 8. prisma.config.ts exports definePrismaConfig({ orm: ... }), and package.json depends on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. A project with schema.prisma and @prisma/client is Prisma 7 or earlier; this skill does not apply to it, and its instructions will break such a project.
  2. The skill matches the installed version. Compare metadata.library_version in this file's frontmatter with the installed @prisma/orm-* version in package.json. If they differ, run prisma skills sync and re-read this file before continuing.
  3. The contract artefacts exist. contract.json and contract.d.ts sit next to the contract source named by prisma.config.ts. If they are missing or older than the source, run prisma contract emit first; 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:

  1. Edit your data contract. (references/contract.md)
  2. The system plans the migrations for you. (references/migrations.md)
  3. If you need data migrations, you edit migration.ts and 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

अक्सर पूछे जाने वाले सवाल

क्या यह पुराने Prisma प्रोजेक्ट के साथ काम करती है?

नहीं। स्किल सिर्फ़ Prisma 8 प्रोजेक्ट पर लागू होती है, और इसके निर्देश Prisma 7 या उससे पुराने प्रोजेक्ट को तोड़ देंगे।

अगर स्किल का वर्ज़न मेरे इंस्टॉल से न मिले तो?

स्किल कहती है कि आगे बढ़ने से पहले prisma skills sync चलाएँ और फ़ाइल फिर से पढ़ें।

शुरू करने से पहले क्या मौजूद होना चाहिए?

contract artifacts, जैसे contract.json और contract.d.ts, मौजूद और अद्यतन होने चाहिए। न हों तो एजेंट पहले prisma contract emit चलाता है।

जानकारी

लेखक का मूल विवरण

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

लोकप्रियता

GitHub स्टार
48k
रैंकिंग में स्थान
#6313
लाइसेंस
Apache-2.0
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

adr-review

48k

आपके एजेंट को architecture decision records को नई नज़र से जाँचना और फिर उन्हें दोबारा लिखना सिखाती है, ताकि नए पाठकों को फ़ैसला साफ़ समझ आए।

लेखन और डॉक्यूमेंटडॉक्यूमेंटेशन

ast-visitor-pattern

48k

आपके एजेंट को कई जगह संभाले जाने वाले union types के लिए कोड पैटर्न सिखाती है, ताकि नया जोड़ा गया variant compiler पकड़ ले।

कोडिंगसामान्य कोडिंग

markdown-no-artificial-line-wraps

48k

आपके एजेंट को Markdown में पूरे पैराग्राफ़ एक ही पंक्ति में लिखने में मदद करती है, ताकि स्क्रीन पर टेक्स्ट साफ़ लिपटे और फ़ाइल के बदलाव भी साफ़ रहें।

लेखन और डॉक्यूमेंटलेखन

multiline-commit-messages

48k

आपके एजेंट को shell में बहु-पंक्ति git commit संदेश सुरक्षित तरीके से लिखना दिखाती है, ताकि संदेश गड़बड़ न हो।

कोडिंगसामान्य कोडिंग

मिलती-जुलती skills