nw-ddd-eventsourcing

nw-ddd-eventsourcing is a skill for Claude Code from nWave-ai/nWave. It costs 38 tokens per session (1,734 once invoked), scanned A, original, MIT.

A guide to Event Sourcing and CQRS, two ways to organize application data. Event Sourcing records every state change as an unchangeable event, while CQRS separates models used to change data from models used to read it.

In plain words
What is it for?
Use it to evaluate event-based data models, design event streams and projections, plan snapshots and sagas, and handle event version changes or conflicts.
Why use it?
It helps teams decide when an audit history, past-state queries, multiple read views, or event-based integrations justify added complexity. It also explains when ordinary CRUD data storage is simpler.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Good fit Use it to evaluate event-based data models, design event streams and projections, plan snapshots and sagas, and handle event version changes or conflicts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nwave-ai/nwave/nw-ddd-eventsourcing
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.

Any agent
npx skills add nWave-ai/nWave --skill nw-ddd-eventsourcing
Clone the repo
git clone --depth 1 https://github.com/nWave-ai/nWave

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nw-ddd-eventsourcing

README.md
[![agentmods](https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-ddd-eventsourcing/github.svg)](https://agentmods.dev/skills/nwave-ai/nwave/nw-ddd-eventsourcing)
Your own site
<a href="https://agentmods.dev/skills/nwave-ai/nwave/nw-ddd-eventsourcing"><img src="https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-ddd-eventsourcing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nw-ddd-eventsourcing

Your own site · 80×15
<a href="https://agentmods.dev/skills/nwave-ai/nwave/nw-ddd-eventsourcing"><img src="https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-ddd-eventsourcing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,734 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00038 $0.01734
Opus 5 $0.00019 $0.00867
Sonnet 5 $0.00008 $0.00347
Haiku 4.5 $0.00004 $0.00173

Measured 7d ago against content hash def99ce43e04, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

nw-ddd-eventsourcing 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 7d 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.

nWave/skills/nw-ddd-eventsourcing/SKILL.md · 152 lines

How it starts

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

Event Sourcing and CQRS

Implementation patterns for DDD. Event Sourcing stores every state change as an immutable event and derives current state from replay. CQRS separates write and read models. These are tools, not mandatory architecture -- apply selectively to domains where they add value.

When to Use Event Sourcing

ES adds value when:

  • Complete audit trail required (financial, regulatory, medical)
  • Temporal queries needed ("what was the state on January 15?")
  • Multiple views of same data (different read models for different consumers)
  • Complex domain with rich business rules (natural fit with DDD aggregates)
  • Event-driven integration with other systems
  • Debugging requires replay ("what exactly happened?")

ES is overkill when:

  • Simple CRUD with no audit requirements
  • Team unfamiliar and project has no learning budget
  • No business value from history
  • Domain has no behavior (data in, data out)

Key question: "Does knowing the history of how we got here provide business value?" Yes -> consider ES. No -> traditional CRUD is simpler.

Core Concepts

Events as Facts

Events are immutable records of things that happened. Past tense: OrderPlaced, PaymentReceived, ItemShipped.

Event structure: Include all data needed to understand what happened (self-contained) | Use domain language | One event per meaningful business fact | Events carry data only, no behavior

Granularity: Too coarse (OrderUpdated { order: {...} }) loses what changed. Too fine (OrderFieldChanged { field, old, new }) is generic audit log. Just right (OrderConfirmed { orderId, confirmedBy, confirmedAt }) has clear business meaning.

The Event Store

Single source of truth. Core operations:

  • append(streamId, expectedVersion, events) -> success or concurrency conflict
  • read(streamId) -> ordered list of events
  • subscribe(filter) -> push notification for new events

Properties: Append-only (never modify/delete) | Ordered within stream | Immutable | Versioned (each event has position)

Read the full file on GitHub · 152 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. 7d ago First seen · 152 lines · 38 tokens per session scan A def99ce43e04

Subscribe to this mod's changes

nw-ddd-eventsourcing is a skill published in the GitHub repository nWave-ai/nWave (610 stars, last pushed 5d ago), licensed MIT. It adds 38 tokens to every session and 1,734 once invoked, about $0.0002 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-03.

Related

Other skills, from other repositories

event-store-design

Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.

wshobson/agents · 33 tokens

cqrs-implementation

Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.

wshobson/agents · 35 tokens

add-entity

Scaffold a new domain entity or aggregate in this Vertical Slice Architecture template — the entity itself, its strongly typed ID, errors, specification, EF Core configuration, DbSet, the mandatory Vogen registration, and the migration. Use when the user says "add an entity", "add an aggregate", "create a domain…

SSWConsulting/SSW.VerticalSliceArchitecture · 116 tokens

firebase

Use when building on Firebase — Firestore data modeling, Security Rules, Auth and custom claims, Cloud Functions, Storage, modular Web/Admin SDK imports — including symptoms like a database open to the internet, a query rejected by rules, or a doc stuck at 1 write/sec. NOT managed-Postgres BaaS with SQL and RLS (that…

ericrisco/rsc-harness · 77 tokens

notion-connector

Use when wiring server code or a cron job to Notion as an ops backend over its HTTP API: pushing or mirroring database rows, two-way sync without duplicates, page blocks, or an integration broken by the 2025-09-03 data-source split. NOT generic REST wiring (that is api-connector-builder), NOT inbound Notion webhook…

ericrisco/rsc-harness · 86 tokens

software-baas-platforms

Chooses managed backend platforms such as Supabase, Convex, and Firebase. Use when comparing database, auth, realtime, and backend-service tradeoffs.

vasilyu1983/AI-Agents-public · 37 tokens