Command Palette

Search for a command to run...

Назад к скиллам
скилл № 97403

backend-web-real-time

Use when the user asks about WebRTC, building a video call feature, SFU vs MCU, signaling servers, TURN/STUN, LiveKit or mediasoup, simulcast or live…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить backend-web-real-time в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Web Real-Time Communication

Purpose

Build real-time communication systems: WebRTC signaling, media server architecture (SFU/MCU), TURN/STUN infrastructure, live streaming, and real-time data channels.

Agent Protocol

Trigger

User mentions WebRTC, real-time video/audio, media streaming, SFU, MCU, signaling server, TURN/STUN, live streaming, media server, coturn, or real-time communication infrastructure.

Input Context

  • Use case (video call, live streaming, conferencing, data channel)
  • Expected participant count (1-1, small group <10, large group >10)
  • Network conditions (NAT/firewall, mobile, enterprise)
  • Media types (audio, video, screen share, data channel)
  • Deployment model (self-hosted, hybrid, cloud)
  • Latency requirements (real-time, near-real-time, low-latency streaming)

Output Artifact

Architecture design with signaling protocol, media server topology, TURN/STUN config, client integration code, and deployment infrastructure.

Response Format

No preamble. No postamble. No explanations. No filler/hedging/transitions. Strip articles a/an/the where unambiguous. Compress output.

Completion Criteria

  • Signaling server protocol selected (WebSocket, HTTP, SSE) and implemented
  • Media server architecture chosen (SFU > MCU > P2P mesh) per scale requirements
  • TURN/STUN infrastructure specified with credentials management
  • ICE/STUN/TURN configuration working across target network topologies
  • Media negotiation (SDP offer/answer) flow implemented
  • Client SDK integration complete with reconnection logic
  • Bandwidth estimation and adaptation strategy defined
  • Recording/archiving strategy defined if required
  • Fallback for restricted networks documented

Max Response Length

4096 tokens

Architecture Decision Trees

Topology Selection

Criterion Mesh (P2P) SFU (Selective Forwarding) MCU (Multipoint Control)
Participants 2-4 4-100+ 4-50
Server bandwidth None O(n) — one uplink per peer O(1) — single mixed stream
Client bandwidth O(n^2) — send to all peers O(1) — send once, receive n-1 O(1) — single stream
Latency Lowest Low (no mixing) Higher (mixing delay)
CPU cost Client-side Server relays Server transcodes
Complexity Simplest Moderate High
Fallback STUN only STUN + TURN STUN + TURN

Decision: Always prefer SFU for multi-party. Mesh for 1-1 calls. MCU only when legacy client compatibility required.

Signaling Protocol Decision

Criterion WebSocket HTTP Long Polling SSE
Latency <50ms 200-500ms 100-300ms
Bidirectional Yes Yes Server→Client only
NAT Traversal Native ws:// wss:// HTTP (always works) HTTP (always works)
Browser Support All modern All All (except IE)
Connection overhead Upgrade handshake New request per poll Persistent connection
Reconnection Built-in (some libs) Stateless Built-in (EventSource)

Decision: WebSocket for production signaling. SSE for one-way broadcast. HTTP polling as last resort for restrictive networks.

Codec Selection

Codec Bitrate Quality Licensing Browser Support
VP8 200-1500 kbps Good Royalty-free Chrome, Firefox, Safari 14.1+
VP9 150-800 kbps Better Royalty-free Chrome, Firefox
H.264 200-1500 kbps Excellent Patent-encumbered Chrome, Firefox, Safari, Edge
AV1 100-500 kbps Best Royalty-free Chrome (limited)

Decision: H.264 for widest compatibility. VP9/AV1 for bandwidth-constrained environments.

Workflow

WebRTC Architecture

Peer A → Signaling Server ← Peer B
  |                            |
  ↓                            ↓
STUN/TURN Server ← → ICE Negotiation ← → STUN/TURN Server
  |                            |
  ↓                            ↓
  └─────── Media via SRTP/SCTP ────────┘

Signaling Server Patterns

Protocol When to Use Example
WebSocket Low latency, bidirectional Socket.io, ws
HTTP Long Polling Simple, no WebSocket support REST endpoints
Server-Sent Events One-way server→client Event notifications

Media Server Architecture

Architecture Description Pros Cons
Mesh (P2P) Every peer connects to every other No server cost Bandwidth scales O(n^2)
MCU Server mixes all streams into one Low client bandwidth Single point of failure
SFU Server relays streams, selective forwarding Scalable, flexible Higher server bandwidth

SFU (Selective Forwarding Unit) - Recommended

  • Each peer sends one stream to SFU
  • SFU forwards to all other peers
  • Peers can choose which streams to receive
  • Scales to hundreds of partici
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/live-streaming.md
  • references/real-time-architecture.md
  • references/real-time-delivery.md
  • references/sse-vs-websocket.md
  • references/web-real-time-advanced.md
  • references/web-real-time-fundamentals.md
  • references/webrtc-architecture.md
  • references/websocket-optimization.md

FAQ

Что делает скилл backend-web-real-time?

Use when the user asks about WebRTC, building a video call feature, SFU vs MCU, signaling servers, TURN/STUN, LiveKit or mediasoup, simulcast or live streaming latency. Produces real-time media architecture and signaling code. Not for chat-style WebSocket messaging (use backend-websocket-patterns).

Как установить скилл backend-web-real-time?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл backend-web-real-time запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить backend-web-real-time с