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.
npx skills add sethdford/claude-skills --skill event-sourcinggit clone --depth 1 https://github.com/sethdford/claude-skillsWrote 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.
[](https://agentmods.dev/skills/sethdford/claude-skills/event-sourcing)<a href="https://agentmods.dev/skills/sethdford/claude-skills/event-sourcing"><img src="https://agentmods.dev/badge/skills/sethdford/claude-skills/event-sourcing/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.
<a href="https://agentmods.dev/skills/sethdford/claude-skills/event-sourcing"><img src="https://agentmods.dev/badge/skills/sethdford/claude-skills/event-sourcing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00040 | $0.00587 |
| Opus 5 | $0.00020 | $0.00293 |
| Sonnet 5 | $0.00008 | $0.00117 |
| Haiku 4.5 | $0.00004 | $0.00059 |
Grade A, and why
event-sourcing 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 11d 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.
How it starts
The opening of the file, as written. The whole thing — 48 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Event Sourcing
Build auditable systems by storing complete history of state changes as immutable events rather than current values.
Context
You are designing a system requiring auditability, temporal analysis, or replay capability. Event sourcing provides complete history and enables powerful event-driven architectures. Read domain requirements and existing event-driven patterns.
Domain Context
Based on Greg Young's event sourcing work and CQRS patterns:
- Event Store: Append-only log of domain events; immutable, ordered
- Aggregate Reconstruction: Replay events to reconstruct current state on-demand
- Snapshots: Optimize replay by storing intermediate state; trade storage for speed
- Event Versioning: Events evolve; handle schema changes in replays
- Projections: Materialize different views from event stream (CQRS read models)
Instructions
-
Identify Core Events: What state changes matter? Order placed, payment received, shipment dispatched. Each event is fact about domain; captured in past tense.
-
Design Event Schema: Each event contains timestamp, aggregate ID, type, data. Include enough context to understand intent (who, when, why).
-
Plan Aggregate Boundaries: Group related events into aggregates. Order aggregate: contains all events for single order. Enables consistent snapshots and replay.
-
Implement Snapshot Strategy: Full replay from beginning gets slow. Snapshot order state every 100 events; replay only from last snapshot. Balance storage and speed.
-
Create Read Projections: Maintain materialized views (current-state, analytics) from event stream. These are caches; can be rebuilt from events anytime.
Anti-Patterns
- Event Sourcing Everything: Overkill for simple systems. Event store adds complexity. Guard: Use only when auditability or temporal queries justify cost.
- Storing Mutable Events: Treat events as modifiable records. Result: history changes, audit trail meaningless. Guard: Events are immutable facts; never modify.
- No Event Versioning Strategy: Events change, old replays break. Result: can't handle evolution. Guard: Version events; handle multiple versions in replay logic.
- Ignoring Snapshot Consistency: Snapshots diverge from event stream. Result: data inconsistency. Guard: Snapshots are optimization; rebuild from events periodically to verify.
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.
- 11d ago First seen · 48 lines · 40 tokens per session scan A c54f75e2d808
event-sourcing is a skill published in the GitHub repository sethdford/claude-skills (40 stars, last pushed 6mo ago), licensed MIT. It adds 40 tokens to every session and 587 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-08-30.
Other skills, from other repositories
jpa-patterns
JPA/Hibernate patterns for entity design, relationships, query optimization, transactions, auditing, indexing, pagination, and pooling in Spring Boot.
backend-patterns
Backend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes.
backend-patterns
Backend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes. Use when building or reviewing Node.js, Express, or Next.js API routes and their data access.
cmdb-patterns
Create ServiceNow CIs and cmdbrelci relationships, walk upstream/downstream impact, detect orphan/stale CIs, and align discovered CIs with the proper sysclassname hierarchy.
gliderecord-patterns
Write efficient ServiceNow GlideRecord queries — addQuery vs addEncodedQuery, setLimit, GlideAggregate for counts, avoiding N+1 in loops, query operators, and safe CRUD with workflow control.
search-engine-expert
Expert guide for full-text search engines (Typesense, Meilisearch, Elasticsearch), faceted search, and autocomplete / Panduan ahli mesin pencarian full-text (Typesense, Meilisearch, Elasticsearch), pencarian berfaset, dan autocomplete.