domain-entity

Installation
SKILL.md

Domain Entity

Goal

Define a domain entity as a domain object with a unique identity that persists over time, even as its attributes change.

A domain entity encapsulates business behavior, business rules, and invariants related to its own data. It acts as a core building block in the domain or business layer for concepts such as a customer, order, subscription, account, or shipment.

Treat a domain entity as identity-driven code. The key question is whether the object represents a specific domain concept that remains the same thing throughout its lifecycle while its state evolves.

What Counts as a Domain Entity

Classify code as a domain entity when it does one or more of these things:

  • represents a specific domain concept through a stable identity
  • carries an identifier that distinguishes one instance from another across time
  • preserves continuity as state changes throughout a lifecycle
  • exposes behaviors that apply domain rules to its own data
  • enforces invariants that must remain true for that specific domain concept
Related skills

More from code-sherpas/agent-skills

Installs
7
First Seen
Mar 24, 2026