laravel-spatie-event-sourcing

laravel-spatie-event-sourcing is a skill for Claude Code from albertoarena/claude-laravel-event-sourcing. It costs 150 tokens per session (1,560 once invoked), scanned A, original, MIT.

A guide for building Laravel applications with event sourcing using Spatie’s event-sourcing package. Event sourcing records changes as events so an application can reconstruct an entity’s history.

In plain words
What is it for?
Use it when setting up or debugging Spatie event sourcing, designing aggregates and events, creating projectors or reactors, and generating tested domain code.
Why use it?
It gives you a structured design-and-test process for event-sourced Laravel features and helps avoid unclear event, aggregate, and projection designs.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the laravel-spatie-event-sourcing plugin — 1 skill shipped together

Good fit Use it when setting up or debugging Spatie event sourcing, designing aggregates and events, creating projectors or reactors, and generating tested domain code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/albertoarena/claude-laravel-event-sourcing/laravel-spatie-event-sourcing
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 albertoarena/claude-laravel-event-sourcing --skill laravel-spatie-event-sourcing
Clone the repo
git clone --depth 1 https://github.com/albertoarena/claude-laravel-event-sourcing

Made for: Claude Code.

Or install laravel-spatie-event-sourcing, the plugin that ships this one along with the rest of its 1 skill.

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 laravel-spatie-event-sourcing

README.md
[![agentmods](https://agentmods.dev/badge/skills/albertoarena/claude-laravel-event-sourcing/laravel-spatie-event-sourcing/github.svg)](https://agentmods.dev/skills/albertoarena/claude-laravel-event-sourcing/laravel-spatie-event-sourcing)
Your own site
<a href="https://agentmods.dev/skills/albertoarena/claude-laravel-event-sourcing/laravel-spatie-event-sourcing"><img src="https://agentmods.dev/badge/skills/albertoarena/claude-laravel-event-sourcing/laravel-spatie-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.

agentmods 80×15 button for laravel-spatie-event-sourcing

Your own site · 80×15
<a href="https://agentmods.dev/skills/albertoarena/claude-laravel-event-sourcing/laravel-spatie-event-sourcing"><img src="https://agentmods.dev/badge/skills/albertoarena/claude-laravel-event-sourcing/laravel-spatie-event-sourcing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 150 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,560 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.
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.00150 $0.01560
Opus 5 $0.00075 $0.00780
Sonnet 5 $0.00030 $0.00312
Haiku 4.5 $0.00015 $0.00156

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

Security

Grade A, and why

laravel-spatie-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 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/verify-setup.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

plugins/laravel-spatie-event-sourcing/skills/laravel-spatie-event-sourcing/SKILL.md · 138 lines

How it starts

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

Laravel Spatie Event Sourcing — Skill

Generate event-sourced domain code for Laravel using spatie/laravel-event-sourcing, following a two-gate workflow: Design first, then implement with tests.

Quick reference

  • references/design-heuristics.md — Event naming, aggregate boundaries, projector/reactor rules, anti-patterns
  • references/adr-template.md — ADR template for Gate 1
  • references/tdd-patterns.md — Pest and PHPUnit test patterns
  • references/commands-pattern.md — Command + handler patterns (plain and bus-dispatched)
  • references/spatie-api-cheatsheet.md — Key Spatie ES classes and methods
  • assets/templates/*.stub — Code generation stubs

Project bootstrap (one-time, automatic)

On first invocation in a project, run scripts/verify-setup.sh from this skill's directory. It checks:

  1. PHP 8.2+ is installed (required by spatie/laravel-event-sourcing v7)
  2. spatie/laravel-event-sourcing is in composer.json
  3. The stored_events and snapshots tables exist (migrations have run)
  4. config/event-sourcing.php has been published
  5. A test framework is installed (Pest preferred, PHPUnit fallback)

If anything is missing, print the single command that fixes it and stop. Do not auto-install packages or run migrations on behalf of the user — they need to confirm first.

If everything passes, check for .claude/event-sourcing.md in the project root. If it doesn't exist, ask the user one configuration question:

"I'll create a project config at .claude/event-sourcing.md. Two quick choices:

  1. Command dispatch style: plain handler classes invoked directly, or Laravel's command bus (Bus::dispatch)?
  2. Test framework: Pest or PHPUnit?"

Write their answers to that file. On future invocations, read it silently and proceed.


The two-gate workflow

This skill operates in two gates with a hard stop between them. The user must approve the design before any code gets written.

Gate 1 — Design (ADR)

Start with domain analysis. Ask 3–5 focused questions (skip any the user already answered):

Read the full file on GitHub · 138 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. 12d ago First seen · 138 lines · 150 tokens per session scan A 5ccbb1a643c4

Subscribe to this mod's changes

laravel-spatie-event-sourcing is a skill published in the GitHub repository albertoarena/claude-laravel-event-sourcing (6 stars, last pushed 1mo ago), licensed MIT. It adds 150 tokens to every session and 1,560 once invoked, about $0.0007 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.

Related

Other skills, from other repositories

laravel-13-expert

Comprehensive Laravel 13.x expert skill covering the entire framework — installation, configuration, routing, controllers, middleware, Blade views, Eloquent ORM, migrations, queues, jobs, events, mail, notifications, caching, Redis, scheduling, service container, service providers, authentication, authorization, AI…

Deixtra-Private-Limited/claude-laravel-13-skill · 105 tokens

laravel-architecture-review

Review a Laravel codebase's architecture and design, not just its types. Use when asked to audit a Laravel app, find architectural smells, decide where business logic belongs (controller vs Action vs Service), whether a Repository/DDD/TDD layer is justified, or how to apply SOLID/DRY to a Laravel project. Runs the…

majdghithan/agent-skills · 188 tokens

filament-plugin-development

Build and publish custom Filament plugins (Filament is the Laravel admin-panel framework). Use when creating a Filament plugin/package, implementing the Plugin contract, scaffolding from the plugin skeleton, registering assets/resources/pages/render-hooks, making a configurable plugin, testing it, or publishing to…

majdghithan/agent-skills · 105 tokens

laravel-upgrade

Upgrade a Laravel application across major versions safely (Laravel 8 -> 9 -> 10 -> 11 -> 12 -> 13), one hop at a time. Use when upgrading Laravel, when a composer update fails after a major bump, when deciding whether to hop versions by hand or pay for Laravel Shift, or when something compiled fine but broke at…

majdghithan/agent-skills · 174 tokens

solana-rpc

Expert assistant for Solana JSON-RPC — works with any provider: QuickNode, Helius, Triton, Ankr, Chainstack, or public endpoints. Standard JSON-RPC methods are identical across providers; only the URL differs. Use whenever the user wants raw Solana data: fetch transactions by signature, read account state, get block…

Vo1ganin/crypto-claude-skills · 195 tokens

build-me

Implement a solution write-up (typically the markdown file produced by /solve-me) in this Laravel project, following existing project patterns and Laravel best practices. Cuts the work into commits itself, writes the commit plan to docs/build/ .md, and gets the developer's approval before writing any code. Then builds…

Kerliula/ship-me · 173 tokens