principle-event-driven

Guide event-driven architecture design for asynchronous delivery, duplicate events, and schema evolution.

2|8|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/lugassawan/swe-workbench --skill principle-event-driven
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: principle-event-driven
Source: https://github.com/lugassawan/swe-workbench/tree/main/skills/principle-event-driven
Command: npx skills add https://github.com/lugassawan/swe-workbench --skill principle-event-driven

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Event-driven architecture principles prevent distributed systems from failing silently when events are delivered asynchronously, duplicated, or evolve over time.

Core Features & Use Cases

  • Event Sourcing discipline: model state changes as an append-only immutable event log and rebuild state via replayable projections, using snapshots to control replay cost.
  • CQRS separation: split command-side writes from query-side reads to enable denormalized, query-optimized projections while treating consistency lag as a contract.
  • Safe saga workflows: choose choreography vs orchestration and implement idempotent compensation steps for long-running distributed transactions.
  • Reliable consumer processing: design partitioning for ordering guarantees, implement idempotent handlers to survive at-least-once delivery, and use the outbox pattern to avoid dual-write failures.
  • Operational resilience: configure dead letter queues (DLQs), emit structured alerts, and plan replay SLAs for poison messages.
  • Event schema evolution: enforce backward compatibility rules and require versioned event types with dual-publish periods for breaking changes.

Quick Start

When designing an event-driven system, ask your AI to review your proposed topics, partition key strategy, consumer group design, idempotency approach, outbox/DLQ plan, and schema evolution strategy for correctness and operational safety.

Frequently Asked Questions about principle-event-driven

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

FAQPage Schema
How do I prevent duplicate events from corrupting state in an event-driven architecture?

Prevent duplicate events by implementing idempotent handlers with stable deduplication keys. This ensures your event-driven architecture safely survives at-least-once delivery without applying state changes multiple times.

What is the best way to handle poison messages in event-driven consumer processing?

Handle poison messages by configuring dead letter queues (DLQs) and emitting structured alerts. This operational resilience strategy isolates unprocessable events while you plan replay SLAs.

How does event sourcing work with CQRS projections to optimize reads?

Event sourcing models state changes as an append-only log, while CQRS separation splits writes from query-optimized projections. Rebuild state via replayable projections and use snapshots to control replay cost.

When should I use saga choreography vs orchestration for distributed transactions?

Choose saga choreography vs orchestration based on your workflow complexity, and implement idempotent compensation steps. This ensures safe rollback for long-running distributed transactions if failures occur.

How do I manage event schema evolution without breaking consumers?

Manage event schema evolution by enforcing backward compatibility rules and requiring versioned event types. Use dual-publish periods during breaking changes so consumers can migrate independently.