domain-events

Design immutable domain events with Outbox Pattern delivery for distributed services.

5|1|Updated Jun 17, 2026
One-click install
npx skills add https://github.com/roanbrasil/engineer-grade-agent-skills --skill domain-events-roanbrasil
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: domain-events
Source: https://github.com/roanbrasil/engineer-grade-agent-skills/tree/main/skills/domain-events
Command: npx skills add https://github.com/roanbrasil/engineer-grade-agent-skills --skill domain-events-roanbrasil

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the pain of tightly coupled microservices and aggregates that are difficult to maintain and scale, plus unreliable cross-service event delivery that causes data inconsistency and system failures.

Core Features & Use Cases

  • Immutable Event Design: Create past-tense, self-contained domain events with unique IDs, timestamps, and versioning for reliable tracking and evolution.
  • Reliable Event Dispatch: Implement synchronous intra-process dispatch for same-context operations and the Outbox Pattern for guaranteed cross-service event delivery via message brokers like Kafka.
  • Event Lifecycle Management: Handle event versioning, idempotent consumer patterns, and integration with Event Sourcing and Domain-Driven Design principles.
  • Use Case: For an e-commerce platform, use this Skill to decouple order processing from shipping and billing services by raising OrderConfirmed events that trigger downstream workflows without direct service coupling.

Quick Start

Use the domain-events skill to design the event structure and Outbox Pattern implementation for your order processing service to reliably notify shipping and billing systems when an order is confirmed.

Frequently Asked Questions about domain-events

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decouple microservices using domain events?

You decouple microservices using domain events by designing immutable, past-tense events that trigger downstream workflows without direct service coupling, implementing synchronous intra-process dispatch for same-context operations and the Outbox Pattern for cross-service delivery.

What is the Outbox Pattern and how does it ensure reliable event delivery?

The Outbox Pattern ensures reliable event delivery by storing domain events in a database outbox table before publishing them to a message broker like Kafka, guaranteeing that event propagation remains consistent even if the broker temporarily fails.

How do I handle event versioning without breaking consumers in event-driven architecture?

You handle event versioning without breaking consumers by embedding versioning metadata within immutable domain events, allowing schema evolution to proceed safely while maintaining alignment with Event Sourcing and Domain-Driven Design principles.

Do I need idempotent consumers for cross-service domain event processing?

Yes, you need idempotent consumers for cross-service domain event processing to prevent duplicate side effects when message brokers redeliver events, ensuring reliable and consistent state changes across distributed services like e-commerce and banking systems.

How do I implement Event Sourcing with domain-driven design principles?

You implement Event Sourcing with Domain-Driven Design principles by creating self-contained domain events with unique IDs and timestamps that decouple aggregates within bounded contexts, capturing all state changes as a sequence of immutable events.

When should I use synchronous intra-process dispatch versus cross-service event delivery?

Use synchronous intra-process dispatch for same-context operations requiring immediate consistency within a bounded context, and use cross-service event delivery via the Outbox Pattern when integrating distributed services that require eventual consistency.