---
name: "laravel-queues-horizon-monitoring"
description: "Manage and monitor Redis queues in Laravel with real-time throughput metrics and auto-scaling."
metadata:
  author: "Laravel"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "setup laravel horizon"
  - "auto balance horizon workers"
  - "retry failed jobs horizon"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Laravel Horizon Redis Queue Management & Metrics

Configures Laravel Horizon: configuring config/horizon.php, balance strategies (auto, simple), supervising worker pools, monitoring failed jobs, retry policies, and securing the Horizon web dashboard.

## When to Invoke
Invoke this skill whenever you need to:
- setup laravel horizon
- auto balance horizon workers
- retry failed jobs horizon

## Execution SOP & Rules
1. Install: composer require laravel/horizon && php artisan horizon:install.
2. Configure environments in config/horizon.php with balance: 'auto', minProcesses: 1, maxProcesses: 20.
3. Start Horizon daemon: php artisan horizon (managed via systemd or Supervisor in production).
4. Secure dashboard in HorizonServiceProvider: Gate::define('viewHorizon', fn($user) => in_array($user->email, [...])).

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
