plugins/laravel-expert/skills/laravel-queues/SKILL.md
Laravel 13 background jobs - PHP Attributes (#[Queue],
npx skillsauth add fusengine/agents laravel-queuesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Before ANY implementation, use TeamCreate to spawn 3 agents:
After implementation, run fuse-ai-pilot:sniper for validation.
Laravel 13 introduces PHP Attributes on Queueables (Jobs, Listeners, Notifications, Mailables, Broadcast Events) as the primary configuration mechanism. Centralised routing is configured via Queue::route() in AppServiceProvider::boot().
| Attribute (L13 MAIN) | Legacy property |
|----------------------|-----------------|
| #[Connection('redis')] · #[Queue('podcasts')] | public $connection · public $queue |
| #[Tries(5)] · #[Timeout(120)] · #[MaxExceptions(3)] | public int $tries / $timeout / $maxExceptions |
| #[Backoff([10, 30, 60])] · #[FailOnTimeout] | public $backoff · public bool $failOnTimeout |
| #[UniqueFor(3600)] · #[AfterCommit] · #[DeleteWhenMissingModels] | public $uniqueFor / $afterCommit / $deleteWhenMissingModels |
Applies to Jobs, Listeners, Notifications, Mailables, and Broadcast Events.
#[Queue], #[Tries], #[Backoff]Queue::route() in AppServiceProvider::boot()failed(Throwable $e) for every production job#[AfterCommit] when dispatching inside DB transactionsapp/
├── Jobs/
│ └── ProcessPodcast.php # #[Connection, Queue, Tries, Backoff]
├── Providers/
│ └── AppServiceProvider.php # Queue::route('podcasts', 'redis')
└── Listeners/
└── SendShipmentNotification.php # #[Queue('mail')]
→ See templates/QueueableJob.php.md
| Template | When to Use | |----------|-------------| | QueueableJob.php.md | Attribute-based job | | BatchJob.php.md | Batchable job | | ChainedJobs.php.md | Job chain | | JobMiddleware.php.md | Custom middleware | | JobTest.php.md | Job test |
use Illuminate\Queue\Attributes\{Connection, Queue, Tries, Timeout, Backoff, MaxExceptions, FailOnTimeout, UniqueFor};
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Queue\Queueable;
#[Connection('redis')]
#[Queue('podcasts')]
#[Tries(5)]
#[Timeout(120)]
#[Backoff([10, 30, 60])]
#[MaxExceptions(3)]
#[FailOnTimeout]
#[UniqueFor(3600)]
final class ProcessPodcast implements ShouldQueue
{
use Queueable;
public function __construct(public readonly Podcast $podcast) {}
public function handle(PodcastService $service): void { $service->process($this->podcast); }
public function failed(\Throwable $e): void { Log::error('Podcast failed', ['id' => $this->podcast->id, 'e' => $e]); }
}
// app/Providers/AppServiceProvider.php
use Illuminate\Support\Facades\Queue;
public function boot(): void
{
Queue::route('podcasts', connection: 'redis', queue: 'media');
Queue::route('mail', connection: 'redis', queue: 'transactional');
}
→ Legacy public int $tries = 5 style — see legacy-properties.md
Queue::route() in AppServiceProvider::boot()#[AfterCommit] when dispatching inside a transactionfinal job classes, implement failed(), monitor Redis with Horizon#[Tries] and public int $tries (single source of truth)#[AfterCommit]sync driver in productiontesting
Copy self-audit and ban-lists — filler verbs/hype adjectives, slop placeholder names, fake-precise numbers, Title Case headlines, humor in error copy ('Oops!'), em-dash crutch, one copy register per page.
development
Logged-in web apps — dashboards, auth flows, settings, onboarding, data tables, command palettes, modals, toasts. Register `product`: density and glance-speed over marketing polish, no hero/CTA-tricks, every data surface covers empty/loading/error explicitly, tables and dataviz follow preattentive-processing rules.
development
Marketing sites, landing pages, campaign pages — register `brand` (design IS the product). Structure comes from the register's POV + a macrostructure pick, never from copying an inspiration site's section flow. Hero discipline, deviated section order, asymmetric grids, and a silhouette lookalike-test gate before ship.
development
Token-strategy core — OKLCH color rules, neutral tinting, accent-commitment levels, type scale, 8pt spacing grid, touch targets, and the canonical output format of design-system.md (the file the harness gates on). This is routing step 1 of design-method/SKILL.md — read it before design-web/design-webapp/design-ios/design-android, before picking or auditing a single color/type/spacing value.