Domain modeling
Sharpens a project's domain language during design: challenges fuzzy or conflicting terms, writes resolved ones to GLOSSARY.md at once and offers a short ADR only for hard-to-reverse trade-offs. Use when discussing terminology or recording an ADR.
domain-modeling- Author
- Matt Pocock
- Source
- mattpocock/skills/skills/engineering/domain-modeling @ abeeaf9
- License
- MIT · Copyright (c) 2026 Matt Pocock
About this skill
What it does
Domain modeling keeps the project's language sharp while you design. The agent flags a word that conflicts with GLOSSARY.md ("your glossary defines cancellation as X, you seem to mean Y"), asks which concept a fuzzy word stands for ("account": the Customer or the User?), invents edge cases to find where one concept ends and the next begins, and checks your claims against the code. Each resolved term goes into GLOSSARY.md at once. The glossary holds definitions only: no implementation details, no spec, no scratch notes.
An ADR is offered only when a decision is hard to reverse, surprising without context and the result of a real trade-off; miss one and there is no ADR. Files are created only when there is something to write. A repo with several contexts keeps a GLOSSARY-MAP.md at the root pointing to each context's glossary and docs/adr/.
GLOSSARY-FORMAT.md sets the entry format — a bold term, a one- or two-sentence definition, an _Avoid_: line for rejected synonyms, project-specific terms only — and the layout of GLOSSARY-MAP.md. ADR-FORMAT.md sets the ADRs: docs/adr/0001-slug.md, a title and one to three sentences, optional status, options and consequences, and a list of what qualifies, from lock-in technology to constraints the code does not show. agents/openai.yaml holds the Codex display name and description.
When to use it, and when not
Use it when terminology is being discussed, when a design or triage conversation is settling what words mean, or when you write a glossary entry or an ADR.
Merely reading GLOSSARY.md for vocabulary is not this skill, as SKILL.md says itself. It does not write general docs or a README.
How to run it
The install command below puts the whole folder in place. The agent picks the skill up by its description when terms or ADRs come up; to call it yourself:
- Claude Code:
/domain-modeling, or ask for the skill by name. - Codex:
$domain-modeling. - Cursor: type
/in the Agent chat and pickdomain-modeling.
Example: /domain-modeling We say "account" for both the login and the paying company. Sort the terms out and update GLOSSARY.md.
triage, wayfinder and improve-codebase-architecture call it together with grilling, and tdd, to-spec, to-tickets and diagnosing-bugs use the glossary and ADRs it writes.
How it differs from similar skills
Architecture decision record from our catalog writes a full ADR on request: context, decision, at least two options, consequences, status and date. Documentation and ADRs also covers comments, API docs, README, changelog and doc drift. Here an ADR is one paragraph and a by-product, offered only past the three-part test; the main output is a glossary, which neither of them keeps.
Install
Run one command — it saves SKILL.md and the files it uses into your agent's skills folder. Claude Code and Codex pick up a new skill without a restart; if it does not show up, restart the agent.
curl -fsSL --create-dirs -o ~/.claude/skills/domain-modeling/SKILL.md https://anymodel.org/en/skills/matt-pocock/domain-modeling/SKILL.md -o ~/.claude/skills/domain-modeling/ADR-FORMAT.md https://anymodel.org/en/skills/matt-pocock/domain-modeling/ADR-FORMAT.md -o ~/.claude/skills/domain-modeling/GLOSSARY-FORMAT.md https://anymodel.org/en/skills/matt-pocock/domain-modeling/GLOSSARY-FORMAT.md -o ~/.claude/skills/domain-modeling/LICENSE https://anymodel.org/en/skills/matt-pocock/domain-modeling/LICENSE -o ~/.claude/skills/domain-modeling/agents/openai.yaml https://anymodel.org/en/skills/matt-pocock/domain-modeling/agents/openai.yaml
curl -fsSL --create-dirs -o ~/.agents/skills/domain-modeling/SKILL.md https://anymodel.org/en/skills/matt-pocock/domain-modeling/SKILL.md -o ~/.agents/skills/domain-modeling/ADR-FORMAT.md https://anymodel.org/en/skills/matt-pocock/domain-modeling/ADR-FORMAT.md -o ~/.agents/skills/domain-modeling/GLOSSARY-FORMAT.md https://anymodel.org/en/skills/matt-pocock/domain-modeling/GLOSSARY-FORMAT.md -o ~/.agents/skills/domain-modeling/LICENSE https://anymodel.org/en/skills/matt-pocock/domain-modeling/LICENSE -o ~/.agents/skills/domain-modeling/agents/openai.yaml https://anymodel.org/en/skills/matt-pocock/domain-modeling/agents/openai.yaml
foreach ($f in 'SKILL.md','ADR-FORMAT.md','GLOSSARY-FORMAT.md','LICENSE','agents/openai.yaml') { $p = Join-Path "$HOME\.claude\skills\domain-modeling" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/matt-pocock/domain-modeling/$f" -UseBasicParsing -OutFile $p }foreach ($f in 'SKILL.md','ADR-FORMAT.md','GLOSSARY-FORMAT.md','LICENSE','agents/openai.yaml') { $p = Join-Path "$HOME\.agents\skills\domain-modeling" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/matt-pocock/domain-modeling/$f" -UseBasicParsing -OutFile $p }Any other agent: save the file into its skills folder, or give it the link to the file: https://anymodel.org/en/skills/matt-pocock/domain-modeling/SKILL.md
SKILL.md
Domain Modeling
Actively build and sharpen the project's domain model as you design. This is the active discipline: challenging terms, inventing edge-case scenarios, and writing the glossary and decisions down the moment they crystallise. (Merely reading GLOSSARY.md for vocabulary is not this skill: that's a one-line habit any skill can do. This skill is for when you're changing the model, not just consuming it.)
File structure
Most repos have a single context:
/
├── GLOSSARY.md
├── docs/
│ └── adr/
│ ├── 0001-event-sourced-orders.md
│ └── 0002-postgres-for-write-model.md
└── src/
If a GLOSSARY-MAP.md exists at the root, the repo has multiple contexts. The map points to where each one lives:
/
├── GLOSSARY-MAP.md
├── docs/
│ └── adr/ ← system-wide decisions
├── src/
│ ├── ordering/
│ │ ├── GLOSSARY.md
│ │ └── docs/adr/ ← context-specific decisions
│ └── billing/
│ ├── GLOSSARY.md
│ └── docs/adr/
Create files lazily: only when you have something to write. If no GLOSSARY.md exists, create one when the first term is resolved. If no docs/adr/ exists, create it when the first ADR is needed.
During the session
Challenge against the glossary
When the user uses a term that conflicts with the existing language in GLOSSARY.md, call it out immediately. "Your glossary defines 'cancellation' as X, but you seem to mean Y. Which is it?"
Sharpen fuzzy language
When the user uses vague or overloaded terms, propose a precise canonical term. "You're saying 'account': do you mean the Customer or the User? Those are different things."
Discuss concrete scenarios
When domain relationships are being discussed, stress-test them with specific scenarios. Invent scenarios that probe edge cases and force the user to be precise about the boundaries between concepts.
Cross-reference with code
When the user states how something works, check whether the code agrees. If you find a contradiction, surface it: "Your code cancels entire Orders, but you just said partial cancellation is possible. Which is right?"
Update GLOSSARY.md inline
When a term is resolved, update GLOSSARY.md right there. Don't batch these up: capture them as they happen. Use the format in GLOSSARY-FORMAT.md.
GLOSSARY.md should be totally devoid of implementation details. Do not treat GLOSSARY.md as a spec, a scratch pad, or a repository for implementation decisions. It is a glossary and nothing else.
Offer ADRs sparingly
Only offer to create an ADR when all three are true:
- Hard to reverse: the cost of changing your mind later is meaningful
- Surprising without context: a future reader will wonder "why did they do it this way?"
- The result of a real trade-off: there were genuine alternatives and you picked one for specific reasons
If any of the three is missing, skip the ADR. Use the format in ADR-FORMAT.md.
Connect through AnyModel API
This skill runs on whatever model your agent uses. Point Claude Code, Codex or Cursor at AnyModel to run it on Claude, GPT, Gemini and more with one key — pay per token, no subscription.
AnyModel