From praxis
Guides domain modeling with a mandatory protocol: name entities, state invariants, assign lifecycle ownership, and make illegal states unrepresentable before writing migrations or ORM models.
How this skill is triggered — by the user, by Claude, or both
Slash command
/praxis:domain-modelingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
EXTREMELY_IMPORTANT: This is a MANDATORY protocol, not a suggestion. Follow every step.
EXTREMELY_IMPORTANT: This is a MANDATORY protocol, not a suggestion. Follow every step. Do not skip steps. Do not combine steps. Do not summarize. Work through each gate in order.
A schema that permits a state the business forbids is a bug you will spend months patching in application code. The model's job is to make illegal states impossible, not merely unlikely. Name the rules before you name the columns.
List the core entities using the words a domain expert would use (ubiquitous language). If you are inventing names no one in the business would recognize, you are modeling your first guess at the solution, not the domain — go back to the domain's vocabulary.
For EVERY entity, write at least one rule that must ALWAYS be true ("an order's total equals the sum of its line items"; "a lent copy has exactly one borrower"). An entity with no invariant is a bag of fields — question whether it is really an entity or just attributes of another one.
For every relationship, name which side OWNS the lifecycle (creates/deletes the other) and which merely references it. Unowned or doubly-owned relationships are where orphan rows and cascade-delete surprises come from. State the cardinality too (1:1, 1:N, N:M).
List the states the domain FORBIDS ("a copy lent to two members at once", "a hold on a copy that is available"). For each, check the current model: does it still allow that state? If yes, change the model — a required field, a unique constraint, a type, a moved relationship — so the state cannot be expressed. If it truly cannot be prevented structurally, flag it as requiring a runtime guard and say why.
DOMAIN MODEL: [system]
├── Entities: [entity → its invariant(s), one line each]
├── Relationships: [A—B, cardinality, which side owns lifecycle]
├── Illegal states forbidden: [state → made-unrepresentable how, or runtime-guarded + why]
└── Confidence: [HIGH / MEDIUM / LOW]
Confidence: HIGH — every entity has an invariant, ownership is unambiguous, forbidden states are structurally prevented. MEDIUM — some rules rely on runtime guards. LOW — core invariants are still unclear or ownership is contested; resolve before migrating.
Do NOT present the model until: - Every entity has at least one stated invariant - Every relationship names its owning side and cardinality - Each domain-forbidden state is either made unrepresentable in the model, or explicitly flagged as only runtime-guarded with a reasonA schema presented as a list of tables and columns with no invariants and no forbidden-state check is a protocol violation, even if it "looks complete".
Red flags that this skill catches:
Once the model holds, hand it to implementation for migrations/types, and to
architecture-reasoning if the model reveals a boundary or storage decision worth weighing.
npx claudepluginhub xd4o/praxis --plugin praxisExtracts domain entities from requirements and user stories using DDD principles, defines attributes and constraints, models relationships with cardinality, and documents state machines.
Guides domain modeling decisions: naming/typing top-level types/tables/concepts, choosing state persistence (in-memory vs. database), reviewing primitives vs. types.
Creates rigorous, validated models of entities, relationships, and constraints for database schemas, knowledge graphs, ontologies, API data models, and taxonomies. Covers relational, document, graph, event/time-series, and dimensional patterns with lifecycle modeling, soft deletes, polymorphic associations, and hierarchies.