Install any skill in seconds. Free to start, no credit card required.
Get Started Free →michael-denyer/principle-model-the-domain
Apply when writing stateful logic, or when code branches a lot or repeats a shape assumption across files. Encode the domain in a structure instead of scattered conditionals.
Passed 21 of 23 test cases with the skill, and 21 of 23 without it.
1 fixed20 passed either way1 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
A test case the skill fixed. Same model, same prompt, with and without the skill.
We have an order processing backend in Python split into `order_loader.py`, `order_validator.py`, `order_transformer.py`, and `order_saver.py`. We need to add a fraud check step. Redesign the file and module organization for this order processing system.
| Checked | Without skill | With skill |
|---|---|---|
| Consolidates temporal phase modules into a domain boundary organized around the order entity. | Missed | Passed |
| Eliminates phase-named files organized by execution sequence. | Missed | Passed |
The instructions your model reads when the skill loads.
Encode the real domain in a data structure instead of scattering it across conditionals.
Why: Scattered booleans, repeated shape assumptions, and branching spread across files are accidental complexity. A structure that matches the domain makes invalid states unrepresentable and deletes branches. Choosing it at write time is cheap; recovering it later reads as a refactor and gets deferred.
Reach for structures like these:
Do not force an abstraction. Prefer boring code if the current shape is already clear, local, and unlikely to grow. Be skeptical of an abstraction that adds indirection without removing branches, duplicated rules, invalid states, or lifecycle risk.
The sign that you skipped this is a new feature that grows an existing if/else chain by one more branch, or a second boolean that must stay in sync with the first. Temporal decomposition is another sign. Phase-named modules repeat the same domain rules across steps.
test cases passed, vs 21 / 23 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.