Generate Laravel Queued Jobs and Workers with Claude
Queue workers are boilerplate-heavy — describe what your job should do and Claude writes the full class, retry logic, and test suite in one shot.
"Write a Laravel queued job that processes a video upload:
- Accept a Video model ID
- Download from S3, transcode with FFmpeg, save a thumbnail
- Retry 3 times with exponential backoff on failure
- Dispatch a VideoProcessed event when done
Add Pest tests for success, failure, and retry behaviour."
Queue jobs involve a lot of moving parts: the job class, handle() logic, failed() method, retry configuration, and dispatching from controllers. Claude handles the boilerplate so you can focus on the actual processing logic.
The generated job includes proper dependency injection, ShouldQueue, and the right $tries and $backoff properties:
class ProcessVideoUpload implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public int $tries = 3;
public array $backoff = [30, 60, 120];
public function __construct(public readonly int $videoId) {}
}
The test suite fakes the queue with Queue::fake(), asserts dispatch happens with the right payload, and simulates the failed() path — so you know retry behaviour is correct before it hits production.
Add your queue driver and worker config to CLAUDE.md so Claude knows whether you're on Redis, SQS, or the database driver without asking every time.
Queue workers don't have to be a chore — describe the side effect you want and Claude ships the class.
Log in to leave a comment.
Set up Claude Code as an automated reviewer in your CI pipeline — on every pull request, it reads the diff, checks for bugs, security issues, missing tests, and convention violations, then posts its findings as a PR comment. Your human reviewers get a head start because the obvious issues are already flagged before they look.
Before deploying, tell Claude to read your project — migrations, environment variables, queue workers, scheduled tasks, caching, third-party integrations — and generate a deployment checklist that's specific to your app. Not a generic "did you run migrations?" list, but one that knows YOUR infrastructure and catches the things YOUR deploy can break.
Instead of writing a README from memory or copying a template, tell Claude to read your project and generate one that's actually accurate — real setup instructions from your config, real architecture from your directory structure, real API examples from your routes, and real prerequisites from your dependency files.