Source profileQuality 96/100

event4u-app/agent-config/src/skills/laravel-horizon/SKILL.md

laravel-horizon

Use when working with Laravel queues in production — Horizon dashboard, worker supervision, job metrics, balancing strategies — even when the user just says 'my jobs are piling up'.

Source repository stars
7
Declared platforms
0
Static risk flags
0
Last source update
2026-07-28
Source checked
2026-07-28

Decision brief

What it does—and where it fits

Use when working with Laravel queues in production — Horizon dashboard, worker supervision, job metrics, balancing strategies — even when the user just says 'my jobs are piling up'.

Best for

  • Queue worker configuration and supervision
  • Horizon dashboard setup and access control
  • Job metrics, throughput, and failure monitoring

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/laravel-horizon"
Safe inspection promptEditorial

Inspect the Agent Skill "laravel-horizon" from https://github.com/event4u-app/agent-config/blob/0adf49a8ae84b0ff6e2de8759eea43257e020eff/src/skills/laravel-horizon/SKILL.md at commit 0adf49a8ae84b0ff6e2de8759eea43257e020eff. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Procedure: Configure Horizon

    1. Inspect current queue setup — Read config/queue.php, config/horizon.php (if present), and composer.json to identify the current driver, supervisors, and queues in use. 2. Pick environments and balance strategy — Decide per-env maxProcesses, balance, tries, timeout based on wo…

    Inspect current queue setup — Read config/queue.php, config/horizon.php (if present), and composer.json to identify the current driver, supervisors, and queues in use.Pick environments and balance strategy — Decide per-env maxProcesses, balance, tries, timeout based on workload; review the config block below.Apply configuration — Edit config/horizon.php, register supervisors and queue priority.
  2. 02

    When to use

    Use this skill for anything related to Laravel Horizon: - Queue worker configuration and supervision - Horizon dashboard setup and access control - Job metrics, throughput, and failure monitoring - Balancing strategies and scaling workers - Production tuning and deployment

    Queue worker configuration and supervisionHorizon dashboard setup and access controlJob metrics, throughput, and failure monitoring
  3. 03

    config/horizon.php

    Review the “config/horizon.php” section in the pinned source before continuing.

    Review and apply the “config/horizon.php” source section.
  4. 04

    Queue priority

    Review the “Queue priority” section in the pinned source before continuing.

    Review and apply the “Queue priority” source section.
  5. 05

    Running Horizon

    Review the “Running Horizon” section in the pinned source before continuing.

    Review and apply the “Running Horizon” source section.

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score96/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars7SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
event4u-app/agent-config
Skill path
src/skills/laravel-horizon/SKILL.md
Commit
0adf49a8ae84b0ff6e2de8759eea43257e020eff
License
MIT
Collected
2026-07-28
Default branch
main
View the original SKILL.md

laravel-horizon

When to use

Use this skill for anything related to Laravel Horizon:

  • Queue worker configuration and supervision
  • Horizon dashboard setup and access control
  • Job metrics, throughput, and failure monitoring
  • Balancing strategies and scaling workers
  • Production tuning and deployment

For writing queue jobs themselves, see jobs-events.

Procedure: Configure Horizon

  1. Inspect current queue setup — Read config/queue.php, config/horizon.php (if present), and composer.json to identify the current driver, supervisors, and queues in use.
  2. Pick environments and balance strategy — Decide per-env maxProcesses, balance, tries, timeout based on workload; review the config block below.
  3. Apply configuration — Edit config/horizon.php, register supervisors and queue priority.
  4. Verify — Run php artisan horizon locally, hit /horizon dashboard, confirm jobs flow and metrics appear.

config/horizon.php

'environments' => [
    'production' => [
        'supervisor-1' => [
            'maxProcesses' => 10,
            'balanceMaxShift' => 1,
            'balanceCooldown' => 3,
            'connection' => 'redis',
            'queue' => ['default', 'high', 'low'],
            'balance' => 'auto',  // auto, simple, or false
            'tries' => 3,
            'timeout' => 60,
            'maxTime' => 3600,
            'maxJobs' => 1000,
            'memory' => 128,
        ],
    ],
    'local' => [
        'supervisor-1' => [
            'maxProcesses' => 3,
            'connection' => 'redis',
            'queue' => ['default', 'high', 'low'],
            'balance' => 'auto',
            'tries' => 3,
            'timeout' => 60,
        ],
    ],
],

Queue priority

// Higher priority queues are listed first
'queue' => ['high', 'default', 'low'],

Running Horizon

# Start Horizon (foreground)
php artisan horizon

# Pause / Continue
php artisan horizon:pause
php artisan horizon:continue

# Terminate gracefully (for deployments)
php artisan horizon:terminate

# Check status
php artisan horizon:status

Deployment

Always terminate and restart Horizon after deploying new code:

php artisan horizon:terminate
# Supervisor will auto-restart Horizon

Supervisor config (production)

[program:horizon]
process_name=%(program_name)s
command=php /path/to/artisan horizon
autostart=true
autorestart=true
user=www-data
redirect_stderr=true
stdout_logfile=/var/log/horizon.log
stopwaitsecs=3600

Dashboard access

// HorizonServiceProvider
protected function gate(): void
{
    Gate::define('viewHorizon', function (User $user): bool {
        return $user->isSuperuser();
    });
}

Balancing strategies

StrategyBehavior
autoDistributes workers based on queue workload (recommended)
simpleRound-robin across queues
falseFixed worker count per queue

Metrics and monitoring

  • Throughput — jobs processed per minute per queue
  • Runtime — average job execution time
  • Wait time — time jobs spend waiting in queue
  • Failed jobs — track and retry from dashboard
  • Tags — auto-tagged by Eloquent models, custom tags via tags() method
// Custom tags on a job
public function tags(): array
{
    return ['customer:' . $this->customer->getId(), 'report'];
}

Core rules

  • Always use Supervisor in production — Horizon is a long-running process.
  • Terminate on deployhorizon:terminate ensures workers pick up new code.
  • Use auto balancing — it adapts to workload automatically.
  • Set maxTime — prevents workers from running forever (memory leaks).
  • Set maxJobs — recycles workers after N jobs to prevent memory bloat.
  • Tag jobs — makes debugging and filtering in the dashboard much easier.

Output format

  1. Updated Horizon configuration with supervisor and queue settings
  2. Environment-specific balancing strategy rationale

Auto-trigger keywords

  • Horizon
  • queue worker
  • queue dashboard
  • job monitoring
  • supervisor
  • queue balancing

Gotcha

  • Horizon config changes require php artisan horizon:terminate and restart — they don't hot-reload.
  • Don't set maxProcesses too high — each process holds a DB connection. Monitor your connection pool.
  • The model forgets that Horizon only works with Redis queues — not database or SQS.

Do NOT

  • Do NOT run Horizon without Supervisor/systemd in production.
  • Do NOT expose the Horizon dashboard without access control.

Alternatives

Compare before choosing