/laravel-skill:laravel-asyncfrom laravel-skill
Provides 36 rules for Laravel async patterns: idempotent queued jobs with retries/backoff, domain events for side effects, queue separation, deterministic cache keys with event-driven invalidation, and scheduled tasks that queue rather than block.
Ships in laravel-skill. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Rules for work that happens outside the request: 36 rules across 5 sections.
Two assumptions run through all of them:
| About to write | Read |
|---|---|
| Slow or external work inside a request | job-queue-slow-work, job-retries-and-backoff |
| A job constructor | job-serialize-ids-not-models, job-never-serialize-secrets |
| A handler that may run twice | job-idempotent-handlers |
| Something that must happen after a write | event-emit-for-side-effects, event-dispatch-after-commit |
| A listener that sends mail or calls an API | event-queue-side-effecting-listeners |
| Caching an expensive read | cache-read-heavy-endpoints, cache-stable-key-convention |
| A fix for stale or cross-tenant cached data | cache-invalidate-on-model-events, cache-tags-for-related-data |
| A scheduler entry | schedule-queue-work-not-inline, schedule-prevent-overlapping |
| A fix for duplicate dispatches | job-unique-jobs |
| A job that calls a third-party API | job-rate-limit-external-calls |
| Queue configuration, or a job running twice | job-retry-after-exceeds-timeout |
| A notification or mailable | event-queue-notifications-and-mailables |
| The same lookup read all over one request | cache-memoize-within-the-request |
^12.0 || ^13.0 and PHP ^8.3. If you need something these rules do not name, check the docs — never infer an API from its name.composer.json first; on Laravel 12 use the fallback the rule gives.rules/{slug}.md before adapting it to a case the example does not show.| # | Section | Impact | Prefix |
|---|---|---|---|
| 1 | Jobs | CRITICAL | job- |
| 2 | Domain Events | HIGH | event- |
| 3 | Queue Operations | HIGH | queue- |
| 4 | Caching | HIGH | cache- |
| 5 | Scheduling | MEDIUM | schedule- |
job-idempotent-handlers — Running twice must equal running oncejob-queue-slow-work — Queue anything slow or externally dependentjob-retries-and-backoff — Set tries, backoff and timeout on every jobjob-serialize-ids-not-models — Pass identifiers, not object graphsjob-never-serialize-secrets — A credential never enters a job payloadjob-retry-after-exceeds-timeout — retry_after longer than any job's timeoutjob-rate-limit-external-calls — Throttle jobs that call a third-party APIjob-unique-jobs — Collapse duplicate dispatches with ShouldBeUniquejob-batches-and-chains — Batches for fan-out, chains for ordered stepsjob-handle-failure-explicitly — Decide what happens after the last attemptjob-fail-fast-on-permanent-errors — Stop retrying what cannot succeedevent-emit-for-side-effects — Announce state changes, do not perform effects inlineevent-past-tense-immutable — Events are immutable and past tenseevent-carry-identity-not-models — Events carry identities, not Modelsevent-listeners-own-domain-only — A listener touches only its own domainevent-queue-side-effecting-listeners — Side-effecting listeners are queuedevent-dispatch-after-commit — Dispatch after the transaction commitsevent-queue-notifications-and-mailables — Queue them, and send after commitevent-outbox-for-must-deliver — Commit the intent with the data when loss is unacceptablequeue-separate-by-priority — Separate queues by latency budgetqueue-route-by-class — Route jobs to queues centrally (Laravel 13)queue-never-sync-in-production — sync is for tests onlyqueue-restart-workers-on-deploy — Workers keep old code until restartedqueue-monitor-depth-and-failures — Depth, wait time and failure ratequeue-sqs-visibility-timeout — On SQS the lease lives in AWS, not in configcache-read-heavy-endpoints — Cache in the Repository, cache results not modelscache-stable-key-convention — Deterministic keys including every inputcache-invalidate-on-model-events — Invalidate on write, not on a timercache-tags-for-related-data — Tag related entries to flush a groupcache-lock-against-stampede — One rebuild, not two hundredcache-touch-to-extend-ttl — Sliding expiry without a rewrite (Laravel 13)cache-memoize-within-the-request — Collapse repeat reads inside one requestschedule-queue-work-not-inline — A scheduled task queues workschedule-prevent-overlapping — Stop a slow task stacking copiesschedule-run-on-one-server — Exactly one server per taskschedule-monitor-and-alert — Make silence itself the alert| Feature | Availability |
|---|---|
#[Tries], #[Backoff], #[Timeout], #[FailOnTimeout] on jobs | Laravel 13+ |
Queue::route(JobClass::class, connection:, queue:) | Laravel 13+ |
Cache::touch($key, $ttl) | Laravel 13+ |
Cache::flexible($key, [$fresh, $stale], $callback) | Laravel 11+ |
after_commit on the queue connection | Laravel 8+ |
| Feature | Requires |
|---|---|
ShouldBeUnique, Cache::lock(), withoutOverlapping(), onOneServer() | An atomic cache store — Redis, Memcached, DynamoDB or database. Not file or array. |
Cache::tags() | Redis, Memcached or array. Not file, database or dynamodb. |
Bus::batch() | The job_batches table |
| Failed-job retention | The failed_jobs table |
Cache::memo() | Laravel 12.9+ |
failover cache driver | Laravel 12.35+ |
references/idempotency-patterns.md — the four ways to make a handler repeat-safereferences/cache-invalidation-playbook.md — choosing TTL, tags, versions or eventsreferences/checklist.md — pre-merge self-check for async workLoad in this order and stop when the answer is clear:
rules/job-idempotent-handlers.md
rules/cache-invalidate-on-model-events.md
references/ file only when a rule points at one.AGENTS.md is every rule compiled into one document (~11k tokens), for agents that read the AGENTS.md convention. Do not load it when the individual rule files are reachable.
laravel-engineering — trace callers and effects, preserve failures, and verify the changed pathlaravel-patterns — where events, listeners and their contracts live across domainslaravel-eloquent — transactions, after_commit and bulk writes that skip observerslaravel-rest-api — returning 202 and a pollable resource instead of blockinglaravel-testing — Queue::fake(), Bus::fake(), Event::fake() and testing idempotencyAGENTS.md (opens in a new tab)README.md (opens in a new tab)metadata.json (opens in a new tab)references/cache-invalidation-playbook.md (opens in a new tab)references/checklist.md (opens in a new tab)references/idempotency-patterns.md (opens in a new tab)rules/_sections.md (opens in a new tab)rules/_template.md (opens in a new tab)rules/cache-invalidate-on-model-events.md (opens in a new tab)rules/cache-lock-against-stampede.md (opens in a new tab)rules/cache-memoize-within-the-request.md (opens in a new tab)rules/cache-read-heavy-endpoints.md (opens in a new tab)rules/cache-stable-key-convention.md (opens in a new tab)rules/cache-tags-for-related-data.md (opens in a new tab)rules/cache-touch-to-extend-ttl.md (opens in a new tab)rules/event-carry-identity-not-models.md (opens in a new tab)rules/event-dispatch-after-commit.md (opens in a new tab)rules/event-emit-for-side-effects.md (opens in a new tab)rules/event-listeners-own-domain-only.md (opens in a new tab)rules/event-outbox-for-must-deliver.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub foysal50x/skills --plugin laravel-skill6 skills in this plugin
/laravel-eloquentEloquent and query-layer engineering rules for Laravel — eliminating N+1, choosing a pagination strategy, short atomic transactions, casts and scopes on the model, where raw SQL is allowed, and how migrations declare the schema those queries depend on. Use when writing or reviewing Eloquent models, migrations, query classes, repositories, exports or reporting queries, or when a Laravel endpoint is slow, leaking memory, or returning wrongly-typed columns./laravel-engineeringLaravel implementation discipline for tracing context, reusing present contracts, keeping code simple, preserving failures, and verifying the changed critical path. Use when implementing, refactoring, debugging or reviewing Laravel code where callers, configuration, data flow or proof of correctness may be unclear./laravel-patternsPlacement rules for domain-driven Laravel applications — when to create an Action, Service, Repository, Query Class or Value Object, and when to just use Eloquent. Use when writing, reviewing or refactoring Laravel code that touches application structure, data access, domain boundaries or class placement. Triggers on questions like "where should this live", "should this be a service", "do I need a repository", or any new class in app/Domain./laravel-rest-apiREST API and HTTP-edge rules for Laravel — authorization before the domain runs, validation and DTO construction in Form Requests, scoped route model binding for nested resources, JSON output through Resources, thin controllers, and domain exceptions mapped to status codes centrally. Also covers outbound calls — HTTP client timeouts, retries, status handling and pooling. Use when writing or reviewing routes, controllers, form requests, API resources, policies, exception handling, or any call to a third-party API in a Laravel application./laravel-testingTest strategy for a layered Laravel application — which test style fits each layer, hand-written fakes over mocks, real-database tests for Query Classes and Repositories, pure tests for Value Objects, and feature tests that assert authorization, payload shape and query counts. Use when writing or reviewing Laravel tests, deciding what to fake, diagnosing a flaky or slow suite, or setting a project's testing conventions.Other plugins' skills for the same job