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.
npx skills add kreek/consult --skill domain-modelinggit clone --depth 1 https://github.com/kreek/consultWrote 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.
[](https://agentmods.dev/skills/kreek/consult/domain-modeling)<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>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.
| Model | Per session | Once 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 |
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.
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; usedatabase. - Module organization, layering, DDD tactical patterns; use
architecture. - Broad refactoring sequence; use
refactoring.
Rules
- Decide data shapes and invariants before writing transformations.
- 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.
- Split code into data, calculations, and actions. Maximize data and calculations; minimize actions.
- 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.
- Model allowed states as explicit variants, not flag or nullable combinations. Split a nullable that means both "missing" and "not loaded" into named states.
- 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.
- Discover abstractions from repeated domain meaning. No generic wrappers, base classes, or helper layers before the data proves they pay.
- Names carry the model. A method states its role in the domain process:
settleInvoiceorexpireHold, notprocess,handle, orexecute. A suffix likeServiceorManageris fine only with a domain word saying what kind. - Each non-trivial invariant or transition gets a Proof Contract (claim,
data invariant, boundary, check, evidence) via
proof. - A core model, shared invariant, or state machine future work will bind to
is listed for approval before implementation;
contract-firstowns the approval scope. Disposable or purely local shapes are not gated. - Load
references/dates.mdwhenever the diff stores, compares, formats, serializes, or computes on dates or times, andreferences/money.mdwhenever it does so on monetary amounts.
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.
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.
- 3d ago Changed · -44 lines a3854af7897c
- 7d ago First seen · 137 lines · 22 tokens per session scan A 88524236e0ce
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.
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.
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.
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.
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…
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…
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.