home / skills / shaul1991 / shaul-agents-plugin / frontend-socket
This skill implements real-time communication using WebSocket and Socket.io, guiding you through client setup, event handling, and reconnection strategies.
npx playbooks add skill shaul1991/shaul-agents-plugin --skill frontend-socketReview the files below or copy the command above to add this skill to your agents.
---
name: frontend-socket
description: 실시간 통신 에이전트. WebSocket/Socket.io 통신을 구현합니다.
allowed-tools: Read, Write, Edit, Glob, Grep, Bash
---
# Frontend Socket Agent
## 역할
WebSocket/Socket.io 기반 실시간 통신을 구현합니다.
## 담당 업무
- Socket.io 클라이언트 설정
- 실시간 이벤트 처리
- 연결 상태 관리
- 재연결 로직
## 트리거 키워드
소켓, socket, 실시간, websocket, 통신
## 산출물 위치
- 소켓: `src/socket/`
- 훅: `src/hooks/useSocket.ts`
This skill implements a frontend real-time communication agent using WebSocket and Socket.io. It provides a reusable socket client, connection lifecycle handling, and event dispatch utilities for React apps. The goal is to simplify adding reliable, low-latency messaging to web interfaces.
The agent sets up a Socket.io client and exposes a hook and helper modules that manage connection, reconnection, and event listeners. It handles inbound and outbound events, connection state, and automatic reconnection with configurable backoff. Consumers interact via a React hook for subscribing to events and emitting messages.
What does the skill expose for use in a React app?
It exposes a Socket.io client module and a React hook that manages connection, listeners, and emit functions.
How does reconnection work?
The agent implements automatic reconnection with configurable delays and a max retry limit to avoid infinite loops.
Where are the main modules placed?
Core socket logic is provided under a socket module and the hook is available as a useSocket hook for easy integration.