Ask Claude to Write Your WebSocket Event Handlers
WebSockets look intimidating until you've done a few. Claude knows the APIs, the edge cases (heartbeats, reconnects, room isolation), and can have you running in minutes.
Add WebSocket support to my Express app using the ws package.
Broadcast a "user_joined" event with the username when a client connects.
Broadcast a "user_left" event when they disconnect.
Keep a Map of connected clients so I can send messages to specific users.
Claude generates the server setup, event handler structure, and a helper for broadcasting to specific rooms or all connected clients. It will add a ping/pong heartbeat by default to detect stale connections.
For Laravel projects using Reverb or Pusher:
Create a Laravel broadcast event called OrderStatusUpdated.
It should fire on the private channel orders.{order_id} when an order status changes.
Include the channel authorization policy.
Also generate the frontend Echo listener using Laravel Echo and Pusher JS.
Claude understands the difference between public and private channels, knows to add the ShouldBroadcast interface, and will generate the matching channel route in routes/channels.php.
If you're unsure which stack to use, just ask:
What's the simplest way to add real-time notifications to my Laravel + Vue app in 2024?
Compare Reverb, Pusher, and SSE for my use case: ~500 concurrent users.
Describe the event, let Claude write the handler — real-time features don't need to be hard.
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.