Skip to content
Back to skills

Qstack Model The Domain

ASecurity

Replace scattered domain assumptions with the smallest structure that removes invalid states and branching. Use when booleans have to be kept in sync, the same rule is validated at several call sites, a branch grows with every new case, or an invalid state can be represented at all.

  • 7 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 5, 2026
ai-agentsgitapi

Works with

  • cursor
  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add hani-q/qstack --skill qstack-model-the-domain --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Qstack Model The Domain?

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

Security grade badge for Qstack Model The Domain
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hani-q-qstack-model-the-domain/badge)](https://www.skillsdirectory.com/skills/hani-q-qstack-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: qstack-model-the-domain
description: >
  Replace scattered domain assumptions with the smallest structure that removes
  invalid states and branching. Use when booleans have to be kept in sync, the
  same rule is validated at several call sites, a branch grows with every new
  case, or an invalid state can be represented at all.
license: MIT
---

# Model the domain

Encode the real domain in a structure instead of distributing it across
booleans, conditionals, loose parameters, and lifecycle checks.

## Find the missing shape

1. Trace the states, transitions, invariants, ownership, and dominant access
   paths in the current code.
2. Locate repeated shape assumptions, synchronized booleans, growing branches,
   ad hoc mutation, and phase-named modules that repeat the same domain rules.
3. Choose the smallest structure that removes those problems. Candidates
   include a state machine, typed model, discriminated union, registry, lookup
   table, reducer, command/event model, queue, cache, index, graph, normalized
   collection, or one module that owns a coherent body of domain knowledge.
4. Compare the proposed shape with the current one. It must delete branches,
   duplicated rules, invalid states, or lifecycle risk. Extra indirection alone
   is not a benefit.
5. Leave clear, local, stable code alone when no structure materially improves
   it. Three explicit statements can be better than a premature abstraction.

State the invariant the model enforces, the access patterns it serves, the
invalid states it removes, and the migration boundary. Design work does not
authorize implementation beyond the user's request. Assess compatibility and
migration before changing a public API or persisted shape. Design alone does
not authorize commits, pushes, publishing, deployment, or external messages.

Adapted from Lauren Tan's PStack
[`principle-model-the-domain`](https://github.com/cursor/plugins/blob/60c641e4fad674784b30abcf9f8915dea39df38d/pstack/skills/principle-model-the-domain/SKILL.md)
at commit `60c641e4fad674784b30abcf9f8915dea39df38d` under the MIT License.
See [third-party notices](../../THIRD_PARTY_NOTICES.md).

Files in this skill

  • SKILL.md2.1 KB
  • agents/openai.yaml286 B

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.

Comments

Loading comments…

Newsletter

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