/software-design:j5ik2o-ddd-aggregate-designfrom software-design
Guides DDD aggregate design, implementation, refactoring, and review. Covers aggregate boundaries, roots, invariants, immutable updates, ID references, eventual consistency, and domain events.
Ships in software-design. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
An aggregate is a consistency boundary. Design it around true invariants, not object graphs, database tables, or UI screens.
Name the command and business invariant under discussion.
Decide what must be strongly consistent immediately. Put only that inside one aggregate.
Choose one aggregate root as the only external entry point.
Reference other aggregates by ID and coordinate them with events, policies, sagas, or process managers.
Prefer immutable updates unless the language or framework strongly pushes otherwise.
Review constructors/factories for complete initialization and invariant protection.
Design aggregates around true invariants.
Keep aggregates small.
Update one aggregate per transaction.
Never expose mutable child collections or public fields.
Use domain events for cross-aggregate effects.
Add optimistic locking only when concurrent updates are a real requirement.
Read the matching file in references/ for TypeScript, Scala, Rust, or Python implementation patterns.
For non-trivial implementation, review, or refactoring work, read references/details.md before giving final guidance. It contains the detailed rules, examples, smells, and migration notes that do not belong in the short invocation body.
Return the boundary decision, invariant list, aggregate root API, event list, transaction model, and concrete code or review findings.
What SKILL.md sets; muted values are Claude Code's defaults
29 skills in this plugin
/j5ik2o-breach-encapsulation-namingUse when designing or reviewing domain-model accessors that expose internal state for persistence, serialization, tests, or framework integration. Applies the breachEncapsulationOf naming pattern so unavoidable getters are visibly treated as encapsulation breaches, not casual domain APIs. Trigger for getter naming conventions, persistence-only getters, serialization accessors, Tell Don't Ask pressure, or requests to prevent getter misuse./j5ik2o-clean-architectureUse only when the user explicitly asks for Clean Architecture design, implementation, or review. Applies a domain, use case, interface adapter, and infrastructure layer model, with persistence and RPC adapters outside the domain and use-case rules. Do not trigger for generic architecture advice, hexagonal architecture, onion architecture, or ordinary design review unless Clean Architecture is named./j5ik2o-cqrs-aggregate-modelingUse when CQRS changes aggregate boundaries or state shape. Helps reduce oversized command aggregates by moving read concerns to read models, keeping only command-decision state in aggregates, and using events for state transitions. Trigger for large aggregates, heavy command updates, aggregates containing query-only data, or boundary redesign during CQRS adoption.npx claudepluginhub j5ik2o/ai-tools --plugin software-designOther plugins' skills for the same job