Provides Event-Driven Architecture (EDA) patterns for Spring Boot — creates domain events, configures ApplicationEvent and @TransactionalEventListener, sets up Kafka producers and consumers, and implements the transactional outbox pattern for reliable distributed messaging.
SkillScore77Maintained
Automatic
◆Coding pack
Last verified 8/21/2026
What it changes
Passed 17 of 22 test cases with the skill, and 15 of 22 without it.
Without skill68%
With skill77%
Checks it passed that the model alone missed
The base DomainEvent class defines a correlationId field
The test asserts that the publishedAt field is non-null after background execution
The outbox entity includes fields for aggregateId, eventType, payload, and publishedAt
3 fixed14 passed either way4 still failing1 broke
Pass-rate lift
+9 pp
Tokens
+63%
Agent turns
0%
Response time
-18%
Model gemini-3.6-flashMeasured 8/21/2026v117 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 3
Prompt
To prevent event loss when publishing events to Kafka during database transactions, we are implementing the Transactional Outbox pattern in Spring Boot. What entity attributes should be defined on the outbox table entity to track event state and publishing status?
What was checked, without and with the skill
Checked
Without skill
With skill
The outbox entity includes fields for aggregateId, eventType, payload, and publishedAt
Missed
Passed
case-11 · gemini-3.6-flash · 8/21/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md226 lines11 files
Spring Boot Event-Driven Patterns
Overview
Implement Event-Driven Architecture (EDA) patterns in Spring Boot 3.x using domain events, ApplicationEventPublisher, @TransactionalEventListener, and distributed messaging with Kafka and Spring Cloud Stream.
When to Use
Implementing event-driven microservices with Kafka messaging
Publishing domain events from aggregate roots in DDD architectures
Setting up transactional event listeners that fire after database commits
Adding async messaging with producers and consumers via Spring Kafka
Ensuring reliable event delivery using the transactional outbox pattern
Replacing synchronous calls with event-based communication between services
Quick Reference
Concept
Description
Domain Events
Immutable events extending DomainEvent base class with eventId, occurredAt, correlationId
Event Publishing
ApplicationEventPublisher.publishEvent() for local, KafkaTemplate for distributed
Event Listening
@TransactionalEventListener(phase = AFTER_COMMIT) for reliable handling
Kafka
@KafkaListener(topics = "...") for distributed event consumption
Spring Cloud Stream
Functional programming model with Consumer beans
Outbox Pattern
Atomic event storage with business data, scheduled publisher
Examples
Monolithic to Event-Driven Refactoring
Before (Anti-Pattern):
@Transactional
public Order processOrder(OrderRequest request) {
Order order = orderRepository.save(request);
inventoryService.reserve(order.getItems()); // Blocking
paymentService.charge(order.getPayment()); // Blocking
emailService.sendConfirmation(order); // Blocking
return order;
}
Provides REST API design standards and best practices for Spring Boot projects. Use when creating or reviewing REST endpoints, DTOs, error handling, pagination, security headers, HATEOAS and architecture patterns.