prisma-8
하는 일
데이터 계약을 중심으로 하는 데이터베이스 도구인 Prisma 8에 대해, 최신 버전에 맞는 작업 방법을 에이전트에 제공합니다. Prisma 8로 앱을 만들며 에이전트가 이 버전을 올바르게 쓰기를 원하는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓데이터 계약 파일을 편집하거나 계약 산출물을 생성하는 명령을 실행할 때.
- ✓Prisma 8 프로젝트에서 데이터베이스 마이그레이션을 계획하거나 적용해야 할 때.
- ✓Prisma 8 프로젝트에서 데이터베이스 쿼리를 작성하거나 연결을 설정하는 경우.
스킬 링크
https://github.com/prisma/orm/blob/main/skills/prisma-8/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 Prisma 8 프로젝트의 계약에 새 필드를 추가하고, 그에 맞는 마이그레이션을 계획해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 먼저 프로젝트가 실제로 Prisma 8을 쓰는지 확인한 뒤, 설치된 버전에 포함된 참고 파일을 사용합니다. 그 파일이 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.
- 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
자주 묻는 질문
이전 버전의 Prisma 프로젝트에서도 작동하나요?
아니요. 이 스킬은 Prisma 8 프로젝트에만 적용되며, 지침은 Prisma 7 이하 프로젝트를 망가뜨릴 수 있습니다.
스킬 버전이 설치한 버전과 다르면 어떻게 하나요?
스킬은 prisma skills sync를 실행하고 파일을 다시 읽은 뒤 계속하라고 안내합니다.
시작하기 전에 무엇이 있어야 하나요?
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
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
adr-review
48k아키텍처 결정 기록을 새로운 눈으로 검토한 뒤, 새 독자도 결정을 명확히 이해하도록 다시 씁니다.
ast-visitor-pattern
48k여러 곳에서 처리되는 유니온 타입에서, 새 변형을 추가하면 컴파일러가 빠뜨린 곳을 잡아내도록 하는 코드 패턴을 가르칩니다.
markdown-no-artificial-line-wraps
48k마크다운 문단을 한 줄로 쓰도록 에이전트를 돕습니다. 화면에서 글이 깔끔하게 줄바꿈되고 파일 변경도 깨끗하게 유지됩니다.
multiline-commit-messages
48k셸에서 여러 줄 git 커밋 메시지를 안전하게 쓰는 방법을 에이전트에 보여 주어, 메시지가 깨지지 않게 합니다.
비슷한 스킬
api-connector-builder
280k에이전트가 기존 패턴을 따라 새로운 API 연결을 만들도록 합니다. 새로운 방식을 도입하지 않고 연동을 하나 더 추가할 때 씁니다.
api-design
280k에이전트가 모범 사례에 따라 REST API를 설계하도록 돕습니다. API가 통신하는 방식, 오류를 보여 주는 방식, 데이터를 정리하는 방식을 정하는 데 유용합니다.
backend-patterns
280k에이전트가 서버 쪽 아키텍처 패턴과 데이터베이스 최적화를 다루도록 돕습니다. 서버에서 실행되는 코드를 만들거나 검토할 때 유용합니다.