From kotlin-patterns
Apply when creating, refactoring, changing, planning (plan mode) or reviewing any code that implements the transactional outbox pattern. This includes adding, modifying any outbox related files/classes but also when performing dual writes in the code base, specially in application service layer.
How this skill is triggered — by the user, by Claude, or both
Slash command
/kotlin-patterns:applying-outbox-patternThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Guarantee that domain events are published reliably by storing them in an outbox table within the same database transaction as the state change.
Guarantee that domain events are published reliably by storing them in an outbox table within the same database transaction as the state change. A separate process reads the outbox and publishes events to the message broker, ensuring at-least-once delivery and avoiding the dual-write problem.
OutboxRepository
DO:
id, aggregate_id, event_type, payload (JSON), created_at, and published flag in the outbox tableDomainEventPublisher pattern to publish domain eventsDON'T:
created_at ordering per aggregate@Scheduled for the outbox poller@Transactional to read and mark entries@EnableScheduling in a configuration classPlease use always these examples as reference: examples.md
npx claudepluginhub allousas/claude-code-plugins --plugin kotlin-patternsProvides guidance and code for implementing the transactional outbox pattern to reliably publish domain events alongside database writes, preventing dual-write failures.
Provides patterns, antipatterns, and PHP-specific guidelines for transactional outbox, polling publisher, and reliable messaging audits. Useful for event-driven architectures ensuring consistency.
Implements the Transactional Outbox pattern for reliable domain event processing in .NET 8+ apps using Entity Framework Core, Quartz.NET, and MediatR.