/software-design:j5ik2o-cqrs-aggregate-modelingfrom software-design
Refactors CQRS aggregates by separating command state from read models, reducing oversized aggregates and clarifying boundaries.
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.
In CQRS, an aggregate is not a read model. It only needs the state required to decide whether a command is valid and which events to emit.
Identify each command the aggregate handles.
List the state needed to validate and execute those commands.
Remove query-only projections, history lists, counters, denormalized display fields, and report data from the command aggregate.
Put read concerns into read models updated from events.
Redraw aggregate boundaries around true invariants and command contention.
Keep state minimal, invariant-bearing, and command-oriented.
Prefer IDs and event references over embedded external aggregates.
Model lifecycle as explicit state transitions when commands depend on it.
Treat unbounded collections as read-model material unless they enforce a true invariant.
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 command-state matrix, proposed aggregate boundary, events, read models, and migration risks.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
cqrs, aggregate-design, domain-modeling, event-sourcing, command-state
npx claudepluginhub j5ik2o/ai-tools --plugin software-design29 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-to-event-sourcingUse when explaining why CQRS often needs event sourcing or durable events for reliable command-to-query synchronization. Covers calculated value sync, database trigger limits, polling scalability, double commits, and making events the source of truth. Trigger for CQRS synchronization, read-model update strategy, CQRS without ES, or double-commit concerns.Other plugins' skills for the same job