From software-engineering
Domain-Driven Design principles: ubiquitous language, entities, value objects, aggregates, and domain services. Apply when designing or modelling a domain.
How this skill is triggered — by the user, by Claude, or both
Slash command
/software-engineering:dddThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The domain model is the heart of the software. All design decisions should reflect and reinforce the business domain.
The domain model is the heart of the software. All design decisions should reflect and reinforce the business domain.
Apply this skill when:
Use domain terms everywhere — code, tests, conversations. If a domain expert would say "an invoice is approved", the code is invoice.Approve() — not invoice.SetStatus(Status.Approved).
// Good — speaks the domain
order.PlaceWith(supplier);
shipment.Dispatch();
payment.Authorise();
// Bad — technical noise
order.SetStatusToPlaced();
shipmentService.UpdateDispatchFlag(id, true);
If you find yourself writing comments to explain what code means, the names are wrong.
Define explicit boundaries within which one model and one language apply. The same word can mean different things in different contexts — that is correct. Contexts communicate via interfaces, never by sharing internal models.
An aggregate is a cluster of objects treated as one unit for data changes. Every aggregate has a single root — the only entry point for the outside world.
// Correct — through the root
var order = await _orderRepository.GetById(orderId);
order.AddLineItem(product, quantity);
await _orderRepository.Save(order);
// Wrong — bypassing the root
var lineItem = await _lineItemRepository.GetById(lineItemId); // ❌
lineItem.Quantity = 5; // ❌
Entities have identity — two entities with the same data are not the same thing.
Value objects are defined entirely by their attributes — immutable, interchangeable. Prefer value objects where possible.
// Value object — immutable, defined by values
public record Money(decimal Amount, string Currency);
public record Address(string Line1, string City, string PostCode);
Use when an operation spans multiple aggregates. Stateless. No persistence, no HTTP. Lives in the domain layer. Use sparingly.
public class TransferService
{
public void Transfer(Account source, Account destination, Money amount)
{
source.Debit(amount);
destination.Credit(amount);
}
}
Past-tense facts raised by the aggregate root. Immutable value objects. Dispatched after save. The aggregate does not know who handles them.
public record OrderPlaced(string OrderId, string CustomerId, DateTimeOffset PlacedAt);
The domain defines what it needs via interfaces. It has no dependencies on infrastructure.
Domain — defines IOrderRepository, IPaymentGateway
Storage — implements IOrderRepository
External — implements IPaymentGateway
Api — wires via DI
If the domain references a NuGet package outside the .NET standard library, a dependency has leaked inward.
npx claudepluginhub de-anchorite/claude-skills --plugin software-engineeringProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.