Agent skill
laravel-jobs
Background jobs and event listeners for async processing. Use when working with queued jobs, background processing, events, or when user mentions jobs, queues, listeners, events, async processing.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/product/laravel-jobs
SKILL.md
Laravel Jobs
Background jobs and event listeners: thin delegation layers to actions.
Core Concept
jobs-listeners.md - Job patterns:
- Jobs as thin delegation layers
- Queue configuration
- Retry logic and timeouts
- Unique jobs
- Job middleware
- Event listeners
- When to use jobs vs sync actions
Pattern
final class ProcessOrderJob implements ShouldQueue
{
use Dispatchable, Queueable;
public function __construct(
public readonly int $orderId,
) {}
public function handle(ProcessOrderAction $action): void
{
$order = Order::findOrFail($this->orderId);
$action($order);
}
public function middleware(): array
{
return [new WithoutOverlapping($this->orderId)];
}
}
// Listener
final class SendOrderConfirmationListener
{
public function handle(OrderPlaced $event): void
{
SendOrderConfirmationJob::dispatch($event->order->id);
}
}
Jobs delegate to actions. Keep domain logic in actions, not jobs.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?