domain-modeling
Skill0 starsChanged yesterdayMITView on GitHub
Domain-driven design with checks behind every rule. Use when a
195 other projects use a version of this.
Adopted by
Most recently taken up by
- theishandubey/dotclaudetheir own version, first seen Nov 15, 2026
- phamgialinhlx/rmuxtheir own version, first seen Nov 15, 2026
- SnoozleStudio/opencode-wp-settingstheir own version, first seen Nov 15, 2026
- geoffbremner/skillstheir own version, first seen Nov 15, 2026
- ychampion/ystacktheir own version, first seen Nov 15, 2026
- quickchatai/quickreviewtheir own version, first seen Nov 15, 2026
Used with
Projects with it also use setup-ts-deep-modules, decision-mapping 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.
liufeng1976Skillsetup-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 43 projects that use this
FabienDehopreSkilldecision-mapping
Turn a loose idea into a sequenced map of investigation tickets, then drive them to resolution one at a time.
Also in 8 projects that use this
LesaniSkillwriting-beats
Shape an article as a journey of beats, choose-your-own-adventure style. The user picks a starting beat from the raw material, you write only that beat, then offer options for where to pivot next, beat by beat, until the article reaches a natural end. Use when the user has raw material and wants to assemble it as a narrative rather than an argument.
Also in 62 projects that use this
RoentekSkillloop-me
Grill me about specs for the workflows I want to build, within this workspace.
Also in 56 projects that use this
AWSSkillwizard
Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.
Also in 134 projects that use this
LesaniSkillwriting-shape
Take a markdown file of raw material and shape it into an article through a conversational session — drafting candidate openings, growing the piece paragraph by paragraph, arguing about format (lists, tables, callouts, quotes) at each step. Use when the user has a pile of notes, fragments, or a rough draft and wants help turning it into something publishable.
Also in 60 projects that use this
- +1 more from Lesani
Other versions195 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 195
- mattpocock/skills★ 309ksame name
- QuivrHQ/quivr★ 40ksame name
- The-Vibe-Company/quivr★ 40ksame name
- windmill-labs/windmill★ 18ksame name
- GreyDGL/PentestGPT★ 16ksame name
- formbricks/formbricks★ 13ksame name
- ArcReel/ArcReel★ 6.3ksame name
- vinvcn/mattpocock-skills-zh-CN★ 5.5ksame name
- withcoral/coral★ 4.9ksame name
- bestofjs/bestofjs★ 3.1ksame name
185 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 repository34 other files it gives its agents.
- astroSkill
- bun-standardsSkill
- postgresSkill
- react-engineeringSkill
- rust-standardsSkill
- spring-bootSkill
- tailwind-v4Skill
- typescript-standardsSkill
- vitest-testingSkill
- api-designSkill
- architecture-reviewSkill
- benchmark-readiness-reviewSkill
- cli-designSkill
- codebase-scoutingSkill
- code-review-findingsSkill
- config-projection-reviewSkill
- documentation-hygieneSkill
- formal-verificationSkill
- implementation-planningSkill
- orchestration-workflowSkill
- problem-clarificationSkill
- product-copySkill
- refactorSkill
- repository-text-hygieneSkill
- researchSkill
- security-scope-reviewSkill
- setup-canastaSkill
- system-designSkill
- task-closeoutSkill
- tddSkill
- technical-writingSkill
- upstream-contributionSkill
- writing-issuesSkill
- writing-prSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 184 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Read GLOSSARY.md first: at the repository root, or the per-context file named in a root GLOSSARY-MAP.md.
- Distinctive: line 51
When a name crosses surfaces (persisted, serialized, a public API, a prompt), trace its contract with concept contracts before changing it.
- Very specific: line 98
Write a property-based test for each invariant of a decider: generate command sequences, fold them through decide and evolve, and assert …
- Distinctive: line 129
Use review. Lead with findings ordered by severity, each tied to the language, invariant, lifecycle or coupling evidence behind it.
“Common” is measured: kept by at least 6 in 10 of the 184 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
Domain rules held in prose drift; rules held in types, tests and build checks hold. Each step below ends in an artifact a tool checks: the glossary, a boundary test, closed types, a property test.
Skip the tactical steps (3–5) for plain data maintenance with no business rule, and say so in the pull request. Vocabulary and boundaries apply to every context.
1. Vocabulary
Read GLOSSARY.md first: at the repository root, or the per-context file
named in a root GLOSSARY-MAP.md. Then, while designing:
- Challenge a term that conflicts with the glossary, and ask which meaning holds.
- Sharpen a vague or overloaded term into a canonical one, using concrete scenarios that probe its edges.
- Cross-check the code: when a stated rule and the code disagree, quote the code and ask which is right.
Write each settled term into the glossary at once, in this shape:
**Reservation**: a seat held for one customer until checkout completes or the hold expires. _Avoid_: booking, hold
The glossary holds what terms mean and nothing else; decisions go to an ADR, and only when the decision is hard to reverse, surprising without context and the result of a real trade-off. A rename updates the glossary, the code, tables, events, status values and issue titles in the same commit.
When a name crosses surfaces (persisted, serialized, a public API, a prompt), trace its contract with concept contracts before changing it.
Done when every term the change introduces or renames is in the glossary and the code uses it.
2. Bounded contexts
- Each context is a module that owns its capability, its terms and its data. Contexts meet only through each other's public API; translate at that boundary. Each context owns its tables and entity classes.
- Domain code imports only the language and its standard library: no framework, persistence, transport or serialization types.
- Enforce both with a boundary test in CI, using boundary checks. An existing codebase records its current violations as a baseline, so only new ones fail.
Done when the boundary test runs in CI and passes against the baseline.
3. Decider
For a context whose state changes under business rules, model it as a decider (templates):
- Commands (
ReserveSeat), events in the past tense (SeatReserved) and rejections (SeatAlreadyTaken) are closed types, matched exhaustively. decide(command, state)is pure and returns events or a rejection.evolve(state, event)applies one event, covers every state and never fails.- The lifecycle is an explicit state type, so an invalid state is unrepresentable.
- Size the aggregate to the smallest data that must stay consistent in one transaction. Reference other aggregates by identity. A rule spanning aggregates gets its own aggregate, or a policy that reacts to events.
- The application service loads state, calls
decide, appliesevolve, saves and publishes. It holds no business rule.
Store state in the database by default. Choose event sourcing for a context whose history itself has business value, such as a ledger or an audit trail, and record that choice in an ADR.
Done when every business rule of the change lives in a decide function and
the compiler rejects an unhandled command, event or state.
4. Invariants
Write a property-based test for each invariant of a decider: generate command
sequences, fold them through decide and evolve, and assert the invariant
on every resulting state. Use jqwik in Java, fast-check in TypeScript and
Hypothesis in Python. Where the risk justifies a proof, such as money, hand
decide to formal-verification.
Done when each invariant named in the glossary or the plan has a property test that fails when the rule is removed.
5. Skeleton first
A new context starts as a skeleton: glossary entries; command, event,
rejection and state types; decide and evolve signatures; and the invariant
tests, failing. Implementation follows in a later commit.
6. Integration
Around a decider, add the pattern the risk calls for, with its check, from integration:
- a command that moves money or inventory may be retried: idempotency key;
- two writers may race on one aggregate: optimistic concurrency;
- a side effect leaves the database: transactional outbox;
- a flow spans aggregates: process manager;
- a client must work offline: local queue with server authority.
Done when each risk the change introduces has its pattern and its passing check, or the pull request names the risk accepted instead.
Reviewing a model
Use review. Lead with findings ordered by severity, each tied to the language, invariant, lifecycle or coupling evidence behind it; say plainly when the model is sound.
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.

