event-driven

A set of patterns for applications where components communicate by publishing and receiving events. An event is a record of something that happened, such as an order being placed.

In plain words
What is it for?
Use it to design event notifications, event sourcing, CQRS, message-broker workflows, and consumers that react to events such as payments or inventory changes.
Why use it?
It reduces direct dependencies between components and can preserve an audit trail of changes while supporting asynchronous work.

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/plazmodium/odin-workflow/event-driven
Any agent
npx skills add Plazmodium/odin-workflow --skill event-driven
Clone the repo
git clone --depth 1 https://github.com/Plazmodium/odin-workflow

Made for: Claude Code, Codex.

Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,055 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00020 $0.01055
Opus 5 $0.00010 $0.00528
Sonnet 5 $0.00004 $0.00211
Haiku 4.5 $0.00002 $0.00105

Measured 2d ago against content hash cdd23109217e, 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 scanned grade A with 0 findings 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 2d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/skills/architecture/event-driven/SKILL.md · 146 lines

How it starts

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

Event-Driven Architecture

Overview

Event-driven architecture (EDA) uses events as the primary mechanism for communication between components. Events represent facts — things that have happened — and enable loose coupling, scalability, and auditability.

Patterns

Event Notification

Producer → Event Bus → Consumer(s)

OrderService                    NotificationService
    │                                  │
    ├── publishes ──►  OrderPlaced ──► │ sends email
    │                                  │
InventoryService                PaymentService
    │                                  │
    ├── subscribes ─► OrderPlaced ──►  │ charges card

Event Sourcing

// Store events, not state — rebuild state by replaying events
class OrderEventStore {
  async save(orderId: string, events: DomainEvent[]): Promise<void> {
    for (const event of events) {
      await this.db.insert('events', {
        stream_id: orderId,
        type: event.type,
        data: JSON.stringify(event),
        version: event.version,
        occurred_at: event.occurredAt,
      });
    }
  }

  async load(orderId: string): Promise<DomainEvent[]> {
    return this.db.query(
      'SELECT * FROM events WHERE stream_id = $1 ORDER BY version ASC',
      [orderId]
    );
  }
}

// Rebuild aggregate from events
function rehydrate(events: DomainEvent[]): Order {
  const order = new Order();
  for (const event of events) {
    order.apply(event); // Mutates internal state
  }
  return order;
}

CQRS (Command Query Responsibility Segregation)

Commands (Write)                    Queries (Read)
    │                                   │
    ▼                                   ▼
┌──────────┐   events    ┌──────────────────┐
│ Write DB │ ──────────► │ Read Projections  │
│ (events) │             │ (denormalized)    │
└──────────┘             └──────────────────┘
// Command side — validates and stores events
async function placeOrder(cmd: PlaceOrderCommand): Promise<void> {
  const order = await eventStore.load(cmd.orderId);
  const events = order.place(cmd.items); // Returns new events
  await eventStore.save(cmd.orderId, events);
  await eventBus.publish(events);
}

// Query side — read from optimized projections
async function getOrderSummary(orderId: string): Promise<OrderSummary> {
  return readDb.query('SELECT * FROM order_summaries WHERE id = $1', [orderId]);
}

// Projector — updates read model when events arrive
class OrderProjector {
  async handle(event: OrderPlaced): Promise<void> {
    await readDb.insert('order_summaries', {
      id: event.orderId,
      status: 'placed',
      total: event.total,
      item_count: event.items.length,
    });
  }
}

Read the full file on GitHub · 146 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. 2d ago First seen · 146 lines · 20 tokens per session scan A cdd23109217e

Subscribe to this mod's changes

event-driven is a skill published in the GitHub repository Plazmodium/odin-workflow (0 stars, last pushed 3mo ago), licensed MIT. It adds 20 tokens to every session and 1,055 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.

Related

Other skills, from other repositories

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

meeting-minutes

Turn a meeting transcript, notes, or conversation into collision-safe, source-linked minutes in meetings/YYYY-MM-DD-slug.md. Use for project meeting records, attendance, discussion, stated information, decisions, action candidates, and open questions. Saving minutes never changes PROJECT.md, decisions/, or TASKS.md…

AlpacaLabsLLC/skills-for-architects · 72 tokens

product-data-import

Generate a formatted FF&E specification schedule from notes, CSV, or pasted lists and optionally save it to the project's 33-column CSV library. Use when asked to import products or build a schedule.

AlpacaLabsLLC/skills-for-architects · 43 tokens

product-enrich

Enrich FF&E schedule rows with categories, colors, materials, and style tags. Use to tag, categorize, or fill those missing fields; not to research new products.

AlpacaLabsLLC/skills-for-architects · 39 tokens

product-image-processor

Download, resize, and remove backgrounds from product images at scale. Use when the user asks to "process product images", batch-download images from the schedule, strip backgrounds, or standardize product photos.

AlpacaLabsLLC/skills-for-architects · 45 tokens

product-pair

Suggest complementary products that pair well with a given item — side tables for sofas, task lights for desks, etc. Use when the user asks "what goes with" a product, wants coordinating pieces, or asks to complete a furniture grouping.

AlpacaLabsLLC/skills-for-architects · 52 tokens