[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71FXHGDW9C5546AEJ27RY77":3,"skill-same:01M71FXHGDW9C5546AEJ27RY77":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":6,"ownerHtmlUrl":56,"ownerBlogUrl":57,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M71FXHGDW9C5546AEJ27RY77","prisma-postgres-setup",null,"Set up a new Prisma Postgres database and connect it to a local project using the Management API. Use when asked to \"set up a database\", \"create a Prisma Postgres project\", \"get a connection string\", \"connect my app to Prisma Postgres\", or \"provision a database\".","iDorgham\u002FWorkspace-Factory","iDorgham","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F136521493?v=4","01M6CNGBDAHE4ARW3YJEF4X2FD","Dorgham","01M71E8H3CXZ7DJX59MTM9JEB2",1,"MIT","https:\u002F\u002Fgithub.com\u002FiDorgham\u002FWorkspace-Factory\u002Fblob\u002Fmaster\u002F.ai\u002Fskills\u002Fofficial_prisma_prisma_postgres_setup\u002Fskill.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"prisma","prisma postgres setup","prisma postgres","setup","postgres","my","connection","create","api","when","database","connect","use","new","local","up","project","get","app","SET","2026-11-10 10:12:30",false,"---\nname: prisma-postgres-setup\ndescription: Set up a new Prisma Postgres database and connect it to a local project using the Management API. Use when asked to \"set up a database\", \"create a Prisma Postgres project\", \"get a connection string\", \"connect my app to Prisma Postgres\", or \"provision a database\".\nlicense: MIT\nmetadata:\n  author: prisma\n  version: \"1.1.0\"\n---\n\n# Prisma Postgres Setup\n\nProcedural skill that guides you through provisioning a new Prisma Postgres database via the Management API and connecting it to a local project.\n\n## When to Apply\n\nUse this skill when:\n\n- Setting up a new Prisma Postgres database for a project\n- Creating a Prisma Postgres project and connecting it locally\n- Obtaining a connection string for Prisma Postgres\n- Provisioning a database via the Management API (not the Console UI)\n\nDo **not** use this skill when:\n\n- Setting up CI\u002FCD preview databases — use `prisma-postgres-cicd`\n- Building multi-tenant database provisioning into an app — use `prisma-postgres-integrator`\n- Working with a database that already exists and is connected (schema\u002Fmigration tasks are standard Prisma CLI)\n\n## Prerequisites\n\n- Node.js 18+\n- A Prisma Postgres workspace (create one at https:\u002F\u002Fconsole.prisma.io if needed)\n- A workspace service token (see `references\u002Fauth.md`)\n\n## UX Guidelines\n\nWhen presenting choices to the user (region selection, project deletion, etc.), **use your platform's interactive selection mechanism** (e.g., `ask` tool in Claude Code, structured prompts in other agents). Do not print static tables and ask the user to type a value — present selectable options so the user can pick with minimal effort.\n\n## Workflow\n\nFollow these steps in order. Each step includes the API call to make and how to handle the response.\n\n### Step 1: Authenticate\n\nYou need a service token. Try these methods in order:\n\n**1a. Token in the user's prompt**\n\nCheck if the user included a service token in their initial message (e.g., \"Set up Prisma Postgres with token eyJ...\"). If so, use it **exactly as provided** — do not truncate, re-encode, or round-trip it through a file. Store it in a shell variable for subsequent calls.\n\n**1b. Token in the environment**\n\nCheck for `PRISMA_SERVICE_TOKEN` in the environment or `.env` file.\n\n**1c. Ask the user to create one**\n\nIf no token is available, instruct the user:\n\n> Create a service token in Prisma Console → Workspace Settings → Service Tokens.\n> Copy the token and paste it here.\n\nRead `references\u002Fauth.md` for details on service token creation.\n\nOnce you have a token, store it in a shell variable (`PRISMA_SERVICE_TOKEN`) and use it for all subsequent API calls.\n\n### Step 2: List available regions\n\nFetch the list of available Prisma Postgres regions to let the user choose where to deploy.\n\n```bash\ncurl -s -H \"Authorization: Bearer $PRISMA_SERVICE_TOKEN\" \\\n  https:\u002F\u002Fapi.prisma.io\u002Fv1\u002Fregions\u002Fpostgres\n```\n\nThe response contains an array of regions with `id`, `name`, and `status`. Only present regions where `status` is `available`.\n\n**Present the regions as an interactive menu** — let the user pick from options rather than typing a region ID manually.\n\nRead `references\u002Fendpoints.md` for the full response shape.\n\n### Step 3: Create a project with a database\n\n```bash\ncurl -s -X POST https:\u002F\u002Fapi.prisma.io\u002Fv1\u002Fprojects \\\n  -H \"Authorization: Bearer $PRISMA_SERVICE_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"name\": \"\u003Cproject-name>\",\n    \"region\": \"\u003Cregion-id>\",\n    \"createDatabase\": true\n  }'\n```\n\nUse the current directory name as the project name by default.\n\nThe response is wrapped in `{ \"data\": { ... } }`. Extract:\n\n- `data.id` — the project ID (prefixed with `proj_`)\n- `data.database.id` — the database ID (prefixed with `db_`)\n- `data.database.connections[0].endpoints.direct.connectionString` — the direct PostgreSQL connection string\n\nUse the **direct** connection string (`endpoints.direct.connectionString`). Do not use the pooled or accelerate endpoints — those are for legacy Accelerate setups and not needed for new projects.\n\nIf the response status is `provisioning`, wait a few seconds and poll `GET \u002Fv1\u002Fdatabases\u002F\u003Cdatabase-id>` until `status` is `ready`.\n\n**If creation fails due to a database limit**, list the user's existing projects and present them as an interactive menu for deletion. After the user picks one, delete it and retry.\n\nRead `references\u002Fendpoints.md` for the full request\u002Fresponse shapes.\n\n### Step 4: Create a named connection (optional)\n\nIf you need a dedicated connection (e.g., per-developer or per-environment), create one:\n\n```bash\ncurl -s -X POST https:\u002F\u002Fapi.prisma.io\u002Fv1\u002Fdatabases\u002F\u003Cdatabase-id>\u002Fconnections \\\n  -H \"Authorization: Bearer $PRISMA_SERVICE_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"name\": \"dev\" }'\n```\n\nExtract the direct connection string from `data.endpoints.direct.connectionString`.\n\n### Step 5: Configure the local project\n\n1. Install dependencies:\n\n```bash\nnpm install prisma @prisma\u002Fclient @prisma\u002Fadapter-pg pg dotenv\n```\n\nAll five packages are required:\n- `prisma` — CLI for migrations, schema push, client generation\n- `@prisma\u002Fclient` — the generated query client\n- `@prisma\u002Fadapter-pg` — Prisma 7 driver adapter for direct PostgreSQL connections\n- `pg` — Node.js PostgreSQL driver (used by the adapter)\n- `dotenv` — loads `.env` variables for `prisma.config.ts`\n\n2. Write the direct connection string to `.env`. **Append** to the file if it already exists — do not overwrite existing entries:\n\n```\nDATABASE_URL=\"\u003Cdirect-connection-string>\"\n```\n\n3. Verify `.gitignore` includes `.env`. Create `.gitignore` if it does not exist. Warn the user if `.env` is not gitignored.\n\n4. Ensure `package.json` has `\"type\": \"module\"` set (Prisma 7 generates ESM output).\n\n5. If `prisma\u002Fschema.prisma` does not exist, run `npx prisma init` to scaffold the project. This creates both `prisma\u002Fschema.prisma` and `prisma.config.ts`.\n\n6. Ensure `schema.prisma` has the `postgresql` provider and **no** `url` or `directUrl` in the datasource block (Prisma 7 manages connection URLs in `prisma.config.ts`, not in the schema):\n\n```prisma\ndatasource db {\n  provider = \"postgresql\"\n}\n```\n\n7. Ensure `prisma.config.ts` loads the connection URL from the environment:\n\n```typescript\nimport path from 'node:path'\nimport { defineConfig } from 'prisma\u002Fconfig'\nimport 'dotenv\u002Fconfig'\n\nexport default defineConfig({\n  earlyAccess: true,\n  schema: path.join(import.meta.dirname, 'prisma', 'schema.prisma'),\n  datasource: {\n    url: process.env.DATABASE_URL!,\n  },\n})\n```\n\n**Important Prisma 7 notes:**\n- Connection URLs go in `prisma.config.ts`, never in `schema.prisma`\n- The provider in `schema.prisma` must be `\"postgresql\"` (not `\"prismaPostgres\"`)\n- `dotenv\u002Fconfig` must be imported in `prisma.config.ts` to load `.env` variables\n\n### Step 6: Define schema and push\n\nIf the schema already has models, skip to pushing. Otherwise, **present these options as an interactive menu**:\n\n1. **\"I'll define my schema manually\"** — Tell the user to edit `prisma\u002Fschema.prisma` and come back when ready. Wait for them before proceeding.\n2. **\"Give me a starter schema\"** — Add a Blog starter schema (User, Post, Comment with relations) to `prisma\u002Fschema.prisma`. Show the user what was added and ask if they want to adjust it before pushing.\n3. **\"I'll describe what I need\"** — Ask the user to describe their data model in natural language (e.g., \"I'm building a task manager with projects, tasks, and team members\"). Generate a schema from the description, show it, and ask for confirmation before pushing.\n\nOnce the schema has models and the user is ready, create a migration and generate the client:\n\n```bash\nnpx prisma migrate dev --name init\n```\n\nThis creates migration files in `prisma\u002Fmigrations\u002F` **and** generates the client in one step. Migration history is essential for CI\u002FCD workflows (`prisma migrate deploy`) and production deployments.\n\nOnly use `npx prisma db push` if the user explicitly asks for prototyping-only mode (no migration history). In that case, follow it with `npx prisma generate`.\n\n### Step 7: Verify the connection\n\nAfter generating the client, create and run a quick verification script to confirm everything works end-to-end. This is **critical** — do not skip this step.\n\nCreate a file named `test-connection.ts`:\n\n```typescript\nimport 'dotenv\u002Fconfig'\nimport pg from 'pg'\nimport { PrismaPg } from '@prisma\u002Fadapter-pg'\nimport { PrismaClient } from '.\u002Fgenerated\u002Fprisma\u002Fclient.js'\n\nconst pool = new pg.Pool({ connectionString: process.env.DATABASE_URL })\nconst adapter = new PrismaPg(pool)\nconst prisma = new PrismaClient({ adapter })\n\nconst result = await prisma.$queryRawUnsafe('SELECT 1 as connected')\nconsole.log('Connected to Prisma Postgres:', result)\n\nawait prisma.$disconnect()\nawait pool.end()\n```\n\nRun it:\n\n```bash\nnpx tsx test-connection.ts\n```\n\n**Prisma 7 client instantiation rules:**\n- Import from `.\u002Fgenerated\u002Fprisma\u002Fclient.js` (not `.\u002Fgenerated\u002Fprisma`)\n- Create a `pg.Pool` with the `DATABASE_URL` connection string\n- Wrap it in a `PrismaPg` adapter\n- Pass `{ adapter }` to the `PrismaClient` constructor\n- Do **not** use `datasourceUrl` — that option does not exist in Prisma 7\n- Do **not** use `new PrismaClient()` with no arguments — it will throw\n\nAfter verification succeeds, delete `test-connection.ts`.\n\nThen share links for the user to explore their database:\n\n- **Prisma Studio (CLI):** `npx prisma studio` — opens a visual data browser locally\n- **Console:** `https:\u002F\u002Fconsole.prisma.io\u002F\u003CworkspaceId>\u002F\u003CprojectId>\u002F\u003CdatabaseId>\u002Fdashboard` — strip the prefixes (`wksp_`, `proj_`, `db_`) from the IDs returned in Step 3 to build this URL\n\nRead `references\u002Fprisma7_client.md` for the full client instantiation reference.\n\n## Error Handling\n\nRead `references\u002Fapi_basics.md` for the full error reference. Key self-correction patterns:\n\n| HTTP Status | Error Code | Action |\n|---|---|---|\n| 401 | `authentication-failed` | Service token is invalid or expired. Ask the user to create a new one in Console → Workspace Settings → Service Tokens. |\n| 404 | `resource-not-found` | Check that the resource ID includes the correct prefix (`proj_`, `db_`, `con_`). |\n| 422 | `validation-error` | Check request body against the endpoint schema. Common: missing `name`, invalid `region`. |\n| 429 | `rate-limit-exceeded` | Back off and retry after a few seconds. |\n\n## Reference Files\n\nDetailed API and usage information is in:\n\n```\nreferences\u002Fauth.md             — Service token creation and usage\nreferences\u002Fapi_basics.md       — Base URL, envelope, IDs, errors, pagination\nreferences\u002Fendpoints.md        — Endpoint details for projects, databases, connections, regions\nreferences\u002Fprisma7_client.md   — Prisma 7 client instantiation and usage patterns\n```\n","# Prisma Postgres Setup\n\nProcedural skill that guides you through provisioning a new Prisma Postgres database via the Management API and connecting it to a local project.\n\n## When to Apply\n\nUse this skill when:\n\n- Setting up a new Prisma Postgres database for a project\n- Creating a Prisma Postgres project and connecting it locally\n- Obtaining a connection string for Prisma Postgres\n- Provisioning a database via the Management API (not the Console UI)\n\nDo **not** use this skill when:\n\n- Setting up CI\u002FCD preview databases — use `prisma-postgres-cicd`\n- Building multi-tenant database provisioning into an app — use `prisma-postgres-integrator`\n- Working with a database that already exists and is connected (schema\u002Fmigration tasks are standard Prisma CLI)\n\n## Prerequisites\n\n- Node.js 18+\n- A Prisma Postgres workspace (create one at https:\u002F\u002Fconsole.prisma.io if needed)\n- A workspace service token (see `references\u002Fauth.md`)\n\n## UX Guidelines\n\nWhen presenting choices to the user (region selection, project deletion, etc.), **use your platform's interactive selection mechanism** (e.g., `ask` tool in Claude Code, structured prompts in other agents). Do not print static tables and ask the user to type a value — present selectable options so the user can pick with minimal effort.\n\n## Workflow\n\nFollow these steps in order. Each step includes the API call to make and how to handle the response.\n\n### Step 1: Authenticate\n\nYou need a service token. Try these methods in order:\n\n**1a. Token in the user's prompt**\n\nCheck if the user included a service token in their initial message (e.g., \"Set up Prisma Postgres with token eyJ...\"). If so, use it **exactly as provided** — do not truncate, re-encode, or round-trip it through a file. Store it in a shell variable for subsequent calls.\n\n**1b. Token in the environment**\n\nCheck for `PRISMA_SERVICE_TOKEN` in the environment or `.env` file.\n\n**1c. Ask the user to create one**\n\nIf no token is available, instruct the user:\n\n> Create a service token in Prisma Console → Workspace Settings → Service Tokens.\n> Copy the token and paste it here.\n\nRead `references\u002Fauth.md` for details on service token creation.\n\nOnce you have a token, store it in a shell variable (`PRISMA_SERVICE_TOKEN`) and use it for all subsequent API calls.\n\n### Step 2: List available regions\n\nFetch the list of available Prisma Postgres regions to let the user choose where to deploy.\n\n```bash\ncurl -s -H \"Authorization: Bearer $PRISMA_SERVICE_TOKEN\" \\\n  https:\u002F\u002Fapi.prisma.io\u002Fv1\u002Fregions\u002Fpostgres\n```\n\nThe response contains an array of regions with `id`, `name`, and `status`. Only present regions where `status` is `available`.\n\n**Present the regions as an interactive menu** — let the user pick from options rather than typing a region ID manually.\n\nRead `references\u002Fendpoints.md` for the full response shape.\n\n### Step 3: Create a project with a database\n\n```bash\ncurl -s -X POST https:\u002F\u002Fapi.prisma.io\u002Fv1\u002Fprojects \\\n  -H \"Authorization: Bearer $PRISMA_SERVICE_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"name\": \"\u003Cproject-name>\",\n    \"region\": \"\u003Cregion-id>\",\n    \"createDatabase\": true\n  }'\n```\n\nUse the current directory name as the project name by default.\n\nThe response is wrapped in `{ \"data\": { ... } }`. Extract:\n\n- `data.id` — the project ID (prefixed with `proj_`)\n- `data.database.id` — the database ID (prefixed with `db_`)\n- `data.database.connections[0].endpoints.direct.connectionString` — the direct PostgreSQL connection string\n\nUse the **direct** connection string (`endpoints.direct.connectionString`). Do not use the pooled or accelerate endpoints — those are for legacy Accelerate setups and not needed for new projects.\n\nIf the response status is `provisioning`, wait a few seconds and poll `GET \u002Fv1\u002Fdatabases\u002F\u003Cdatabase-id>` until `status` is `ready`.\n\n**If creation fails due to a database limit**, list the user's existing projects and present them as an interactive menu for deletion. After the user picks one, delete it and retry.\n\nRead `references\u002Fendpoints.md` for the full request\u002Fresponse shapes.\n\n### Step 4: Create a named connection (optional)\n\nIf you need a dedicated connection (e.g., per-developer or per-environment), create one:\n\n```bash\ncurl -s -X POST https:\u002F\u002Fapi.prisma.io\u002Fv1\u002Fdatabases\u002F\u003Cdatabase-id>\u002Fconnections \\\n  -H \"Authorization: Bearer $PRISMA_SERVICE_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"name\": \"dev\" }'\n```\n\nExtract the direct connection string from `data.endpoints.direct.connectionString`.\n\n### Step 5: Configure the local project\n\n1. Install dependencies:\n\n```bash\nnpm install prisma @prisma\u002Fclient @prisma\u002Fadapter-pg pg dotenv\n```\n\nAll five packages are required:\n- `prisma` — CLI for migrations, schema push, client generation\n- `@prisma\u002Fclient` — the generated query client\n- `@prisma\u002Fadapter-pg` — Prisma 7 driver adapter for direct PostgreSQL connections\n- `pg` — Node.js PostgreSQL driver (used by the adapter)\n- `dotenv` — loads `.env` variables for `prisma.config.ts`\n\n2. Write the direct connection string to `.env`. **Append** to the file if it already exists — do not overwrite existing entries:\n\n```\nDATABASE_URL=\"\u003Cdirect-connection-string>\"\n```\n\n3. Verify `.gitignore` includes `.env`. Create `.gitignore` if it does not exist. Warn the user if `.env` is not gitignored.\n\n4. Ensure `package.json` has `\"type\": \"module\"` set (Prisma 7 generates ESM output).\n\n5. If `prisma\u002Fschema.prisma` does not exist, run `npx prisma init` to scaffold the project. This creates both `prisma\u002Fschema.prisma` and `prisma.config.ts`.\n\n6. Ensure `schema.prisma` has the `postgresql` provider and **no** `url` or `directUrl` in the datasource block (Prisma 7 manages connection URLs in `prisma.config.ts`, not in the schema):\n\n```prisma\ndatasource db {\n  provider = \"postgresql\"\n}\n```\n\n7. Ensure `prisma.config.ts` loads the connection URL from the environment:\n\n```typescript\nimport path from 'node:path'\nimport { defineConfig } from 'prisma\u002Fconfig'\nimport 'dotenv\u002Fconfig'\n\nexport default defineConfig({\n  earlyAccess: true,\n  schema: path.join(import.meta.dirname, 'prisma', 'schema.prisma'),\n  datasource: {\n    url: process.env.DATABASE_URL!,\n  },\n})\n```\n\n**Important Prisma 7 notes:**\n- Connection URLs go in `prisma.config.ts`, never in `schema.prisma`\n- The provider in `schema.prisma` must be `\"postgresql\"` (not `\"prismaPostgres\"`)\n- `dotenv\u002Fconfig` must be imported in `prisma.config.ts` to load `.env` variables\n\n### Step 6: Define schema and push\n\nIf the schema already has models, skip to pushing. Otherwise, **present these options as an interactive menu**:\n\n1. **\"I'll define my schema manually\"** — Tell the user to edit `prisma\u002Fschema.prisma` and come back when ready. Wait for them before proceeding.\n2. **\"Give me a starter schema\"** — Add a Blog starter schema (User, Post, Comment with relations) to `prisma\u002Fschema.prisma`. Show the user what was added and ask if they want to adjust it before pushing.\n3. **\"I'll describe what I need\"** — Ask the user to describe their data model in natural language (e.g., \"I'm building a task manager with projects, tasks, and team members\"). Generate a schema from the description, show it, and ask for confirmation before pushing.\n\nOnce the schema has models and the user is ready, create a migration and generate the client:\n\n```bash\nnpx prisma migrate dev --name init\n```\n\nThis creates migration files in `prisma\u002Fmigrations\u002F` **and** generates the client in one step. Migration history is essential for CI\u002FCD workflows (`prisma migrate deploy`) and production deployments.\n\nOnly use `npx prisma db push` if the user explicitly asks for prototyping-only mode (no migration history). In that case, follow it with `npx prisma generate`.\n\n### Step 7: Verify the connection\n\nAfter generating the client, create and run a quick verification script to confirm everything works end-to-end. This is **critical** — do not skip this step.\n\nCreate a file named `test-connection.ts`:\n\n```typescript\nimport 'dotenv\u002Fconfig'\nimport pg from 'pg'\nimport { PrismaPg } from '@prisma\u002Fadapter-pg'\nimport { PrismaClient } from '.\u002Fgenerated\u002Fprisma\u002Fclient.js'\n\nconst pool = new pg.Pool({ connectionString: process.env.DATABASE_URL })\nconst adapter = new PrismaPg(pool)\nconst prisma = new PrismaClient({ adapter })\n\nconst result = await prisma.$queryRawUnsafe('SELECT 1 as connected')\nconsole.log('Connected to Prisma Postgres:', result)\n\nawait prisma.$disconnect()\nawait pool.end()\n```\n\nRun it:\n\n```bash\nnpx tsx test-connection.ts\n```\n\n**Prisma 7 client instantiation rules:**\n- Import from `.\u002Fgenerated\u002Fprisma\u002Fclient.js` (not `.\u002Fgenerated\u002Fprisma`)\n- Create a `pg.Pool` with the `DATABASE_URL` connection string\n- Wrap it in a `PrismaPg` adapter\n- Pass `{ adapter }` to the `PrismaClient` constructor\n- Do **not** use `datasourceUrl` — that option does not exist in Prisma 7\n- Do **not** use `new PrismaClient()` with no arguments — it will throw\n\nAfter verification succeeds, delete `test-connection.ts`.\n\nThen share links for the user to explore their database:\n\n- **Prisma Studio (CLI):** `npx prisma studio` — opens a visual data browser locally\n- **Console:** `https:\u002F\u002Fconsole.prisma.io\u002F\u003CworkspaceId>\u002F\u003CprojectId>\u002F\u003CdatabaseId>\u002Fdashboard` — strip the prefixes (`wksp_`, `proj_`, `db_`) from the IDs returned in Step 3 to build this URL\n\nRead `references\u002Fprisma7_client.md` for the full client instantiation reference.\n\n## Error Handling\n\nRead `references\u002Fapi_basics.md` for the full error reference. Key self-correction patterns:\n\n| HTTP Status | Error Code | Action |\n|---|---|---|\n| 401 | `authentication-failed` | Service token is invalid or expired. Ask the user to create a new one in Console → Workspace Settings → Service Tokens. |\n| 404 | `resource-not-found` | Check that the resource ID includes the correct prefix (`proj_`, `db_`, `con_`). |\n| 422 | `validation-error` | Check request body against the endpoint schema. Common: missing `name`, invalid `region`. |\n| 429 | `rate-limit-exceeded` | Back off and retry after a few seconds. |\n\n## Reference Files\n\nDetailed API and usage information is in:\n\n```\nreferences\u002Fauth.md             — Service token creation and usage\nreferences\u002Fapi_basics.md       — Base URL, envelope, IDs, errors, pagination\nreferences\u002Fendpoints.md        — Endpoint details for projects, databases, connections, regions\nreferences\u002Fprisma7_client.md   — Prisma 7 client instantiation and usage patterns\n```\n",{"name":5,"license":15,"metadata":49,"description":7},{"author":24,"version":50},"1.1.0","master","c2e410e11df4d80d885e0ecf0583ef3c926df736",".ai\u002Fskills\u002Fofficial_prisma_prisma_postgres_setup",0,"https:\u002F\u002Fgithub.com\u002FiDorgham\u002FWorkspace-Factory","https:\u002F\u002Fgithub.com\u002FiDorgham","Dorgham.me","hey I'm Dorgham \r\nI code, I create, and AI codes back. \r\nMaybe we can give AI the chance!! now we begin. 🚀🤖\r\n... . . . git commit -m \"Hello, Future\" ","2026-05-04 18:39:09",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add iDorgham\u002FWorkspace-Factory --skill prisma-postgres-setup",{"tool":66,"command":67},"bunx","bunx skills add iDorgham\u002FWorkspace-Factory --skill prisma-postgres-setup",{"tool":69,"command":70},"pnpm","pnpm dlx skills add iDorgham\u002FWorkspace-Factory --skill prisma-postgres-setup","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FiDorgham\u002FWorkspace-Factory\u002Fblob\u002Fmaster\u002F.ai\u002Fskills\u002Fofficial_prisma_prisma_postgres_setup\u002Fskill.md",true,[],[75,103,126,148,167,186],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":84,"publishedAt":102},"01M71P8WVBMB2X3D24R0YT0B0E","vercel-react-view-transitions","Guide for implementing smooth, native-feeling animations using React's View Transition API (`\u003CViewTransition>` component, `addTransitionType`, and CSS view transition pseudo-elements). Use this skill whenever the user wants to add page transitions, animate route changes, create shared element animations, animate enter\u002Fexit of components, animate list reorder, implement directional (forward\u002Fback) navigation animations, or integrate view transitions in Next.js. Also use when the user mentions view transitions, `startViewTransition`, `ViewTransition`, transition types, or asks about animating between UI states in React without third-party animation libraries.","https:\u002F\u002Fgithub.com\u002FiDorgham\u002FWorkspace-Factory\u002Fblob\u002Fmaster\u002Ffactory\u002Flibrary\u002Fskills\u002Fofficial_vercel_labs_react_view_transitions\u002Fskill.md",[81],{"categoryNo":82,"categoryName":83,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[85,86,87,88,89,90,91,92,93,94,95,96,97,98,33,99,32,100,31,101],"react","vercel react view transitions","view","react view transitions","vercel","transitions","shared","back","Animation","css","types","states","element","implementing","components","route","libraries","2026-11-10 13:02:02",{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":110,"publishedAt":102},"01M71P8TDGHZ289TSAC5VTG2EW","vercel-react-native-skills","React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.","https:\u002F\u002Fgithub.com\u002FiDorgham\u002FWorkspace-Factory\u002Fblob\u002Fmaster\u002Ffactory\u002Flibrary\u002Fskills\u002Fofficial_vercel_labs_react_native_skills\u002Fskill.md",[109],{"categoryNo":82,"categoryName":83,"taxonomyType":21,"taxonomyTypeDesc":22},[85,111,112,89,113,114,115,116,98,117,33,118,99,119,120,121,122,123,124,125],"react native","native","vercel react native skills","react native skills","modules","performance","apps","tasks","mobile","expo","list","mobile performance","platform","animations","for",{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":133,"publishedAt":102},"01M71P8QK4JF5BYRGYDDGPZQG9","vercel-react-best-practices","React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React\u002FNext.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.","https:\u002F\u002Fgithub.com\u002FiDorgham\u002FWorkspace-Factory\u002Fblob\u002Fmaster\u002Ffactory\u002Flibrary\u002Fskills\u002Fofficial_vercel_labs_react_best_practices\u002Fskill.md",[132],{"categoryNo":82,"categoryName":83,"taxonomyType":21,"taxonomyTypeDesc":22},[85,134,135,89,136,116,137,33,138,118,99,139,140,141,142,143,144,145,146,147],"react best practices","vercel react best practices","best practices","writing","code","data fetching","react components","next","refactoring","data","patterns","Optimization","guidelines","triggers",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":155,"publishedAt":102},"01M71P8HVEA70K5N6ZVJCG2ED3","vercel-composition-patterns","React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.","https:\u002F\u002Fgithub.com\u002FiDorgham\u002FWorkspace-Factory\u002Fblob\u002Fmaster\u002Ffactory\u002Flibrary\u002Fskills\u002Fofficial_vercel_labs_composition_patterns\u002Fskill.md",[154],{"categoryNo":82,"categoryName":83,"taxonomyType":21,"taxonomyTypeDesc":22},[156,89,157,144,158,159,160,161,147,162,163,36,33,164,118,99,165,166,32,85],"Composition","composition patterns","vercel composition patterns","react composition patterns","react 19","render","boolean","component architecture","reusable","architecture","react composition",{"skillNo":168,"name":169,"nameZh":6,"description":170,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":171,"categories":172,"keywords":174,"publishedAt":102},"01M71P60XXKKP222ZFJRG7R373","supabase-postgres-best-practices","Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.","https:\u002F\u002Fgithub.com\u002FiDorgham\u002FWorkspace-Factory\u002Fblob\u002Fmaster\u002Ffactory\u002Flibrary\u002Fskills\u002Fofficial_supabase_supabase_postgres_best_practices\u002Fskill.md",[173],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[175,176,28,177,136,178,179,180,125,145,116,181,182,137,183,36,184,185,34,33],"postgres best practices","supabase","supabase postgres best practices","categories","postgres performance","advanced","correct","schema","impact","Rules","critical",{"skillNo":187,"name":188,"nameZh":6,"description":189,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":190,"categories":191,"keywords":193,"publishedAt":209},"01M71P2ZCEJD0PKC458YTP1FJW","portable-text-serialization","Render and serialize Portable Text to React, Svelte, Vue, Astro, HTML, Markdown, and plain text. Use when implementing Portable Text rendering in any frontend framework, building custom serializers for non-standard block types, converting Portable Text to HTML strings server-side, converting Portable Text to Markdown, extracting plain text from Portable Text, or troubleshooting rendering issues with marks, blocks, lists, or custom types.","https:\u002F\u002Fgithub.com\u002FiDorgham\u002FWorkspace-Factory\u002Fblob\u002Fmaster\u002Ffactory\u002Flibrary\u002Fskills\u002Fofficial_sanity_io_portable_text_serialization\u002Fskill.md",[192],{"categoryNo":82,"categoryName":83,"taxonomyType":21,"taxonomyTypeDesc":22},[194,195,196,197,198,95,199,161,200,98,201,202,33,85,203,204,205,206,207,208],"text","portable text serialization","portable","serialization","extracting","strings","issues","frontend","svelte","sanity","astro","server","markdown","rendering","vue","2026-11-10 10:56:23"]