No slash command · from fuse-laravel
Implements Laravel 13 background jobs using PHP Attributes for queue configuration, covering dispatching, workers, batching, chaining, middleware, failed jobs, Horizon, and Queue::route() routing.
Ships in fuse-laravel. 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.
Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:
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)] · #[DeleteWhenMissingModels] · #[Delay(60)] | public $uniqueFor / $deleteWhenMissingModels / $delay |
#[DebounceFor(30, maxWait: 120)] (13.6+, with debounceId()) | — |
no attribute — ->afterCommit() / ShouldQueueAfterCommit | public $afterCommit |
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() (or after_commit connection config) when dispatching inside DB transactionsapp/
├── Jobs/
│ └── ProcessPodcast.php # #[Connection, Queue, Tries, Backoff]
├── Providers/
│ └── AppServiceProvider.php # Queue::route(ProcessPodcast::class, '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
{
// First argument = job class, or an interface / trait / parent class
Queue::route(ProcessPodcast::class, connection: 'redis', queue: 'media');
Queue::route(ShouldBroadcast::class, queue: 'events');
Queue::route([ProcessVideo::class => ['redis', 'videos']]);
// Forward a queue to another queue / connection (13.26+)
Queue::forward('reports', 'reports.fifo', 'sqs');
}
Bus::bulk($jobs) (13.13+) — push many independent jobs grouped by connection/queue, no batch trackingPreparesForDispatch interface (13.9+) — prepareForDispatch() returning false skips dispatchIlluminate\Queue\Middleware\Release job middleware (13.18+) — Release::when($condition, releaseAfter: 60)→ 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() (or after_commit => true)sync driver in productionreferences/batching.md (opens in a new tab)references/chaining.md (opens in a new tab)references/dispatching.md (opens in a new tab)references/failed-jobs.md (opens in a new tab)references/horizon.md (opens in a new tab)references/jobs.md (opens in a new tab)references/legacy-properties.md (opens in a new tab)references/middleware.md (opens in a new tab)references/templates/BatchJob.php.md (opens in a new tab)references/templates/ChainedJobs.php.md (opens in a new tab)references/templates/JobMiddleware.php.md (opens in a new tab)references/templates/JobTest.php.md (opens in a new tab)references/templates/QueueableJob.php.md (opens in a new tab)references/testing.md (opens in a new tab)references/troubleshooting.md (opens in a new tab)references/workers.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
23 skills in this plugin
/fusecoreUse when creating modules, understanding FuseCore structure, or implementing features in a FuseCore modular-monolith Laravel project./laravel-ai-sdkUse when integrating AI agents, tool calling, embeddings, structured output, or streaming in Laravel 13 via the `laravel/ai` package./laravel-apiUse when creating API endpoints, transforming responses with API Resources, or handling API authentication, rate limiting, or versioning.npx claudepluginhub fusengine/claude-plugins --plugin fuse-laravelOther plugins' skills for the same job