Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

laravel-queues

БесплатноБез исполняемых скриптовНе проверен

Use when implementing Laravel 13 background jobs — queue attributes, workers, batching, chaining, middleware, or Queue::route() routing.

Fusengineот Fusengine★ 36 звёзд на GitHub14 установок в других каталогах

Об этом скилле

Covers Laravel 13 queues with PHP Attributes as the primary configuration mechanism on Jobs, Listeners, Notifications, Mailables, and Broadcast Events (#[Connection], #[Queue], #[Tries], #[Timeout], #[Backoff], #[MaxExceptions], #[FailOnTimeout], #[UniqueFor], #[Delay], #[DebounceFor]) alongside legacy property equivalents. Includes job lifecycle, dispatching, workers, batching, chaining, custom middleware, failed-job handling, Horizon monitoring, testing, troubleshooting, and centralised queue routing via Queue::route() in AppServiceProvider::boot().

Laravel Queues (L13 — Attributes-first)

Agent Workflow (MANDATORY)

Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:

  1. fuse-ai-pilot:explore-codebase - Audit job classes, connections, queue routes
  2. fuse-ai-pilot:research-expert - Verify L13 Queue + Queue::route() via Context7
  3. mcp__context7__query-docs - Check queue attribute patterns

After implementation, run fuse-ai-pilot:sniper for validation.


Overview

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.


Critical Rules

  1. Declare queue metadata with Attributes - #[Queue], #[Tries], #[Backoff]
  2. Centralise routing with Queue::route() in AppServiceProvider::boot()
  3. Implement failed(Throwable $e) for every production job
  4. Use ->afterCommit() (or after_commit connection config) when dispatching inside DB transactions
  5. Monitor Redis queues with Horizon in production

Architecture

app/
├── 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


Reference Guide

Concepts

Templates

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

Quick Reference

Attribute-based Job (L13 MAIN)

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]); }
}

Queue Routing (centralised)

// 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,
Полный SKILL.md на GitHub

Установить laravel-queues в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/batching.mdreferences/chaining.mdreferences/dispatching.mdreferences/failed-jobs.mdreferences/horizon.mdreferences/jobs.mdreferences/legacy-properties.mdreferences/middleware.mdreferences/templates/BatchJob.php.mdreferences/templates/ChainedJobs.php.mdreferences/templates/JobMiddleware.php.mdreferences/templates/JobTest.php.mdreferences/templates/QueueableJob.php.mdreferences/testing.mdreferences/troubleshooting.mdreferences/workers.md

FAQ

Что делает скилл laravel-queues?

Use when implementing Laravel 13 background jobs — queue attributes, workers, batching, chaining, middleware, or Queue::route() routing.

Как установить скилл laravel-queues?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл laravel-queues запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить laravel-queues с