skills/laravel/laravel-background-processing/SKILL.md
Build scalable asynchronous workflows using Queues, Jobs, and Events in Laravel. Use when implementing queued jobs, event-driven workflows, or async processing in Laravel.
npx skillsauth add hoangnguyen0403/agent-skills-standard laravel-background-processingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
app/
├── Jobs/ # Asynchronous tasks
├── Events/ # Communication flags
└── Listeners/ # Task reactions
php artisan make:job ProcessOrder. Classes must implement ShouldQueue.handle() method. Pass only model IDs to constructor, not full Eloquent model.ProcessOrder::dispatch($orderId).Bus::chain([new ProcessPayment($order), new SendReceipt($order)])->dispatch() for sequential dependencies. Handle failures with ->catch(fn => ...).Bus::batch([new ImportRow(1), ...])->then(...)->catch(...)->dispatch(). Use $this->batch()->cancel() to abort and track via $batch->progress().php artisan make:event OrderPlaced and php artisan make:listener SendConfirmation --event=OrderPlaced.ShouldQueue to listeners to process them asynchronously.Event::dispatch(new OrderPlaced($order)).public function failed(Throwable $exception) in your job class. Use public int $tries = 3 and public int $backoff = 60 for retries.queue:failed-table migration to track dead jobs.php artisan horizon) for real-time observability; never use queue:work in production.development
Standardize SRS and FRS specifications for technical behavior, interfaces, data contracts, quality constraints, and verification mapping. Use when writing SRS, functional specification, system behavior requirements, API/data contracts, or non-functional thresholds.
development
Standardize BRD and BRD-lite discovery for business goals, stakeholder impact, current-to-future state, and measurable value outcomes. Use when creating BRD, business case, project justification, ROI narrative, or AS-IS to TO-BE scope.
development
Implements a strict Red-Green-Refactor loop to ensure zero production code is written without a prior failing test. Use when: creating new features, fixing bugs, or expanding test coverage.
testing
Standardize PRD discovery and drafting for product scope, user outcomes, requirement IDs, and acceptance criteria. Use when creating PRD, product requirements, feature specification, or acceptance criteria plan.