skills/ddd-skills/ddd-event-driven/SKILL.md
Provides comprehensive guidance for event-driven architecture including domain events, event sourcing, CQRS, and event patterns. Use when the user asks about event-driven architecture, needs to implement event-driven systems, or work with domain events.
npx skillsauth add teachingai/full-stack-skills ddd-event-drivenInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill whenever the user wants to:
public record OrderPlacedEvent(
String orderId,
String customerId,
BigDecimal totalAmount,
Instant occurredAt
) implements DomainEvent {}
public class Order extends AggregateRoot {
public void place(List<OrderItem> items) {
// Business logic...
this.status = OrderStatus.PLACED;
registerEvent(new OrderPlacedEvent(this.id, this.customerId, this.total, Instant.now()));
}
}
public class Account {
private BigDecimal balance = BigDecimal.ZERO;
private final List<DomainEvent> changes = new ArrayList<>();
public void apply(MoneyDepositedEvent event) {
this.balance = this.balance.add(event.amount());
}
public static Account reconstitute(List<DomainEvent> events) {
Account account = new Account();
events.forEach(account::apply);
return account;
}
}
Write Side: Read Side:
Command → Aggregate → Events → Event Handler → Read Model (View)
(message bus)
// Save event to outbox table in the same transaction as the aggregate
@Transactional
public void placeOrder(PlaceOrderCommand cmd) {
Order order = Order.place(cmd);
orderRepository.save(order);
outboxRepository.save(new OutboxEntry("OrderPlaced", serialize(order.events())));
}
// A separate poller publishes outbox entries to the message broker
event-driven architecture, domain events, event sourcing, CQRS, outbox pattern, message broker, Kafka, RabbitMQ, eventual consistency, idempotent consumers
tools
Automates browser interactions via CLI using agent-browser by Vercel Labs. Covers navigation, clicking, form filling, snapshots, refs-based selectors, agent mode with JSON output, session management, and CDP integration. Use when the user needs to automate web browsing, scrape pages, fill forms, or integrate browser automation into AI agent workflows.
testing
Creates museum-quality visual art as .png or .pdf by first generating a design philosophy manifesto, then expressing it on canvas with precise composition, color palettes, and typography. Use when the user asks to create a poster, art piece, visual design, or static creative piece. Outputs original designs using design-forward principles.
development
Applies Anthropic brand colors (dark #141413, orange #d97757, blue #6a9bcc, green #788c5d), Poppins headings, and Lora body text to artifacts such as presentations, documents, or visuals. Use when the user needs Anthropic brand styling, brand color application, corporate typography, or visual formatting following Anthropic design standards.
development
Creates gallery-quality algorithmic art using p5.js with seeded randomness, interactive parameter controls, and seed navigation, outputting a single self-contained HTML artifact with Anthropic branding. Use when the user requests generative art, algorithmic art, flow fields, particle systems, or code-based visual art using p5.js.