/pdlc:pdlc-db-design <功能ID | 数据模型描述>from pdlc
按 PRD 设计数据库表结构、索引与 ER 图,产出 docs/02_design/database/ 设计文档,并生成迁移脚本。
Ships in pdlc. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
⛔ IRON LAW · 不可违反的硬门禁(工具型命令)
本命令不是主链路上的阶段:不追加 history,不改 current_stage / next_step / last_phase_result,也不为此分配功能ID。以下规则不可协商:
违反任一条 = 立即中止当前命令,输出违规详情,等待人工介入。
根据需求和 API 设计文档,创建数据库设计方案。
docs/01_requirements/prd/ 目录下搜索包含该关键词的 PRD 文档
F<日期>-<编号>-*<关键词>*-prd.mdYYYYMMDD-*<关键词>*-prd.md⛔ PDLC 守卫:未找到与「<功能名>」相关的 PRD 文档。
数据库设计必须基于已有的 PRD。请先运行:
👉 /pdlc-prd <需求描述>
F20260326-090000),读取该 PRD 内容,继续执行docs/02_design/api/ 下同功能ID的 API 设计文档(如有)docs/02_design/database/ 下创建数据库设计文档<功能ID>-<功能名>-db.md(如 F20260326-090000-user-auth-db.md)
YYYYMMDD-<模块名>-db.md<!-- PDLC-TRACE -->
<!-- 功能ID: F20260326-090000 -->
<!-- 功能名称: user-auth -->
<!-- 阶段: 设计 -->
<!-- 前置文档: docs/01_requirements/prd/F20260326-090000-user-auth-prd.md -->
[用户] 1──N [订单] N──N [商品]
│ │
└───N [地址] [库存] 1─┘
| 字段 | 类型 | 可空 | 默认值 | 索引 | 描述 |
|---|
🌐 Output language for generated artifacts
All generated artifacts (PRDs, design docs, code comments, review reports, test plans, deployment manuals, changelog entries, etc.) follow this policy:
Default — match the conversation language exactly:
Explicit override always wins: when the user specifies a language for an artifact (e.g. "write the PRD in English", "用英文写 API 设计文档", "output the deploy doc in Japanese"), use that language for that artifact, regardless of conversation language.
Mixed-language requirements: if the user wants some artifacts in one language and others in a different language (common: Chinese PRD + English API docs for partners), honour each per-artifact instruction.
Uncertain: if you cannot reliably detect the conversation language, ask once before producing the first artifact.
This policy applies to content (prose, comments, headings). It does not override technical conventions like English variable names, English git commit subjects, or English error codes when the project's conventions require them.
设计目标: $ARGUMENTS
命令完成后必须输出以下格式的最终消息:
✅ <阶段名> 完成:<主要产出物路径>
📊 自检:<通过数>/<总数> 通过(若有未通过,附要点)
📦 状态快照:docs/.pdlc-state/<feature-id>.json
👉 下一步:/pdlc-<next_step>
(如果有分叉)或 /pdlc-<alt>(条件:<选择依据>)
规则:
next_step,此时输出 👉 下一步:(本次流程结束,无后续)/pdlc-tdd;若测试已齐 → /pdlc-review"本命令的 handoff 输出:
✅ 数据库设计文档 完成
📦 产出:docs/02_design/database/<功能ID>-<功能名>-db.md
👉 下一步:(本次流程结束,无后续)
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub kanfu-panda/pdlc-skills --plugin pdlc38 skills in this plugin
/pdlc-api-mockOther plugins' skills for the same job