用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/mkaraivanov/invoice-processor --skill db-migrate命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | db-migrate |
| description | Run prisma migrate dev, regenerate client to the correct output path, and verify import paths |
| disable-model-invocation | true |
Run a Prisma migration, regenerate the client, and verify import paths.
npx prisma validate
Fix any errors before proceeding.
npx prisma migrate dev --name <describe-the-change>
Use a descriptive snake_case name (e.g., add-invoice-line-items).
migrate dev uses DIRECT_URL from .env.local (bypasses PgBouncer — already configured in schema.prisma's directUrl field). If it fails with "cannot connect", check that DIRECT_URL is set and points to port 5432.
migrate dev runs prisma generate automatically, but confirm explicitly:
npx prisma generate
ls src/app/generated/prisma/
You should see client/, index.d.ts, etc. If the directory is empty, the output path in schema.prisma is wrong.
grep -rn "from '@prisma/client'" src/ tests/
grep -rn 'from "@prisma/client"' src/ tests/
Any hits must be changed to @/app/generated/prisma/client.
npx tsc --noEmit
Type errors referencing @prisma/client or missing Prisma types indicate wrong imports or a failed prisma generate.
ls prisma/migrations/
Review the new migration SQL briefly — especially for destructive operations (DROP COLUMN, etc.).
prisma migrate dev is for local development only. Production uses prisma migrate deploy in CI — never run it locally.