event-driven-design

A set of design rules for software that reacts to events, which are recorded facts about things that happened, such as an order being placed. Different parts of the system respond to those events asynchronously instead of calling one another directly.

In plain words
What is it for?
Use it when separating services, building long-running workflows such as video processing or email delivery, triggering several side effects, or preserving an audit history. It assumes a message broker such as Kafka, RabbitMQ, or EventBridge.
Why use it?
It helps separate services and supports delayed work, multiple follow-up actions, replaying past events, and handling distributed failures.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/kraitdev/skill.md/event-driven-design
Any agent
npx skills add KraitDev/skiLL.Md --skill event-driven-design
Clone the repo
git clone --depth 1 https://github.com/KraitDev/skiLL.Md

Made for: Claude Code, Codex.

Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,605 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00016 $0.01605
Opus 5 $0.00008 $0.00803
Sonnet 5 $0.00003 $0.00321
Haiku 4.5 $0.00002 $0.00161

Measured yesterday against content hash 7403d83098e5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

event-driven-design scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const order = await orderService.fetch(event.orderId); // Blocks on external service
skills/architecture/event-driven-design/SKILL.md · 171 lines

How it starts

The opening of the file, as written. The whole thing — 171 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Event-Driven Design

Purpose

Tightly coupled systems break and scale poorly. Event-driven architectures decouple producers from consumers by using immutable, timestamped facts as the communication mechanism. This enables systems to evolve independently, scale horizontally, and handle distributed failures gracefully.

When to use

  • De-coupling monolithic microservices
  • Implementing long-running asynchronous workflows (e.g., video processing, email sending)
  • Triggering multiple side-effects across different domains from a single action
  • Designing systems that need to replay history or audit changes

When NOT to use

  • Simple synchronous request-response flows (don't add unnecessary complexity)
  • Real-time bidirectional communication (use WebSockets instead)
  • Workflows requiring immediate response to action

Inputs required

  • Microservices or monolithic application with clear domain boundaries
  • Message broker infrastructure (Kafka, RabbitMQ, EventBridge, etc.)
  • Understanding of event sourcing concepts

Workflow

  1. Define Events: Identify state changes in the domain and model them as past-tense events (e.g., OrderPlaced, UserRegistered, PaymentProcessed)
  2. Design Event Payloads: Include Event ID, Timestamp, Event Type, and minimal required data (avoid large nested objects)
  3. Publishing Mechanism: Have the producer system emit the event to a Message Broker without caring who consumes it
  4. Idempotent Consumers: Ensure consumer services can process the same event multiple times without adverse side effects
  5. Handle Failures: Implement Dead Letter Queues (DLQ) for events that consumers repeatedly fail to process
  6. Track Processing: Add idempotency keys or processed event IDs to detect duplicates
  7. Monitor: Set up alerts for DLQ messages and processing delays

Rules

  • MUST model events as immutable facts (past tense: OrderPlaced not PlaceOrder)
  • MUST NEVER modify or delete events once emitted (audit trail requirement)
  • MUST make consumers idempotent (same event processed multiple times = same outcome)
  • MUST avoid deeply nested, rapidly changing entity graphs in payloads
  • MUST include Event ID, Timestamp, Event Type in all events
  • MUST implement Dead Letter Queues for failed events
  • MUST NOT use synchronous HTTP calls as part of event workflows

Read the full file on GitHub · 171 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 171 lines · 16 tokens per session scan A 7403d83098e5

Subscribe to this mod's changes

event-driven-design is a skill published in the GitHub repository KraitDev/skiLL.Md (7 stars, last pushed 2mo ago), licensed MIT. It adds 16 tokens to every session and 1,605 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

code-review-python

Deep Python-specific code review covering type annotations, async pitfalls, mutable defaults, threading safety, and domain modeling. Applied in addition to the generic code-review skill when Python code is detected. Invoked when reviewing Python PRs, Py changes, or performing Python-specific quality checks.

soulcodex/agentic · 59 tokens

evaluate-pattern-adoption

Run or plan this repository's pattern-adoption evidence evaluation locally with signed-in Codex agents. Use when asked to refresh stale evidence, assess stable or exploratory patterns, evaluate one or all catalog patterns, discover possible new patterns, or prepare a reviewable evidence PR without model-backed GitHub…

PaulDuvall/ai-development-patterns · 68 tokens

studio

Architecture Studio control plane — initialize or inspect a studio workspace, create and register projects, or route an architecture/AEC task to the right agent or skill. Use when the user runs /as:studio, asks to set up or open their studio, manage its projects, or describes a task without naming a skill.

AlpacaLabsLLC/skills-for-architects · 65 tokens

epd-to-spec

Write CSI specification language for EPD submittals and sourced GWP limits. Use to add embodied-carbon or EPD requirements to specs; not to parse, find, or compare EPDs.

AlpacaLabsLLC/skills-for-architects · 45 tokens

learn

Guided, hands-on course teaching architects how to use Codex or Claude Code — six short modules, each built around an exercise on a bundled sandbox project (a fictional Brooklyn art museum expansion). Resumable across sessions via PROGRESS.md. Use when the user runs $learn or /as:learn, says they're new to AI-assisted…

AlpacaLabsLLC/skills-for-architects · 80 tokens

occupancy-calculator

Calculate code occupant loads by area with gross/net factors and jurisdiction checks. Use for "how many people can this space hold," IBC Table 1004.5, egress inputs, or occupancy-load reports; not for workplace headcount planning.

AlpacaLabsLLC/skills-for-architects · 55 tokens