domain-design

domain-design is a skill for Claude Code from rjmurillo/ai-agents. It costs 82 tokens per session (2,146 once invoked), scanned A, original, MIT.

A method for designing an API, data schema, or module boundary from the business actions and questions it must support. An API is a software interface, a schema defines stored data, and a module boundary separates responsibilities.

In plain words
What is it for?
Use it when shaping an API contract, database schema, or module interface and deciding between explicit state, history, and domain operations.
Why use it?
It prevents the design from merely copying incoming data or exposing generic create, read, update, and delete operations. The proposed design is checked against real use cases and required state.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the project-toolkit plugin — 125 skills, 25 commands, 33 agents, 5 hooks shipped together

Good fit Use it when shaping an API contract, database schema, or module interface and deciding between explicit state, history, and domain operations.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add rjmurillo/ai-agents
Claude Code
/plugin install project-toolkit

Made for: Claude Code.

Or install project-toolkit, the plugin that ships this one along with the rest of its 125 skills, 25 commands, 33 agents, 5 hooks.

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-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/rjmurillo/ai-agents/domain-design/github.svg)](https://agentmods.dev/skills/rjmurillo/ai-agents/domain-design)
Your own site
<a href="https://agentmods.dev/skills/rjmurillo/ai-agents/domain-design"><img src="https://agentmods.dev/badge/skills/rjmurillo/ai-agents/domain-design/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for domain-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/rjmurillo/ai-agents/domain-design"><img src="https://agentmods.dev/badge/skills/rjmurillo/ai-agents/domain-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,146 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.00082 $0.02146
Opus 5.5 $0.00033 $0.00858
Sonnet 5.5 $0.00016 $0.00429
Haiku 4.5 $0.00008 $0.00215

Measured 4d ago against content hash 8ebfff6a8c38, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

domain-design 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 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/evaluate_design.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.claude/skills/domain-design/SKILL.md · 202 lines

How it starts

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

Domain Design

Design from the behavior the business must observe and control. Source shape and implementation convenience are inputs, not the domain model.

Owns one invariant: an API, schema, or module boundary is derived from business questions and operations, then validated against them. It does not mandate DDD tactical patterns, ban CRUD, or replace architecture review or the ADR workflow. Quality principles (cohesion, coupling, YAGNI, minimal implementation) belong to the code-qualities-assessment skill; this skill applies them and does not restate them.

Triggers

design this schema, API design, where should this module boundary go, CRUD or domain operation, is this explicit state or reconstruction

When It Applies

A change adds or reshapes an API contract, a table or document schema, or a module boundary. A change that reuses an existing contract unchanged skips this skill.

Decision flow

business question or operation
  -> observable behavior + invariant
  -> state that must be explicit
  -> API/module contract, and schema/history model
  -> validate against use cases
  -> simpler adequate model? yes: adopt. no: revise boundaries and state.

Process

  1. Discover the business question. Name the decisions, actions, and questions the system must support. Who observes or invokes each? Which outcomes, invariants, and time semantics matter? Write each question as a sentence a business owner would say.
  2. Derive state. For each fact a question needs, decide: safe derivation or hidden reconstruction. A value computed cheaply from state you already hold is a derivation. A first-class fact rebuilt by joining or probing incidental rows (for example, "what have we fetched?" answered by scanning fact rows) is a reconstruction obligation. Row presence cannot tell a partial fetch from a complete one. Record that fact as explicit state. Mark which state changes over time and so needs history or effective-time.
  3. Derive operations. Use a domain operation when the behavior carries invariants or multi-step transaction semantics that generic CRUD would leak (for example, "replace this site's reporting window"). Use CRUD when the entity is plain create, read, update, delete with no extra invariant. Do not invent domain verbs to avoid CRUD.
  4. Derive the schema. Model domain state and invariants first. Treat an external or source payload as an integration contract that feeds the model, not as the model. Make important business facts queryable without rebuilding them from incidental traces.
  5. Derive boundaries. Align module and API boundaries with behavior, invariants, ownership, and reasons to change. Reject a boundary that exists only because the payload, ORM, or transport format has that shape.
  6. Validate against use cases. Walk three to five representative questions and commands through the design. Record any that need unrelated-table joins, inferred time, derived-state reconstruction, or coordination across boundaries. Treat repeated reconstruction or change amplification as design evidence, not query inconvenience. If a simpler adequate model exists, adopt it. Otherwise revise state or boundaries and walk again.

Read the full file on GitHub · 202 lines

Files

What ships with it

1 file 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. 4d ago First seen · 202 lines · 82 tokens per session scan A 8ebfff6a8c38

Subscribe to this mod's changes

domain-design is a skill published in the GitHub repository rjmurillo/ai-agents (48 stars, last pushed today), licensed MIT. It adds 82 tokens to every session and 2,146 once invoked, about $0.0003 per session on Opus 5.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-10-14.

Related

Other skills, from other repositories

sql-code-review

Universal SQL code review assistant that performs comprehensive security, maintainability, and code quality analysis across all SQL databases (MySQL, PostgreSQL, SQL Server, Oracle). Focuses on SQL injection prevention, access control, code standards, and anti-pattern detection. Complements SQL optimisation prompt for…

MarieLynneBlock/arcanum-artifex · 65 tokens

event-store-design

Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.

wshobson/agents · 33 tokens

cqrs-implementation

Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.

wshobson/agents · 35 tokens

ring:using-lib-systemplane

Using lib-systemplane, the hot-reload runtime-config plane (Postgres LISTEN/NOTIFY or MongoDB change streams), in two modes. Sweep Mode detects DIY config reload (SIGHUP, fsnotify, viper, pgx LISTEN), manual tenant-scoping, hand-built admin CRUD, and v4 residue. Reference Mode catalogs client lifecycle and…

LerianStudio/ring · 106 tokens

ring:using-outbox

Using the transactional-outbox pattern across lib-streaming (writer) and lib-commons/v5/commons/outbox (repository + relay), in two modes. Sweep Mode detects DIY outbox tables, hand-rolled relay loops, send-and-pray emits, missing WithOutboxTx wrapping, and broker calls inside DB transactions. Reference Mode catalogs…

LerianStudio/ring · 98 tokens

firebase

Use when building on Firebase — Firestore data modeling, Security Rules, Auth and custom claims, Cloud Functions, Storage, modular Web/Admin SDK imports — including symptoms like a database open to the internet, a query rejected by rules, or a doc stuck at 1 write/sec. NOT managed-Postgres BaaS with SQL and RLS (that…

ericrisco/rsc-harness · 77 tokens