domain-modeling

Model domain models with entities, relationships, business rules, and permissions.

24|5|Updated Nov 28, 2025
One-click install
npx skills add https://github.com/thapaliyabikendra/ai-artifacts --skill domain-modeling
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: domain-modeling
Source: https://github.com/thapaliyabikendra/ai-artifacts/tree/main/.claude/skills/domain-modeling
Command: npx skills add https://github.com/thapaliyabikendra/ai-artifacts --skill domain-modeling

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides you in designing clear, expressive, and robust domain models, solving the challenge of representing complex business logic effectively in software. It enables you to create models that accurately reflect the business domain, leading to more understandable, maintainable, and scalable applications.

Core Features & Use Cases

  • Ubiquitous Language: Emphasizes using a shared language between domain experts and developers to ensure consistent understanding of business concepts.
  • Aggregates & Entities: Guides on identifying aggregate roots and entities, encapsulating business rules and ensuring data consistency.
  • Value Objects: Explores the use of value objects for representing descriptive aspects of the domain, promoting immutability and type safety.
  • Domain Events: Demonstrates how to use domain events to capture significant occurrences within the domain, enabling decoupled communication between aggregates and services.
  • Use Case: A team is building a new financial trading platform. Using this skill, they define the core domain concepts like Trade, Account, and Order as aggregates and entities, ensuring all business rules are correctly encapsulated and enforced.

Quick Start

Define a Money value object in C# that encapsulates an amount and a currency, ensuring it is immutable and handles equality correctly.

Frequently Asked Questions about domain-modeling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design domain models with entities and aggregates?

Domain modeling uses entities and aggregates to encapsulate business rules and ensure data consistency. Identify aggregate roots to represent core business concepts, define entities within those aggregates, and enforce invariants so your model accurately reflects business logic and remains maintainable as complexity grows.

What are value objects and when should I use them?

Value objects represent descriptive aspects of your domain—like Money, Address, or Status—and enforce immutability and type safety. Use them for domain concepts that lack identity and whose equality depends on their attributes, reducing bugs and making business intent explicit in code.

How do domain events help decouple services?

Domain events capture significant business occurrences and enable communication between aggregates and services without tight coupling. When an important action happens—like an Order placed or Account created—publish the event so other parts of your system react asynchronously and independently.

How do I define business rules and permissions in a domain model?

Encode business rules as invariants within aggregates and entities using BR-XXX format identifiers. Define role-based permission structures and document them alongside entity definitions so rules are enforced at the domain layer, preventing invalid state and making governance auditable.

What's the benefit of ubiquitous language in domain modeling?

Ubiquitous language creates a shared vocabulary between domain experts and developers, ensuring consistent understanding of business concepts. This reduces translation errors, aligns code structure with business thinking, and makes domain models self-documenting and easier to evolve.

Can I use domain modeling for financial or trading systems?

Yes. Domain modeling is well-suited for complex financial systems where precise business rule enforcement matters. Define aggregates like Trade, Account, and Order; use value objects for Money and quantities; and capture domain events for settlement and reconciliation to ensure correctness and auditability.