When stateful logic accumulates branches or repeated shape assumptions.
Rule
Encode the domain in the right structure: state machine, typed model, table, registry, reducer, boundary, or collection instead of scattered conditionals.
Application
Name the concrete decision this principle changes.
Apply the rule to that decision, not as a decorative citation.
Prefer evidence from the current repository/runtime over generic preference.
If the principle conflicts with an explicit user constraint, keep the constraint and state the tradeoff.
1---2name: principle-model-the-domain3description: Model the Domain4---5# Model the Domain67## Trigger89When stateful logic accumulates branches or repeated shape assumptions.1011## Rule1213Encode the domain in the right structure: state machine, typed model, table, registry, reducer, boundary, or collection instead of scattered conditionals.1415## Application16171. Name the concrete decision this principle changes.182. Apply the rule to that decision, not as a decorative citation.193. Prefer evidence from the current repository/runtime over generic preference.204. If the principle conflicts with an explicit user constraint, keep the constraint and state the tradeoff.
Run npx skillmds@latest add theonlyfusioncube/principle-model-the-domain in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Model the Domain It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
TheOnlyFusionCube (@theonlyfusioncube) published this skill. Their other Agent Skills are listed on their SkillMD profile.