AIHero
    25 / 27AI Skills for Real Engineers · 8 min read · Updated Aug 24, 2026

    /domain-modeling 技能

    打磨项目使用的词汇,并把它们写下来。

    Matt Pocock
    Matt Pocock
    下一页

    安装此技能

    npx skills@latest add mattpocock/skills --skill=domain-modeling

    然后输入 /domain-modeling 来调用它。

    本页内容

    它的作用

    domain-modeling 构建并打磨一个项目的 通用语言 while you are designing. It challenges a term that conflicts with the glossary, asks for a precise word where you used a vague one, and tests a relationship against a concrete scenario until the boundaries are exact.

    它是 active discipline, not the passive one. Any skill can read GLOSSARY.md to borrow its vocabulary. This skill is for when you are changing the model, which is why it interrupts you. It writes a term into GLOSSARY.md at the moment you settle it, in the middle of the conversation, rather than producing a tidy glossary at the end. A glossary written at the end is a summary of a 会话; the inline version is the session's output.

    何时使用

    输入 /domain-modeling, or the agent reaches for it automatically when a task fits. In practice, automatic invocation is the weakest part of the skill. When grill-with-docs or wayfinder 说要加载它, models often load grilling 并跳过这个。如果一个 追问审视 会话运行并 GLOSSARY.md is unchanged at the end, that is what happened. Invoke it by name alongside the other skill.

    当 words 是问题所在:

    情境这一招
    两个人对「cancellation」的理解不同domain-modeling: pick the canonical term, list the other under _Avoid_
    「Account」在三个文件里干了三份活domain-modeling: split it into Customer and User
    你刚做了一个难以逆转的架构选择domain-modeling: it offers an ADR, if the choice clears the bar
    模块的 shape is the problem: where the seam goes, how deep the interface iscodebase-design
    你想在构建之前让整个计划被审问grill-with-docs,它在底层驱动该技能
    你想要查一个术语,而不是改动它什么都不用。读 GLOSSARY.md。它是一个文件。

    前置条件

    开头什么都没有。技能写入两个地方,且都惰性创建:

    • GLOSSARY.md at the repo root. The skill creates it when you settle the first term. In a repo with a GLOSSARY-MAP.md 在根目录,术语进入每个上下文的 GLOSSARY.md 地图指向的东西。
    • docs/adr/. The skill creates it with the first ADR that clears the bar.

    Nothing needs to exist before you start, and the skill creates nothing in advance.

    两种产物,两条标准

    The glossary and the ADR have different bars. Most of the trouble with this skill comes from mixing them up.

    GLOSSARY.mddocs/adr/NNNN-slug.md
    持有术语。某物 is,用一两句话,被否决的同义词放在 _Avoid_一个决策,用一到三句话:背景、选择、理由
    写作门槛一个模糊的术语变成了标准术语三者:难以逆转、脱离上下文会令人意外、是真实权衡的结果
    已写入内联,在术语敲定的那一刻提供,而非假设
    从不持有实现细节, spec,便签本、通用编程概念本次会话中每个选择的日记

    ADR 的三项测试缺一不可,否则就没有 ADR。容易逆转的决策只会被逆转;不出意外的决策没人会问;没有真实替代方案的决策,记录的是你做了显而易见的事。

    这个 GLOSSARY.md rule matters most, because it is the one that breaks in practice. 它是一个词汇表,仅此而已。 如果不加约束,模型会把「写入 GLOSSARY.md" as permission to persist every answer you give, and the file turns into a running spec. This is the most-reported problem with the skill, across several models.

    交叉引用,及其边界

    When you state how something works, the skill checks the code and points out any contradiction. "Your code cancels entire Orders, but you just said partial cancellation is possible, which is right?" The skill makes the language and the code agree, out loud, before it changes either.

    It cross-references code 以及已提交的 GLOSSARY.md and ADRs, and nothing else. It does not search your issue tracker. If your team argued out a naming collision and settled it in a closed issue months ago, the skill raises it again as if it were new. There is 一个开放的请求 to fix this. Until then, the workaround is to put the instruction in your own docs/agents/domain.md,技能们已经在读取它。

    常见问题

    我的 GLOSSARY.md 有 500 行。1000 行。3000 行。我该怎么办? The size is a symptom. The cause is that the file has taken in implementation detail and decisions that never belonged in a glossary. The fix is a direct instruction: /grill-with-docs make my GLOSSARY.md more concise and remove any implementation details from it. Run it against a bloated file and most of it goes. Only split it with a GLOSSARY-MAP.md once the file is lean and still covers two domains that a reader would not want to hold at once. Splitting a bloated file gives you several bloated files. The skill's guidance here is not yet strong enough to prevent the growth in the first place, and the issue tracking that is still open.

    为什么它 GLOSSARY.md 而不是 GLOSSARY.md? 这是整个技能集里争论最多的命名问题,没有定论。反对当前名字的理由很充分:如果它「只是一个词汇表」, GLOSSARY.md says so, and, as one reader put it, "with ai agents everything is context」。它的存在理由是地图: GLOSSARY-MAP.md 指向多个 GLOSSARY.md 文件的阅读自然程度,是 GLOSSARY-MAP.md 不会,而且 context 是 DDD 中描述模型有界区域的惯用词。至少有一个人维护本地 fork 纯粹是为了重命名该文件。你也可以这样做,但套装里的每个其他技能都在找 GLOSSARY.md,因此一次重命名意味着要修改全部这些地方。

    原来的 /ubiquitous-language 去哪了? 它被移除了,而且不是被弃用。它的工作移入了 domain-modeling, which maintains the whole model continuously rather than dumping a glossary out of one conversation. Vocabulary enforcement now matters more, not less. It runs underneath 追问审视, triage and mapping rather than as a separate pass you have to remember.

    怎么为一个没有词汇表的代码库建立词汇表? 明确地要求它,而不是等它自己积累。 /grill-with-docs help me scaffold my existing repo with a GLOSSARY.md is the documented route. Expect a long interrogation. One user reported more than 50 questions before the file was in shape. Incidental use builds the glossary far too slowly on a brownfield repo.

    我能保留领域模型、同时用我自己的 ADR 格式吗? Not cleanly today. The glossary half and the ADR half ship in one skill, so a team with an established ADR convention (different template, different location, different naming) gets instructions that conflict with its house style. The current options are to copy the skill locally and edit it, or to override the ADR conventions in your repo's own agent docs. Splitting the two apart is 一个开放的请求.

    词汇表真的值回票价吗?它是又一个需要审查的产物,还可能过时。 Sometimes it does not. DDD gets less useful the closer it gets to the implementation. The payoff is upstream, in naming and concept alignment, not in aggregates and layer ceremony. Synonym control matters at naming boundaries: module names, table names, status enums, issue titles, CLI commands. It matters much less in ordinary prose. There is also an objection that domain terms compress communication 人与人之间 who already share them, and that an agent responds the same way to the plain-English description. On that reading, the glossary's value is keeping you and your reviewers aligned with what the agent is doing, not making the agent better. On a one-day build, skip it. And an unreviewed, agent-authored glossary is worse than none: it fills with confident claims that later sessions treat as true.

    它能帮我把模糊的提示词转成领域语言吗? No, and there is no plan for a skill that does. A domain language you do not understand yourself is meaningless once written down. This skill enforces precision once you have the understanding; it does not invent vocabulary you do not have. The related trap is using domain words without doing the modelling. The right nouns on top of the wrong concepts produce output that reads as correct and is not.

    做到以下就算成功

    • 它在你话说到一半时打断,问你是两个意思中的哪一个,而不是选一个继续。
    • GLOSSARY.md changes during 对话中,而不是最后一次性涌出。
    • It refuses to write an ADR for something you could undo tomorrow, and says which of the three tests failed.
    • 新条目定义某物 is 用一两句话,并点明你在 _Avoid_.
    • 当你的代码和你的话不一致时,它把你的代码原样抛回给你。
    • GLOSSARY.md 变短和变长的频率一样高。

    在流程中的位置

    domain-modeling 是一个 模型自动调用的参考 运行 underneath 被其他技能使用的频率比它自己单独运行更高。 grill-with-docs 通过一次审问会话驱动它, wayfinder 在绘制地图时加载它, triage 用它来保持 tickets 用项目自己的话,并且 improve-codebase-architecture calls it as decisions settle. Its closest sibling is codebase-design. Together they are the vocabulary layer under everything else, this one for the domain,那个用于模块的 shape. It is also reachable directly, when you want the discipline without committing to the steps of whatever skill would normally load it. When you are unsure which skill fits, ask-matt 为你指路。

    技能操作

    安装技能

    Live Skills.sh install count
    npx skills@latest add mattpocock/skills

    安装整套技能,然后在智能体中输入 /domain-modeling 来调用它。

    用以下命令更新: npx skills updateSkills.sh