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 garrettw/php-arch-skills --skill event-sourcinggit clone --depth 1 https://github.com/garrettw/php-arch-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/garrettw/php-arch-skills/event-sourcing)<a href="https://agentmods.dev/skills/garrettw/php-arch-skills/event-sourcing"><img src="https://agentmods.dev/badge/skills/garrettw/php-arch-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/garrettw/php-arch-skills/event-sourcing"><img src="https://agentmods.dev/badge/skills/garrettw/php-arch-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.00086 | $0.02639 |
| Opus 5 | $0.00043 | $0.01319 |
| Sonnet 5 | $0.00017 | $0.00528 |
| Haiku 4.5 | $0.00009 | $0.00264 |
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 9d 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 — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Event Sourcing for PHP Applications
Event Sourcing is a state-management pattern where every change to application state is captured as an immutable sequence of events. The event log is the single source of truth; current state is derived by replaying events.
Event Sourcing is not: event-driven development, microservices, CQRS, or eventual consistency. Those are related but separate concerns that may coexist with Event Sourcing.
Event Sourcing naturally enables CQRS because the write model is the event stream and projections are the read models. But CQRS is optional.
When to Use Event Sourcing (and When NOT to)
Event Sourcing adds significant complexity. Use it only when you need its specific capabilities.
| Use Event Sourcing For | Use CRUD / Domain Events For |
|---|---|
| Audit requirements (complete history of every change) | Simple audit logs or domain events |
| Temporal queries (state at any point in time) | Current-state-only queries |
| Event replay for debugging or parallel testing | Standard integration tests |
| Retrocactive corrections (fix past events and replay) | Direct data corrections |
| Parallel models / multiple read projections from one stream | Single read model |
| High scalability with event-driven architecture | Standard request/response |
Start without Event Sourcing. Introduce it only when you have a concrete need for audit trails, temporal queries, or replay. Most systems do not need it.
Core Concepts
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 9d ago First seen · 148 lines · 86 tokens per session scan A fa305501ec85
event-sourcing is a skill published in the GitHub repository garrettw/php-arch-skills (12 stars, last pushed 1mo ago), licensed MPL-2.0. It adds 86 tokens to every session and 2,639 once invoked, about $0.0004 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-31.
Other skills, from other repositories
laravel
Laravel mastery skill. Eloquent ORM, service container, queues, events, Sanctum/Passport auth, Pest testing. Triggers on: /godmode:laravel, "laravel app", "eloquent", "artisan", "blade".
bun-api
Bun runtime API reference for TypeScript scripts. Covers Bun.serve() HTTP/HTTP/2 server with routes and WebSockets, fetch() transport options, Bun.file(), Bun.write(), Bun.$() shell, Bun.spawn(), Bun.Glob, Bun.env, bun:sqlite, Bun.sql() for PostgreSQL/MySQL via DATABASEURL, Bun.s3 for S3-compatible storage, Bun.redis…
bitrix-console-commands
Covers Bitrix CLI tools — php bitrix/bitrix.php, generators make:module/make:controller/make:tablet/make:entity/make:service/make:event/make:eventhandler/make:message/make:messagehandler/make:component/make:request, kernel commands (orm:annotate, messenger:consume, translate:index, update:, dev:locator-codes…
bitrix-http-client
Covers Bitrix\Main\Web\HttpClient HTTP client — legacy mode and PSR-18 (sendRequest), async Promise, proxies/timeouts, httpclientoptions, main.HttpClient logger, SSRF, redirects, and GeoIp\Manager lookups. Applied in external API integrations, webhooks, async calls and geolocation. Key terms — HttpClient, PSR-18…
bitrix-request-response
HttpRequest/HttpResponse, Json/AjaxJson/Redirect, Uri, UuidGenerator. Use instead of $GET/$POST and raw headers.
bitrix-components
Bitrix components: class.php, templates, cache, SEF, Controllerable AJAX. Use when building or editing components.