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 G1Joshi/Agent-Skills --skill event-sourcinggit clone --depth 1 https://github.com/G1Joshi/Agent-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/g1joshi/agent-skills/event-sourcing)<a href="https://agentmods.dev/skills/g1joshi/agent-skills/event-sourcing"><img src="https://agentmods.dev/badge/skills/g1joshi/agent-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/g1joshi/agent-skills/event-sourcing"><img src="https://agentmods.dev/badge/skills/g1joshi/agent-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.00015 | $0.00531 |
| Opus 5 | $0.00008 | $0.00266 |
| Sonnet 5 | $0.00003 | $0.00106 |
| Haiku 4.5 | $0.00002 | $0.00053 |
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 10d 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 — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Event Sourcing
Event Sourcing ensures that all changes to application state are stored as a sequence of events. We don't just store the current state; we store "what happened".
When to Use
- Audit Logs: When you need to know exactly how you got to the current state (Banking, Legal).
- Temporal Queries: "What did the system look like last Tuesday?".
- Intent Capture: distinguishing between "Correction" vs "Update".
Quick Start (Conceptual)
Traditional (State Stored):
Order { id: 1, status: 'Shipped' } -> Update to 'Delivered' -> Order { id: 1, status: 'Delivered' } (History lost)
Event Sourcing (Events Stored):
OrderCreated(id=1)PaymentReceived(id=1)OrderShipped(id=1)OrderDelivered(id=1)
To get current state: Replay (1) + (2) + (3) + (4).
Core Concepts
Event Store
A database optimized for appending immutable events (e.g., EventStoreDB).
Snapshots
To avoid replay performance issues for long histories (10,000 events), save a "Snapshot" every 100 events. Replay = Snapshot + subsequent events.
Projections
Code that listens to events and builds a read-optimized view (The "R" in CQRS).
Best Practices
Do:
- Keep Events Immutable. You can never change the past. To fix an error, append a "CorrectionEvent".
- Version your Events carefully (Upcasting) to handle schema changes over years.
Don't:
- Don't put logic in the Event Store. It's just a log.
- Don't query the Event Stream for complex searches (Use a Projection/Read Model).
Troubleshooting
| Error | Cause | Solution |
|---|---|---|
Slow Replay |
Too many events for an aggregate. | Implement Snapshots or check Aggregate boundaries. |
Schema Evolution |
Old events don't match new code. | Implement "Upcasters" to transform old events on the fly. |
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.
- 10d ago First seen · 67 lines · 15 tokens per session scan A 26808294b0a8
event-sourcing is a skill published in the GitHub repository G1Joshi/Agent-Skills (12 stars, last pushed 7mo ago), licensed MIT. It adds 15 tokens to every session and 531 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-08-30.
Other skills, from other repositories
deprecation-and-migration
Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset…
backup-restore
PostgreSQL backup and restore with pgBackRest — full/incremental/WAL, PITR, K8s CronJob scheduling, and restore verification.
db-performance
PostgreSQL query performance — EXPLAIN ANALYZE, index design, pgstatstatements, slow query detection, connection pool tuning.
redis-operations
Redis operational runbooks — memory management, eviction policy, persistence config, Sentinel/Cluster, K8s-hosted Redis ops.
database-modeling
Design relational schemas, write efficient queries, plan indexes, and implement safe migrations.
migration-safety
Safe database migrations in production — expand-and-contract, lock-safe DDL, timing estimation, rollback SQL.