Agent skill

laravel-queues

Implement background jobs with queues, workers, batches, chains, events, broadcasting, and failure handling. Use when processing async tasks, sending emails, or handling long-running operations.

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/laravel-queues-fusengine-agents

SKILL.md

Laravel Queues & Events

Documentation

Queues & Jobs

  • queues.md - Queue system
  • horizon.md - Queue monitoring
  • scheduling.md - Task scheduling

Events & Broadcasting

  • events.md - Events & Listeners
  • broadcasting.md - WebSocket broadcasting
  • reverb.md - Laravel Reverb (WebSockets)

Notifications & Mail

  • notifications.md - Notifications
  • mail.md - Email sending

Caching & Storage

  • cache.md - Caching
  • redis.md - Redis

Monitoring

  • telescope.md - Debug assistant
  • pulse.md - Application monitoring

Job Class

php
<?php

declare(strict_types=1);

namespace App\Jobs;

final class SendWelcomeEmail implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    public int $tries = 3;
    public int $backoff = 60;

    public function __construct(
        public readonly User $user,
    ) {}

    public function handle(EmailService $emailService): void
    {
        $emailService->sendWelcome($this->user);
    }

    public function failed(\Throwable $exception): void
    {
        Log::error('Welcome email failed', ['user_id' => $this->user->id]);
    }
}

Events & Listeners

php
// Event
class OrderShipped
{
    public function __construct(
        public readonly Order $order,
    ) {}
}

// Listener
class SendShipmentNotification
{
    public function handle(OrderShipped $event): void
    {
        $event->order->user->notify(new OrderShippedNotification($event->order));
    }
}

// Dispatch
OrderShipped::dispatch($order);

Job Batches

php
Bus::batch([
    new ProcessPodcast($podcast1),
    new ProcessPodcast($podcast2),
])
->then(fn (Batch $batch) => Log::info('All completed!'))
->catch(fn (Batch $batch, Throwable $e) => Log::error('Failed'))
->dispatch();

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results