From onion-lasagna-kit
Use when modeling Onion Lasagna domain entities, aggregate roots, value objects, domain events, invariants, or domain tests
How this skill is triggered — by the user, by Claude, or both
Slash command
/onion-lasagna-kit:onion-lasagna-domainThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Model domain code as pure business behavior: value objects validate facts, entities carry identity,
Model domain code as pure business behavior: value objects validate facts, entities carry identity, aggregate roots enforce consistency, and domain events record meaningful past occurrences.
Inspect actual implementations before writing code:
rg -n "class .* extends Base(AggregateRoot|Entity|ValueObject|DomainEvent)" packages/onion-lasagna/src starters -g '*.ts'
rg -n "InvariantViolationError|pullDomainEvents|peekDomainEvents|reconstitute|static create" packages/onion-lasagna/src starters -g '*.ts'
Read the matching base class and tests before copying a constructor shape. Use starter files for folder and naming conventions unless they contain complete implementations.
BaseValueObject<T>: immutable, compared by value, self-validating in create().BaseEntity<TId, TProps>: identity-based object with mutable state and versioning.BaseAggregateRoot<TId, TProps>: consistency boundary that raises domain events.BaseDomainEvent<TPayload>: immutable past-tense event raised by an aggregate.static create() for new objects.static reconstitute() for loading existing state without emitting creation events.InvariantViolationError for business rule violations.BaseDomainEvent examples/tests.console.log.create() sets initial state and emits the relevant events.reconstitute() restores state and does not emit creation events.peekDomainEvents() and cleared with pullDomainEvents() when relevant.npx claudepluginhub cosmneo/onion-lasagna --plugin onion-lasagna-kitCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.