做什么
Prisma ORM 软件 CLI命令引用覆盖init,生成,迁移,db,dev,完整,工作室,验证,格式,调试,和mcp. 用于ORM/数据库CLI工作流程,而不是Prisma平台CLI. 在"prisma init","prisma生成","prisma迁移","prisma db","prisma完整","prisma工作室","prisma mcp"上被触发.
技能库 智客分类:Agent 工作流 prisma-cli
Prisma ORM 软件 CLI命令引用覆盖init,生成,迁移,db,dev,完整,工作室,验证,格式,调试,和mcp. 用于ORM/数据库CLI工作流程,而不是Prisma平台CLI. 在"prisma init","prisma生成","prisma迁移","prisma db","prisma完整","prisma工作室","prisma mcp"上被触发.
官方网址:skills.sh
先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。
Prisma ORM 软件 CLI命令引用覆盖init,生成,迁移,db,dev,完整,工作室,验证,格式,调试,和mcp. 用于ORM/数据库CLI工作流程,而不是Prisma平台CLI. 在"prisma init","prisma生成","prisma迁移","prisma db","prisma完整","prisma工作室","prisma mcp"上被触发.
官方 description 未单独写出 Use when。按规范,代理会在用户任务与这段 description 的关键词匹配时激活本技能。
按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Prisma CLI Reference、Boundary: Platform and Compute、When to Apply、Rule Categories by Priority、Command Categories、Quick Reference。 其中含规范建议的小节:输入输出示例。
文件分析:除 SKILL.md 外,正文引用了 references/agent-safety.md、references/init.md、references/generate.md、references/dev.md、references/db-pull.md、references/db-push.md,属于带资源的技能包,这些文件按需再读。
Prisma ORM CLI commands reference covering init, generate, migrate, db, dev, complete, studio, validate, format, debug, and mcp. Use for ORM/database CLI workflows, not the Prisma Platform CLI. Triggers on "prisma init", "prisma generate", "prisma migrate", "prisma db", "prisma complete", "prisma studio", "prisma mcp".
Prisma CLI ReferenceBoundary: Platform and ComputeWhen to ApplyRule Categories by PriorityCommand CategoriesQuick ReferenceProject SetupInitialize new project (creates prisma/ folder and prisma.config.ts)Initialize with specific databaseInitialize with Prisma Postgres (cloud)Initialize with an example modelClient Generation
· 许可:MIT
来源分类:skills.sh agent-skill
nameprisma-clidescriptionreferences/agent-safety.mdreferences/init.mdreferences/generate.mdreferences/dev.mdreferences/db-pull.mdreferences/db-push.mdreferences/db-seed.mdreferences/db-execute.mdreferences/migrate-dev.mdreferences/migrate-deploy.mdreferences/migrate-reset.mdreferences/migrate-status.md以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。
具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗
先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。
该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。
复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。
把 Agent Skill「prisma-cli」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-dfa33aa54d157b48-Prisma-Cli.html 请存为 .cursor/skills/prisma-cli/SKILL.md 或 .claude/skills/prisma-cli/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。 该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/prisma/skills 取完整目录,不要只建一个 SKILL.md。
需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。
npx skills add 'https://github.com/prisma/skills' --list
npx skills add 'https://github.com/prisma/skills' --skill 'prisma-cli'
CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。
Reference for Prisma ORM CLI commands. This skill provides guidance on command usage, options, and best practices for current Prisma ORM releases.
Do not confuse the stable ORM command (prisma) with the public-beta Platform package (@prisma/cli, binary prisma-cli). Use prisma-compute for Compute apps and workspace auth, and prisma-postgres for Platform projects and databases.
Reference this skill when:
prisma init)prisma generate)prisma migrate)prisma db push/pull)prisma dev)prisma debug)prisma complete)| Priority | Category | Impact | Prefix |
|----------|----------|--------|--------|
| 1 | Setup | HIGH | init |
| 2 | Generation | HIGH | generate |
| 3 | Development | HIGH | dev |
| 4 | Database | HIGH | db- |
| 5 | Migrations | CRITICAL | migrate- |
| 6 | Utility | MEDIUM | complete, studio, validate, format, debug, mcp |
| Category | Commands | Purpose |
|----------|----------|---------|
| Setup | init | Initialize a Prisma project |
| Generation | generate | Generate Prisma Client |
| Validation | validate, format | Schema validation and formatting |
| Development | dev | Local Prisma Postgres for development |
| Database | db pull, db push, db seed, db execute | Direct database operations |
| Migrations | migrate dev, migrate deploy, migrate reset, migrate status, migrate diff, migrate resolve | Schema migrations |
| Utility | complete, studio, mcp, version, debug | Shell, development, and AI tooling |
# Initialize new project (creates prisma/ folder and prisma.config.ts)
prisma init
# Initialize with specific database
prisma init --datasource-provider postgresql
prisma init --datasource-provider mysql
prisma init --datasource-provider sqlite
# Initialize with Prisma Postgres (cloud)
prisma init --db
# Initialize with an example model
prisma init --with-model
# Generate Prisma Client
prisma generate
# Watch mode for development
prisma generate --watch
# Generate specific generator only
prisma generate --generator client
When using Bun, always add the --bun flag so Prisma runs with the Bun runtime (otherwise it falls back to Node.js because of the CLI shebang):
bunx --bun prisma init
bunx --bun prisma generate
# Start local Prisma Postgres
prisma dev
# Start with specific name
prisma dev --name myproject
# Start in background (detached)
prisma dev --detach
# List all local instances
prisma dev ls
# Stop instance
prisma dev stop myproject
# Remove instance data
prisma dev rm myproject
# Pull schema from existing database
prisma db pull
# Push schema to database (no migrations)
prisma db push
# Seed database
prisma db seed
# Execute raw SQL
prisma db execute --file ./script.sql
# Create and apply migration
prisma migrate dev
# Create migration with name
prisma migrate dev --name add_users_table
# Create migration without applying
prisma migrate dev --create-only
# Reset database and apply all migrations
prisma migrate reset
# Apply pending migrations (CI/CD)
prisma migrate deploy
# Check migration status
prisma migrate status
# Compare schemas and generate diff
prisma migrate diff --from-config-datasource --to-schema schema.prisma --script
# Open Prisma Studio (database GUI)
prisma studio
# Start Prisma's MCP server for AI tools
prisma mcp
# Show version info
prisma version
prisma -v
# Debug information
prisma debug
# Validate schema
prisma validate
# Format schema
prisma format
# Generate shell completion code
prisma complete zsh
Prisma blocks destructive commands when it detects an AI agent until the agent has obtained explicit user consent. This covers migrate reset, db push --force-reset, and db push --accept-data-loss.
PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION to the user's exact consent message. Do not invent the text.migrate-reset tool.Read references/agent-safety.md before any destructive Prisma command.
Use prisma.config.ts for CLI configuration:
import 'dotenv/config'
import { defineConfig, env } from 'prisma/config'
export default defineConfig({
schema: 'prisma/schema.prisma',
migrations: {
path: 'prisma/migrations',
seed: 'tsx prisma/seed.ts',
},
datasource: {
url: env('DATABASE_URL'),
},
})
prisma generate explicitly after migrate dev, db push, or other schema syncs when you need fresh client outputprisma db seed explicitly after migrate dev or migrate reset when you need seed dataprisma db execute --file ... for raw SQL scriptsLoad environment variables explicitly in prisma.config.ts, commonly with dotenv:
// prisma.config.ts
import 'dotenv/config'
See individual rule files for detailed command documentation:
references/init.md - Project initialization
references/generate.md - Client generation
references/dev.md - Local development database
references/db-pull.md - Database introspection
references/db-push.md - Schema push
references/db-seed.md - Database seeding
references/db-execute.md - Raw SQL execution
references/migrate-dev.md - Development migrations
references/migrate-deploy.md - Production migrations
references/migrate-reset.md - Database reset
references/migrate-status.md - Migration status
references/migrate-resolve.md - Migration resolution
references/migrate-diff.md - Schema diffing
references/studio.md - Database GUI
references/mcp.md - Prisma MCP server
references/complete.md - Shell completion generation
references/agent-safety.md - AI consent checkpoint for destructive commands
references/validate.md - Schema validation
references/format.md - Schema formatting
references/debug.md - Debug info
Use the command categories above for navigation, then open the specific command reference file you need.
Agent 工作流
创造有效技能指南。 当用户想创造出新的技能(或更新现有的技能),以专业知识,工作流程,或工具集成来扩展克洛德的能力时,应该使用这种技能.
Agent 工作流
使用ClawdHub CLI搜索,安装,更新并发布从taladhub.com的代理技能. 需要获取苍蝇上的新技能时使用,将安装的技能同步到最新版本或特定版本,或者发布 npm-instainddhub CLI 的新/更新的技能文件夹.
Agent 工作流
管弦乐团多代理团队,任务设定周期,交接协议,审查工作流程. 使用时间: (1)建立2+特派员队伍,具有不同专业,(2)确定任务路线和生命周期(收录框_ spec_建设_审查_完成),(3)在特派员之间制定交接协议,(4)建立审查和质量关口,(5)管理特派员之间的交流和文物共享.
Agent 工作流
Spec-first,TDD,子代理驱动的软件开发工作流程. 当:(1)构建任何新功能或应用——触发脑暴_计划_子代理执行回路,(2)调试出一个bug或测试失败——触发系统性的根起过程,(3)用户说"让我们构建","帮助我计划","我想添加X",或"这个被打破",(4)完成一个功…