What problem does it solve? Writing correct bidirectional socket code in Effect v4 requires understanding the unstable effect/unstable/socket API surface, which differs significantly from v3's @effect/platform/Socket. This Skill provides verified guidance on the Socket run/writer model, error taxonomy, framing, and reconnect patterns so you avoid silent failures like clobbered writers, suspended writes, and unexpected close-code errors. ## Core Features & Use Cases - Socket clients: Create WebSocket clients via Socket.makeWebSocket/layerWebSocket and TCP or Unix-domain clients via NodeSocket.makeNet/fromDuplex, with open timeouts and per-reconnect URL re-evaluation. - Servers: Build TCP/Unix and WebSocket servers with NodeSocketServer.make/layer accept loops, per-connection scoping, and access to raw net.Socket or IncomingMessage services. - Framing and streaming: Convert sockets to Channels with Socket.toChannel, frame typed messages with Ndjson.duplexSchema, and pipe streams through connections with Stream.pipeThroughChannel. - Reconnect patterns: Implement retry loops with Effect.retry and exponential backoff schedules, using onOpen for re-subscription handshakes, mirroring RpcClient.makeProtocolSocket. - Use Case: Build a reconnecting WebSocket consumer that subscribes to a trade feed, refreshes auth tokens per reconnect via an effectful URL, and treats clean closes as normal completion with closeCodeIsError. ## Quick Start Ask the assistant to write an Effect v4 TCP echo client and server using NodeSocket and NodeSocketServer with NDJSON framing and automatic reconnection.