Laravel websocket
Skill event4u-app/agent-config/dist/agent-src/skills/laravel-websocket
Use when building Laravel real-time features — Broadcasting events, ShouldBroadcast, private/presence channels, Echo client. For non-Laravel WebSockets, use the stack-native skill.From its SKILL.md
npx -y skills add event4u-app/agent-config --skill laravel-websocketAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 19 stars19 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.5 KB, 462 tokens by cl100k_base, as published. Nobody here has run it
laravel-websocket
When to use
Use when implementing real-time features — WebSockets, Broadcasting, or persistent connections.
Do NOT use when:
- REST API endpoints (use
api-designskill) - Reverb server setup/deployment (use
laravel-reverbskill)
Procedure: Create a broadcast event
Step 0: Inspect
- Check
config/broadcasting.phpfor driver (Reverb, Pusher, Ably). - Check existing broadcast events — match patterns.
- Check
routes/channels.phpfor channel authorization.
Step 1: Create event class
- Implement
ShouldBroadcast. - Define
broadcastOn()with appropriate channel type (public/private/presence). - Define
broadcastAs()for event name. - Define
broadcastWith()— small payload (IDs + changed fields only).
Step 2: Authorize channel
Add authorization in routes/channels.php for private/presence channels.
Step 3: Client setup
Use Laravel Echo to listen on the channel. Wire up reconnection with exponential backoff.
Conventions
→ See guideline php/websocket.md for broadcasting setup, channel types, connection management, Echo.
Validate
- Verify private/presence channels have authorization in
routes/channels.php. - Confirm event implements
ShouldBroadcast(orShouldBroadcastNow). - Check that no sensitive data is broadcast on public channels.
- Test client receives event — use browser console or Echo debug mode.
Output format
- Event class with broadcastOn() and channel definitions
- Client-side listener integration code
Gotcha
- Connections are stateful — don't assume they persist after page navigation.
- Always implement reconnection with exponential backoff.
- Don't broadcast sensitive data on public channels — use private/presence.
Do NOT
- Do NOT send entire model objects — select only needed fields.
- Do NOT skip channel authorization for user-specific data.
- Do NOT rely on WebSocket delivery — use acknowledgments for critical messages.
Auto-trigger keywords
- WebSocket
- real-time
- broadcasting
- Laravel Echo
- channel authorization
- ShouldBroadcast
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.