domain-modeling
Skill18 starsChanged 3 months agoMITView on GitHub
Domain-Driven Design discipline, build a ubiquitous language shared by code and conversation, draw explicit bounded contexts where a term's meaning holds, and record significant decisions as one-page Architecture Decision Records. Use when project vocabulary is inconsistent or ambiguous, when the same word means different things in different parts of a codebase, when onboarding needs a shared glossary, or when a significant architectural decision needs to be captured for later.
171 other projects use a version of this.
Adopted by
Most recently taken up by
- mattpocock/skillstheir own version, first seen Oct 8, 2026
- BUGLAN/skillstheir own version, first seen Oct 6, 2026
- AlexisBalayre/claude-code-configtheir own version, first seen Oct 5, 2026
- KroxiDev/engineering-skillstheir own version, first seen Oct 5, 2026
- gordon1210/reposcouttheir own version, first seen Oct 4, 2026
- michielvandermeer/skillstheir own version, first seen Oct 4, 2026
Used with
Projects with it also use writing-beats, setup-ts-deep-modules and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
RoentekSkillwriting-beats
Writing, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it.
Also in 24 projects that use this
loulanyueSkillsetup-ts-deep-modules
Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.
Also in 16 projects that use this
risadamsSkillwhich-skill
Router over this pack's skills and flows. Ask it "which skill fits X" when you don't remember what's available.
Also in 5 projects that use this
RoentekSkillwriting-shape
Writing, exploit — shape raw material into an article, paragraph by paragraph.
Also in 22 projects that use this
pahwarangerSkillsetup-skills
Sets up an `## Agent skills` block in AGENTS.md/CLAUDE.md and `docs/agents/` so the engineering skills know this repo's ticket tracker (GitHub or local markdown), triage label vocabulary, and domain doc layout. Run before first use of `to-tickets`, `to-prd`, `triage`, `diagnose`, `tdd`, `improve-codebase-architecture`, or `zoom-out` — or if those skills appear to be missing context about the ticket tracker, triage labels, or domain docs.
Also in 7 projects that use this
qwlabsSkillclaude-handoff
Hand the current conversation off to a fresh background agent that picks up the work immediately.
Also in 17 projects that use this
- +2 more from Roentek
Other versions171 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 171
- mattpocock/skills★ 335ksame name
- vinvcn/mattpocock-skills-zh-CN★ 4.6ksame name
- rohitg00/pro-workflow★ 2.9ksame name
- stevesolun/ctx★ 588same name
- nodetool-ai/nodetool★ 551same name
- mxyhi/ok-skills★ 492same name
- aws/graph-explorer★ 484same name
- devcxl/mattpocock-skills-zh★ 426same name
- Tiberriver256/mcp-server-azure-devops★ 393same name
- bighadj22/codflow★ 338same name
161 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository33 other files it gives its agents.
- api-design-standardsSkill
- architecture-diagramSkill
- capacity-estimationSkill
- codebase-designSkill
- code-reviewSkill
- code-style-lintSkill
- dependency-upgrade-managementSkill
- diagnosing-bugsSkill
- explain-plainlySkill
- grillingSkill
- handoffSkill
- improve-codebase-architectureSkill
- incident-responseSkill
- observabilitySkill
- project-groundworkSkill
- prototypeSkill
- release-versioningSkill
- repo-secureSkill
- repo-shipSkill
- researchSkill
- resolving-merge-conflictsSkill
- safe-deploymentSkill
- secure-codingSkill
- spec-to-ticketsSkill
- tddSkill
- teachSkill
- test-strategySkill
- to-questionnaireSkill
- triageSkill
- wait-whatSkill
- wayfinderSkill
- wizardSkill
- writing-for-agentsSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 160 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
Not every decision needs a record: an ADR is for a decision that shapes structure, a non-functional characteristic, a dependency, an …
- Distinctive: line 47
If the length pushes past one page, it's usually documenting more than one decision.
- Distinctive: line 49
Write ADR prose without em dashes: use a comma, colon, period, or a reworded sentence instead.
“Common” is measured: kept by at least 6 in 10 of the 160 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Domain Modeling
A model's vocabulary is the code's vocabulary. The same word means the same thing in conversation, code, and documentation; inside one deliberately bounded area. A term that needs qualifying every time it's used ("order" meaning a purchase in one team's code and a queue position in another's) is not one term with an ambiguity problem, it's two terms wearing the same word, and the fix is a boundary, not a footnote.
Phase 1: Build the ubiquitous language
- Build the vocabulary with the people who know the domain, not in isolation; a term invented by engineers alone tends to drift from how the business actually talks about the thing, which reopens the translation gap this phase exists to close.
- Use the agreed term everywhere: class names, variable names, module boundaries, commit messages, conversation, and documentation. If the code says
Customerand the domain experts sayClient, one of the two is wrong; reconcile it rather than letting code and conversation quietly diverge into two dialects. - A term needing a qualifier every time it's spoken ("the shipping order, not the purchase order") is the tell that two concepts are sharing one word. Split the word, or draw a boundary (Phase 2) so each side keeps its own meaning without collision.
- Record the language in a living glossary (a
CONTEXT.mdor equivalent) that a new contributor reads before writing code in the area; the language exists to lower everyone's cognitive load, which only works if it's written down somewhere more durable than institutional memory. domain-modelingowns the project's glossary or vocabulary artifact (CONTEXT.mdor equivalent).explain-plainlyshould consume its terms or propose entries into that artifact rather than maintaining a separate glossary.
Phase 2: Draw bounded contexts
A bounded context is an explicit boundary (team, codebase area, or database schema) inside which one model and its language hold a single, consistent meaning. Outside that boundary, the same word is allowed to mean something else on purpose, because it belongs to a different model serving a different concern.
- Draw the boundary around a real seam: team ownership, a deployable unit, a bounded area of the business, not an arbitrary folder split.
- Where two contexts must exchange data (a shipping context needs to know about an order the sales context owns), translate explicitly at the boundary rather than importing one context's model wholesale into the other's; an untranslated import is how one context's internal vocabulary leaks into and corrupts a second context's language.
- A context map shows which contexts exist and how they relate (one upstream of another, a shared kernel, or a translation layer between them). It is worth drawing out loud when a project has more than a couple of contexts, so the boundaries are a decision the team can see, not an accident of how the code happened to get split.
Phase 3: Record significant decisions (ADRs)
Not every decision needs a record: an ADR is for a decision that shapes structure, a non-functional characteristic, a dependency, an interface, or a construction technique going forward. Use Michael Nygard's format, kept to one page:
# <Number>. <Title>
## Status
Proposed | Accepted | Superseded by <ADR-N>
## Context
The forces at play (technical, business, or team constraints) that make this decision necessary. Stated neutrally, not as an argument for the answer already chosen.
## Decision
What was decided, stated as a plain, active sentence ("We will use X"), not a menu of options.
## Consequences
What becomes easier and what becomes harder as a result. Every real decision has both; an ADR with no downside listed under Consequences didn't look hard enough.- An ADR describes why, not how: implementation detail belongs in code and its comments, not the record of the decision that led there.
- If the length pushes past one page, it's usually documenting more than one decision; split it.
- A superseded decision is never edited in place; write a new ADR, mark the old one's status as
Superseded by <new ADR>, and leave the original text intact. The history of why things changed is as valuable as the current state. - Write ADR prose without em dashes: use a comma, colon, period, or a reworded sentence instead.
Phase 4: Keep it alive
A glossary term or an ADR that no longer matches how the system actually works is a signal to revisit the model, not a stale doc to quietly patch around. Treat a mismatch surfaced during a grilling conversation, a code review, or a fresh onboarding question as a trigger to update CONTEXT.md and, if the underlying decision changed, write a new ADR superseding the old one.
Done when
- Every term in active use means one thing inside its bounded context, and that meaning matches what domain experts actually say.
- Code identifiers (classes, modules, key variables) use the same words as the glossary and the conversation; no quiet dialect drift.
- Any place two contexts exchange data does so through an explicit translation, not a raw import of the other's model.
- A significant decision has a one-page ADR stating context, decision, and consequences, and a changed decision superseded the old ADR rather than editing it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

