Skip to content
Back to skills

Principle Model The Domain

ASecurity

Apply when writing stateful logic, or when code branches a lot or repeats a shape assumption across files.

  • 5,257 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 19, 2026
ai-agentsrust

Security analysis

A100/100

Scanned November 19, 2026

npx -y skills add michael-denyer/pstack-claude --skill principle-model-the-domain --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Principle Model The Domain?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Principle Model The Domain
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/michael-denyer-principle-model-the-domain/badge)](https://www.skillsdirectory.com/skills/michael-denyer-principle-model-the-domain)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: principle-model-the-domain
description: "Apply when writing stateful logic, or when code branches a lot or repeats a shape assumption across files."
user-invocable: false
---

# 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.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.