Skip to content
Domain Modeling

Domain Modeling Skill

Matt Pocock's skill for actively building a project's domain model while you design: it challenges terms against GLOSSARY.md, sharpens vague language, stress-tests concepts with scenarios, checks claims against the code and records ADRs sparingly.

GitHub Docs

Install

Install with the skills CLI

One command for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf and dozens of other agents. Needs Node.js; the skill is fetched straight from mattpocock/skills.

$ npx skills add mattpocock/skills --skill domain-modeling

Run it in a terminal. The CLI finds the agents installed on your machine, asks which ones to add the skill to, and whether to install it into the folder you ran it from or for all your projects.

Other ways to install

Copy the whole skill folder — SKILL.md and any scripts or references beside it — into ~/.claude/skills/domain-modeling/, where Claude Code picks it up in every project. Only git is needed.

tmp=$(mktemp -d) && \
  git clone --depth 1 --branch main https://github.com/mattpocock/skills.git "$tmp" && \
  mkdir -p ~/.claude/skills && \
  cp -R "$tmp"/skills/engineering/domain-modeling ~/.claude/skills/domain-modeling

No scripts or references next to it? Saving the SKILL.md alone as ~/.claude/skills/domain-modeling/SKILL.md works too.

Using another agent? Its personal skills folder
Codex
~/.agents/skills/
Cursor
~/.cursor/skills/
GitHub Copilot
~/.copilot/skills/
Gemini CLI
~/.gemini/skills/
Windsurf
~/.codeium/windsurf/skills/
OpenCode
~/.config/opencode/skills/

About

  • Challenges terms that conflict with the project's GLOSSARY.md
  • Proposes precise canonical terms for vague or overloaded language
  • Stress-tests domain relationships with invented edge-case scenarios
  • Cross-checks the user's statements against the code
  • Updates the glossary inline, with support for multi-context GLOSSARY-MAP.md repos
  • Offers ADRs only for hard-to-reverse, surprising, real trade-off decisions

Domain Modeling is an engineering skill from Matt Pocock's mattpocock/skills collection. It is the active half of keeping a shared vocabulary for a codebase: not just reading the glossary, but changing the model as the design conversation happens. It loads when you discuss codebase terminology, write or edit a GLOSSARY.md, or record or edit an architecture decision record (ADR). It is also what the collection's grill-with-docs skill combines with grilling to produce docs during a design interview.

The skill describes where things live: a single GLOSSARY.md and docs/adr/ at the root for most repositories, or a GLOSSARY-MAP.md that points to per-context glossaries and ADR folders in a repo with several bounded contexts. Files are created lazily, only when there is something to write.

During a session the agent calls out a term that conflicts with the glossary, proposes one precise word for a vague or overloaded one (is an "account" a Customer or a User?), invents edge-case scenarios to force clear boundaries between concepts, and checks what the user says against the code, surfacing contradictions. Resolved terms go into the glossary straight away, in the bundled format, and the glossary stays free of implementation details. ADRs are offered only when a decision is hard to reverse, surprising without context and the result of a real trade-off; if any of the three is missing, there is no ADR. It needs no tools beyond file editing. MIT licensed.

SKILL.md

The instructions your agent loads, as published by Matt Pocock.

SKILL.md
name
domain-modeling
description
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

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-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:

  1. Hard to reverse: the cost of changing your mind later is meaningful
  2. Surprising without context: a future reader will wonder "why did they do it this way?"
  3. 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](./ADR-FORMAT.md).

Install

Planning skill that interrogates your use case before any code is written, then recommends the right Twilio Conversations stack — ConversationRelay, Memory, Intelligence, Orchestrator, TaskRouter — and the implementation skills to follow.

71 views

Skill: SeeCode

by Aryan Utkarsh

Turn a short JSON spec into animated, explorable diagrams in 45 types, exported as HTML, SVG, PNG, GIF or MP4.

Browse all skills →