domain-modeling

domain-modeling is a skill for Codex from kreek/consult. It costs 22 tokens per session (1,087 once invoked), scanned A, original, MIT.

A software-design guide for defining data shapes, rules, and allowed state changes before writing the code that uses them.

In plain words
What is it for?
Use it when designing domain data, validation, statuses, transitions, value objects, parsing, or code where business rules and effects are mixed together.
Why use it?
It helps prevent invalid combinations of data from being created and keeps business rules separate from input/output work such as database or network access.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when designing domain data, validation, statuses, transitions, value objects, parsing, or code where business rules and effects are mixed together.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kreek/consult/domain-modeling
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kreek/consult --skill domain-modeling
Clone the repo
git clone --depth 1 https://github.com/kreek/consult

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for domain-modeling

README.md
[![agentmods](https://agentmods.dev/badge/skills/kreek/consult/domain-modeling.svg)](https://agentmods.dev/skills/kreek/consult/domain-modeling)
Your own site
<a href="https://agentmods.dev/skills/kreek/consult/domain-modeling"><img src="https://agentmods.dev/badge/skills/kreek/consult/domain-modeling.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,087 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.01087
Opus 5 $0.00011 $0.00544
Sonnet 5 $0.00004 $0.00217
Haiku 4.5 $0.00002 $0.00109

Measured 3d ago against content hash a3854af7897c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

domain-modeling scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/.agents/skills/domain-modeling/SKILL.md · 93 lines

How it starts

The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Domain Modeling

Iron Law

ILLEGAL STATES MUST BE UNREPRESENTABLE IN THE DOMAIN CORE.

If the type or data shape permits a state the domain forbids, a future caller will construct it. Make the state impossible to express rather than guarding against it.

When to Use

  • Data shape affects correctness: domain data, fields, states, allowed combinations, transitions, validation boundaries, value objects, functional cores, or effect isolation.
  • Reviewing code where I/O, mutation, and business rules are coupled.

When NOT to Use

  • Public HTTP contract details; use api. Physical schema; use database.
  • Module organization, layering, DDD tactical patterns; use architecture.
  • Broad refactoring sequence; use refactoring.

Rules

  1. Decide data shapes and invariants before writing transformations.
  2. Distinguish identity, state, value, and time. Prefer immutable records, sums, and maps. A class that wraps pure functions is a module; avoid classes that bundle behavior with mutable state.
  3. Split code into data, calculations, and actions. Maximize data and calculations; minimize actions.
  4. Parse external input once, at the boundary, into a trusted internal shape. Internal code never handles raw strings or maps. Use the ecosystem's de-facto schema library (Pydantic in Python, Zod in TypeScript), honoring any existing project choice; hand-roll with the same discipline only where no clear leader exists.
  5. Model allowed states as explicit variants, not flag or nullable combinations. Split a nullable that means both "missing" and "not loaded" into named states.
  6. Effects (async, exceptions, I/O, clocks, randomness, logging, persistence, mutation, shared state) are contagious. Keep them at the imperative shell so the functional core stays pure. Core tests run without mocks, monkey-patches, databases, network, or global time.
  7. Discover abstractions from repeated domain meaning. No generic wrappers, base classes, or helper layers before the data proves they pay.
  8. Names carry the model. A method states its role in the domain process: settleInvoice or expireHold, not process, handle, or execute. A suffix like Service or Manager is fine only with a domain word saying what kind.
  9. Each non-trivial invariant or transition gets a Proof Contract (claim, data invariant, boundary, check, evidence) via proof.
  10. A core model, shared invariant, or state machine future work will bind to is listed for approval before implementation; contract-first owns the approval scope. Disposable or purely local shapes are not gated.
  11. Load references/dates.md whenever the diff stores, compares, formats, serializes, or computes on dates or times, and references/money.md whenever it does so on monetary amounts.

Read the full file on GitHub · 93 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago Changed · -44 lines a3854af7897c
  2. 7d ago First seen · 137 lines · 22 tokens per session scan A 88524236e0ce

Subscribe to this mod's changes

domain-modeling is a skill published in the GitHub repository kreek/consult (1 stars, last pushed 5d ago), licensed MIT. It adds 22 tokens to every session and 1,087 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

build-falco-web-app

Build or modify a Falco web application in idiomatic F#, using functional routing, request and response helpers, explicit ASP.NET Core integration, security boundaries, and focused tests.

gaelic-ghost/socket · 42 tokens

build-giraffe-web-app

Build or modify a Giraffe web application in idiomatic F#, using composable HttpHandler functions, explicit ASP.NET Core integration, configuration, authentication, and focused endpoint tests.

gaelic-ghost/socket · 43 tokens

build-oxpecker-web-app

Build or modify an Oxpecker web application in idiomatic F#, using endpoint routing, functional EndpointHandler and EndpointMiddleware composition, ASP.NET Core metadata, and focused endpoint tests.

gaelic-ghost/socket · 44 tokens

contracts

Team baseline for external-interface contract artifacts: OpenAPI, JSON Schema, AsyncAPI, .proto, and GraphQL SDL, with spectral, ajv, buf, and graphql-inspector validation. Nudges devs toward contract-first artifacts; never writes them and never scaffolds a contracts/ directory. Auto-triggers for what contract should…

ramboz/jig · 163 tokens

swift-openapi-client-workflow

Build, integrate, test, and diagnose Swift OpenAPI Generator clients in Apple-platform apps and Swift packages using OpenAPIURLSession, OpenAPIRuntime, URLSessionTransport, SwiftPM plugins, Apple docs, Dash docsets, and clear handoffs to server-side Swift OpenAPI workflows when the API contract or server transport…

gaelic-ghost/socket · 73 tokens

aspnet-core-service-workflow

Plan, build, and validate ASP.NET Core service surfaces for F#, C#, or mixed .NET solutions using explicit project ownership, configuration, endpoints, tests, and dotnet CLI validation.

gaelic-ghost/socket · 45 tokens