Skip to content
Development
Skill

/domain-modeling

构建并打磨项目的领域模型。适用于讨论 codebase 术语、编写或编辑 GLOSSARY.md,或记录或编辑 ADR。

From plugin
vinvcn-mattpocock-skills
5.4k31 skills

Claude Code

$ npx -y skills add vinvcn/mattpocock-skills-zh-cn --skill domain-modeling --agent claude-code

SKILL.md

domain-modeling.SKILL.md
name: domain-modeling
description: 构建并打磨项目的领域模型。适用于讨论 codebase 术语、编写或编辑 GLOSSARY.md,或记录或编辑 ADR。

领域建模

在设计过程中主动构建并打磨项目的 domain model。这是 *active* discipline:挑战术语、发明 edge-case scenarios,并在概念成形的当下写入 glossary 和 decisions。

文件结构

多数 repos 只有一个 context:

/
|- GLOSSARY.md
|- docs/
|  `- adr/
|     |- 0001-event-sourced-orders.md
|     `- 0002-postgres-for-write-model.md
`- src/

如果 root 有 `GLOSSARY-MAP.md`,说明 repo 有多个 contexts。map 指向每个 context 的位置:

/
|- GLOSSARY-MAP.md
|- docs/
|  `- adr/                          -> system-wide decisions
`- src/
   |- ordering/
   |  |- GLOSSARY.md
   |  `- docs/adr/                  -> context-specific decisions
   `- billing/
      |- GLOSSARY.md
      `- docs/adr/

按需懒创建文件:只有在有内容要写时才创建。如果没有 `GLOSSARY.md`,当第一个 term 被解决时创建它。如果没有 `docs/adr/`,当第一个 ADR 需要出现时创建它。

Session 期间

对照术语表质询

当用户使用的术语与 `GLOSSARY.md` 中既有语言冲突时,立即指出。"Your glossary defines 'cancellation' as X, but you seem to mean Y - which is it?"

打磨模糊用语

当用户使用模糊或过载术语时,提出一个精确的 canonical term。"You're saying 'account' - do you mean the Customer or the User? Those are different things."

讨论具体场景

讨论 domain relationships 时,用具体场景做压力测试。发明能探测 edge cases 的场景,迫使用户精确定义概念之间的 boundaries。

与代码交叉对照

当用户描述某事如何工作时,检查代码是否同意。如果发现矛盾,要指出:"Your code cancels entire Orders, but you just said partial cancellation is possible - which is right?"

就地更新 GLOSSARY.md

当一个 term 被解决时,立刻更新 `GLOSSARY.md`。不要批量攒到最后;随着概念出现就捕获。使用 [GLOSSARY-FORMAT.md](./GLOSSARY-FORMAT.md) 中的格式。

`GLOSSARY.md` 必须完全不包含 implementation details。不要把 `GLOSSARY.md` 当 spec、scratch pad 或 implementation decisions 的仓库。它只是一份 glossary。

谨慎提议 ADR

只有以下三项都成立时,才提出创建 ADR:

1. **Hard to reverse** - 之后改变主意的成本有意义 2. **Surprising without context** - 未来读者会疑惑 "why did they do it this way?" 3. **The result of a real trade-off** - 确实存在替代方案,而你基于具体理由选择了其中一个

缺少任一项就跳过 ADR。使用 [ADR-FORMAT.md](./ADR-FORMAT.md) 中的格式。

Read more
@vinvcn
Ships withvinvcn-mattpocock-skills

Matt Pocock 的 mattpocock/skills:第三方简体中文本地化,非官方仓库。这些 agent skills 是他每天用于真实工程工作的,不是 vibe coding:小、易改、可组合,适用于任何模型。 本仓库定期同步上游,并额外支持 DeepSeek Harness(dsh)插件安装,安装后以 /zh- 调用任意技能(上游没有的能力,详见 dsh-plugin/README.md)。

Stars on GitHub

Momentum

stars in total
5.4k
Star history of vinvcn/mattpocock-skills-zh-cn on GitHub, a chart by star-history.com

Other skills on vinvcn-mattpocock-skills.

code-review

code-review

从固定点(commit、branch、tag 或 merge-base)开始,按 Standards(代码是否符合本仓库记录的编码标准?)和 Spec(代码是否符合来源 issue/spec…

codebase-design

codebase-design

用于设计深模块的共享词汇。适用于用户想设计或改进模块接口、寻找深化机会、决定 seam 放在哪里、让代码更容易测试或更适合 AI 导航,或其他技能需要深模块词汇时。

diagnosing-bugs

diagnosing-bugs

面向棘手缺陷和性能回退的诊断循环。适用于用户说 “diagnose” / “debug this”,或报告某些东西 broken、throwing、failing、slow 时。

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc11d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about domain-modeling.

Which coding agents can use domain-modeling?
domain-modeling installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.