domain-driven-design

domain-driven-design is a skill for Claude Code from vaquarkhan/Fullstack-development-agent-skills. It costs 38 tokens per session (1,833 once invoked), scanned A, original, MIT.

A guide for Domain-Driven Design, an approach that models software around the important business concepts and rules of a domain.

In plain words
What is it for?
It guides work with aggregates, value objects, domain events, repositories, services, DTOs, dependency injection, error handling, and targeted tests in Spring Boot projects.
Why use it?
It helps keep business logic out of controllers and database plumbing, making the model clearer and less likely to be reduced to basic create, read, update, and delete operations.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the fullstack-development-agent-skills plugin — 36 skills, 10 commands, 6 agents shipped together

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.

agentmods
npx agentmods add skills/vaquarkhan/fullstack-development-agent-skills/domain-driven-design
Any agent
npx skills add vaquarkhan/Fullstack-development-agent-skills --skill domain-driven-design
Clone the repo
git clone --depth 1 https://github.com/vaquarkhan/Fullstack-development-agent-skills

Made for: Claude Code.

Or install fullstack-development-agent-skills, the plugin that ships this one along with the rest of its 36 skills, 10 commands, 6 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/vaquarkhan/fullstack-development-agent-skills/domain-driven-design.svg)](https://agentmods.dev/skills/vaquarkhan/fullstack-development-agent-skills/domain-driven-design)
Your own site
<a href="https://agentmods.dev/skills/vaquarkhan/fullstack-development-agent-skills/domain-driven-design"><img src="https://agentmods.dev/badge/skills/vaquarkhan/fullstack-development-agent-skills/domain-driven-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,833 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00038 $0.01833
Opus 5 $0.00019 $0.00916
Sonnet 5 $0.00008 $0.00367
Haiku 4.5 $0.00004 $0.00183

Measured 5d ago against content hash 95c1c8058742, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

domain-driven-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 5d 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.

skill-packs/java/spring-boot/domain-driven-design/SKILL.md · 239 lines

How it starts

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

Domain Driven Design

Use When

  • Modeling aggregates, value objects, and domain events in Spring Boot
  • Spring Boot code generation or refactor where agent defaults would be wrong

Workflow

  1. Confirm the change matches this skill's domain triggers before coding.
  2. Follow the domain guide conventions and gotchas below — not generic Spring Boot defaults.
  3. Apply project-specific response envelopes, DTO boundaries, and dependency injection rules.
  4. Validate with targeted tests (slice, integration, or contract as appropriate).
  5. Capture evidence before merge: tests, migration notes, or observability proof.

Required Checks

  • Constructor injection used; no @Autowired field injection on new code
  • Controllers return DTOs/envelopes — never raw JPA entities
  • Business logic stays in @Service layer, not controllers or repositories
  • Error handling uses project-standard envelope or RFC 9457 ProblemDetail

Domain Guide

Aggregate Rules

  • One repository per aggregate root
  • External code only accesses aggregate through root — never child entities directly
  • Aggregates reference other aggregates by ID only, not direct object reference
  • Keep aggregates small — if it has more than 3-4 child entities, split it
// ✅ Aggregate root controls all access to children
order.addItem(productId, quantity); // through root
order.removeItem(itemId);           // through root

// ❌ Direct child access from outside
order.getItems().add(new OrderItem(...)); // bypasses invariants

Value Objects

Immutable, no identity, equality by value:

public record Money(BigDecimal amount, Currency currency) {
    public Money {
        if (amount.compareTo(BigDecimal.ZERO) < 0)
            throw new IllegalArgumentException("Amount cannot be negative");
        Objects.requireNonNull(currency);
    }

    public Money add(Money other) {
        if (!currency.equals(other.currency))
            throw new CurrencyMismatchException(currency, other.currency);
        return new Money(amount.add(other.amount), currency);
    }

    public static Money of(String amount, String currency) {
        return new Money(new BigDecimal(amount), Currency.getInstance(currency));
    }
}

public record EmailAddress(String value) {
    public EmailAddress {
        if (!value.matches("^[\\w.-]+@[\\w.-]+\\.[a-z]{2,}$"))
            throw new InvalidEmailException(value);
    }
}

Read the full file on GitHub · 239 lines

Files

What ships with it

4 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. 5d ago First seen · 239 lines · 38 tokens per session scan A 95c1c8058742

Subscribe to this mod's changes

domain-driven-design is a skill published in the GitHub repository vaquarkhan/Fullstack-development-agent-skills (2 stars, last pushed 21d ago), licensed MIT. It adds 38 tokens to every session and 1,833 once invoked, about $0.0002 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

review-pending-pr-reviews

Review, grill, edit, and post pending PR review drafts saved by /review-pr (or its batch/cron runners). Lists drafts that have not yet been posted, walks the maintainer through each finding, then posts, closes, or discards. Use when the user says "post my pending reviews", "what reviews are waiting", "go through the…

nrwl/nx · 93 tokens

nx-generate

Generate code using nx generators. INVOKE IMMEDIATELY when user mentions scaffolding, setup, structure, creating apps/libs, or setting up project structure. Trigger words - scaffold, setup, create a new app, create a new lib, project structure, generate, add a new project. ALWAYS use this BEFORE calling nxdocs or…

nrwl/nx · 80 tokens

cabloy-worktree-environment

This skill must be used only when the user explicitly invokes /cabloy-worktree-environment or explicitly asks to perform the named Cabloy worktree-environment setup. It prepares a confirmation-gated, worktree-local Vona and Zova runtime environment for a linked Cabloy Basic or Cabloy Start Git worktree using Git…

cabloy/cabloy · 126 tokens

video-production

Produce programmable videos with Remotion using scene planning, asset orchestration, and validation gates for automated, brand-consistent video content.

Marve10s/Better-Fullstack · 29 tokens

nx-import

Import, merge, or combine repositories into an Nx workspace using nx import. USE WHEN the user asks to adopt Nx across repos, move projects into a monorepo, or bring code/history from another repository.

nrwl/nx · 45 tokens

migrate

Migrate a component or directive to Angular 22+ signal-based patterns.

SAP/fundamental-ngx · 17 tokens