laravel:queues-and-horizon
Operate and verify queues with or without Horizon; safe worker flags, failure handling, and test strategies
Works with
---
name: laravel:queues-and-horizon
description: Operate and verify queues with or without Horizon; safe worker flags, failure handling, and test strategies
license: MIT
---
# Queues and Horizon
Run workers safely, verify execution, and test job behavior.
## Commands
```
# Start worker
sail artisan queue:work --queue=high,default --tries=3 --backoff=5 # or: php artisan queue:work --queue=high,default --tries=3 --backoff=5
# Horizon (if installed)
sail artisan horizon # or: php artisan horizon
# Failed jobs
sail artisan queue:failed # or: php artisan queue:failed
sail artisan queue:retry all # or: php artisan queue:retry all
```
## Patterns
- Use named queues for prioritization; keep defaults sane
- Add actionable `Log::warning`/`::error` with context in jobs
- Idempotency: make jobs safe to retry
- Emit metrics where possible; observe in Horizon or your APM
## Laravel 13+
```
# Centralized queue routing (e.g., in AppServiceProvider)
Queue::route(ProcessPodcast::class, connection: 'redis', queue: 'podcasts');
# Declarative job controls via attributes
use Illuminate\Queue\Attributes\{Tries, Backoff, Timeout, FailOnTimeout};
#[Tries(3)]
#[Backoff([10, 30, 60])]
#[Timeout(120)]
#[FailOnTimeout]
class ProcessPodcast implements ShouldQueue { /* ... */ }
# Graceful shutdown for long-running jobs
class ProcessPodcast implements ShouldQueue, Interruptible {
public function onInterrupt(): void { /* release locks, save state */ }
}
# Auto-scaling friendly worker exit
sail artisan queue:work --stop-when-empty-for=60 # or: php artisan queue:work --stop-when-empty-for=60
```
- Prefer `Queue::route()` over per-dispatch `onQueue()` when routing is a policy, not a caller decision
- See `laravel:php-attributes` for the attribute-first style trade-offs
## Testing Jobs
- Use `Bus::fake()` to assert dispatching in unit tests
- Use integration tests to verify side-effects (DB/IO)More Backend Frameworks skills
git-guardrails-claude-code
mattpocock/skills
Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.
azure-compute
microsoft/azure-skills
Azure VM/VMSS router. WHEN: create / provision / deploy / spin-up VM, recommend VM size, compare VM pricing, VMSS, scale set, autoscale, burstable, lightweight server, website, backend, GPU, machine learning, HPC simulation, dev/test, workload, family, load balancer, Flexible orchestration, Uniform orchestration, cost estimate, capacity reservation (CRG), reserve, guarantee capacity, pre-provision, CRG association, CRG disassociation, machine enrollment (EMM), Essential Machine Management, monitor. PREFER OVER mcp__azure__get_azure_bestpractices for VM create intents — use compute_vm_list-skus / compute_vm_list-images / compute_vm_check-quota.
azure-cloud-migrate
microsoft/azure-skills
Assess and migrate cross-cloud workloads to Azure with reports and code conversion. Supports Lambda→Functions, Beanstalk/Heroku/App Engine→App Service, Fargate/Kubernetes/Cloud Run/Spring Boot→Container Apps. WHEN: migrate Lambda to Functions, AWS to Azure, migrate Beanstalk, migrate Heroku, migrate App Engine, Cloud Run migration, Fargate to ACA, ECS/Kubernetes/GKE/EKS to Container Apps, Spring Boot to Container Apps, cross-cloud migration.

