Principle Model The Domain
Encode domain rules in data structures so invalid states cannot exist and branches disappear.
- CCM score
- 62 of 100
- skills.sh installs
- 13.3K
- GitHub stars
- 5.5K
- last updated
- Nov 30, 2026
Own this skill? Claim it
What it does
- Covers replacing scattered booleans, phase checks, and if/else chains with state machines, typed models, maps, or discriminated unions
- Recommends reducers over ad hoc mutations, and indexes, queues, or normalized collections where the access pattern calls for them
- Advises keeping plain code when the shape is clear, local, and unlikely to grow, and avoiding indirection that removes no branches
- Flags a growing if/else chain or a second boolean that must stay in sync with the first as signs this skill should have been applied
Install
$ npx -y skills add backnotprop/pstack --skill principle-model-the-domain -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Model the Domain
Encode the domain in a data structure instead of scattering it across conditionals. The right structure makes invalid states unrepresentable and deletes branches.
Reach for a state machine instead of scattered booleans or phase checks, a typed model instead of loose parameters, a map, registry, or discriminated union instead of branching spread across files, a reducer instead of ad hoc mutations, and an index, queue, or normalized collection where the access pattern calls for it.
Do not force it. Keep boring code when the shape is clear, local, and unlikely to grow, and distrust an abstraction that adds indirection without removing branches or invalid states.
The sign that you skipped this: a feature that grows an if/else chain by one more branch, or a second boolean that must stay in sync with the first.
Details
- Repository
- github.com/backnotprop/pstack
- First seen
- Nov 30, 2026
More from backnotprop/pstack
All 44- Principle Migrate Callers Then Delete Legacy Apis13.3K
- Principle Guard The Context Window13.3K
- Principle Test Behavior Not Implementation13.3K
- Principle Redesign From First Principles13.3K
- Principle Build The Lever13.3K
- Principle Minimize Reader Load13.3K
- Principle Boundary Discipline13.3K
- Principle Exhaust The Design Space13.3K
- Principle Never Block On The Human13.2K
- Automate Me13.2K
- Principle Foundational Thinking13.2K
- Principle Attack The Premise13.2K
- Principle Sequence Verifiable Units13.2K
- Principle Outcome Oriented Execution13.2K
- Principle Separate Before Serializing Shared State13.2K
- Principle Experience First13.2K
- Make Bot Ui12.8K
- Correct12.5K
- Principle Explain The Number12.3K
- How14.1K
- Why13.9K
- Arena13.9K
- Principle Fix Root Causes13.8K
- Interrogate13.7K
Similar to Principle Model The Domain
cavemanjuliusbrussee/caveman646.1K installsUltra-compressed communication mode. Cuts output tokens 65% (measured) by speaking like caveman while keeping full technical accuracy. Supports intensity levels
grill-memattpocock/skills1.6M installsA relentless interview to sharpen a plan or design.
improveshadcn/improve43.4K installsSurvey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on s
systematic-debuggingobra/superpowers346.5K installsUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes
find-skillsvercel-labs/skills4.5M installsHelps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express int
hyperframes-cliheygen-com/hyperframes1.7M installsUse the HyperFrames CLI development loop: init, add, catalog, capture, lint, check, snapshot, compare, grade-compare, preview, play, present, beats, keyframes,