/media-os:webrtc-livekit [action]from media-os
Deploys and manages LiveKit WebRTC SFU: server, CLI, egress/ingress, agents, JWT tokens, and SDK integration.
Ships in media-os. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Context: $ARGUMENTS
LiveKit is an Apache-2.0 WebRTC SFU written in Go — a single-binary deployment with a vast SDK matrix. Docs home: https://docs.livekit.io/home/. Repo: https://github.com/livekit/livekit.
livekit.py install-server)lk / livekit-cli): → Step 1 (livekit.py install-cli)livekit.py start)livekit.py mint-token)livekit.py egress-start)livekit.py ingress-start)Room (per-meeting)
├── Participant (per-user)
│ ├── TrackPublication (the publisher's declaration)
│ │ └── Track (camera / mic / screen-share / data)
│ └── Permissions (from JWT grants)
└── Metadata (free-form, room-wide or per-participant)
Tokens are JWT (HS256). Each token carries a video grant describing which room and which permissions.
# Server
uv run ${CLAUDE_SKILL_DIR}/scripts/livekit.py install-server --dest ~/bin
# CLI ("lk", formerly "livekit-cli")
uv run ${CLAUDE_SKILL_DIR}/scripts/livekit.py install-cli --dest ~/bin
The script downloads the correct release from github.com/livekit/livekit/releases (server) and github.com/livekit/livekit-cli/releases (CLI) for your uname -sm, extracts it, and places the binary in --dest. No sudo required if --dest is writable. Homebrew and the official install.sh exist upstream — pick whichever fits your OS.
uv run ${CLAUDE_SKILL_DIR}/scripts/livekit.py start --dev
--dev launches with a built-in dev API key / secret (devkey / secret) and enabled self-signed TURN on 443. For production, write a YAML config:
# livekit.yaml (abridged — see references/deployment.md for the full set)
port: 7880
bind_addresses: ['']
rtc:
port_range_start: 50000
port_range_end: 60000
tcp_port: 7881
use_external_ip: true
keys:
devkey: secret
redis:
address: redis:6379
Run: livekit-server --config livekit.yaml.
LiveKit tokens are JWTs with an iss = API key, sub = participant identity, video grant, and standard iat / exp. The helper mints them with stdlib only (hmac + hashlib + base64 + json):
uv run ${CLAUDE_SKILL_DIR}/scripts/livekit.py mint-token \
--api-key devkey --api-secret secret \
--room my-room --identity alice \
--name 'Alice' --ttl 3600 \
--grants roomJoin=true,canPublish=true,canSubscribe=true,canPublishData=true
Token schema (see references/grants.md for every flag):
{
"iss": "devkey",
"sub": "alice",
"name": "Alice",
"iat": 1710000000,
"exp": 1710003600,
"nbf": 1710000000,
"video": {
"room": "my-room",
"roomJoin": true,
"canPublish": true,
"canSubscribe": true,
"canPublishData": true,
"hidden": false,
"recorder": false
}
}
lk room list --api-key KEY --api-secret SECRET --url ws://localhost:7880
lk room join --url ws://localhost:7880 --api-key KEY --api-secret SECRET --identity alice my-room
lk load-test --url ws://localhost:7880 --api-key KEY --api-secret SECRET --room test --publishers 5 --subscribers 20
The helper wraps these (passes through to lk):
uv run ${CLAUDE_SKILL_DIR}/scripts/livekit.py room-list
uv run ${CLAUDE_SKILL_DIR}/scripts/livekit.py room-join --room my-room --identity alice
uv run ${CLAUDE_SKILL_DIR}/scripts/livekit.py load-test --config load-test.yaml
livekit-egress is a separate binary (github.com/livekit/egress) that connects to a Room and records or re-streams it. Outputs: MP4 file, HLS manifest, or RTMP push.
uv run ${CLAUDE_SKILL_DIR}/scripts/livekit.py egress-start \
--url ws://localhost:7880 --api-key KEY --api-secret SECRET \
--room my-room --type room-composite --layout grid \
--output mp4 --dest ./recording.mp4
Egress types:
room-composite — lay out all participants into one MP4/HLS stream.track-composite — specific set of tracks (audio + screen share, etc.).track — single track, no composite (raw stream).web — load an arbitrary URL (like a Grafana dashboard) and record it.participant — one participant's outgoing tracks.Egress runs best as a separate service in its own container (uses headless Chromium); docs: https://docs.livekit.io/home/egress/overview/.
livekit-ingress (github.com/livekit/ingress) accepts RTMP / WHIP / SRT / URL pulls and injects them as Participants.
uv run ${CLAUDE_SKILL_DIR}/scripts/livekit.py ingress-start \
--url ws://localhost:7880 --api-key KEY --api-secret SECRET \
--room my-room --type rtmp --name 'OBS Feed' --identity obs-1
Returns an ingest URL and stream key. Ingress must run as a sidecar too.
Official SDKs (all link from https://docs.livekit.io/home/client/):
livekit-client (browser + Node)livekit on PyPIgithub.com/livekit/server-sdk-golivekit on crates.ioLiveKit for iOS/macOSlivekit_client@livekit/components-react / livekit-react-nativelivekit-server-sdk (for minting tokens + webhooks)https://docs.livekit.io/agents/ — framework for realtime voice/video agents that join Rooms. Pair with OpenAI Realtime, Deepgram, ElevenLabs etc. Python + Node.js.
exp is mandatory. Missing exp → 401 at room join.canPublish:false tokens still count against room-size limits — hidden observers need hidden:true to not appear in participant lists.recorder:true grant is what livekit-egress uses — mark your egress participant with it so the server doesn't include it in room composites.rtc.tcp_port) must be reachable on your public IP; otherwise peers behind strict firewalls fail to connect.livekit-cli to lk in late 2024. The long name still works via symlink in most builds.devkey:secret is insecure. For any deployment that's reachable from the internet, generate fresh keys — lk create-api-key.use_external_ip:true reads cloud metadata endpoints on AWS/GCP/Azure. On-prem: set node_ip manually.VideoPresets on the client for single-layer encoders.uv run ${CLAUDE_SKILL_DIR}/scripts/livekit.py install-server --dest ~/bin
uv run ${CLAUDE_SKILL_DIR}/scripts/livekit.py start --dev # in one terminal
# in another
uv run ${CLAUDE_SKILL_DIR}/scripts/livekit.py mint-token \
--api-key devkey --api-secret secret \
--room test --identity alice --ttl 3600 \
--grants roomJoin=true,canPublish=true,canSubscribe=true
# Paste the token into the Meet demo at https://meet.livekit.io
uv run ${CLAUDE_SKILL_DIR}/scripts/livekit.py egress-start \
--url ws://localhost:7880 --api-key devkey --api-secret secret \
--room test --type room-composite --output mp4 --dest ./out.mp4
uv run ${CLAUDE_SKILL_DIR}/scripts/livekit.py ingress-start \
--url ws://localhost:7880 --api-key devkey --api-secret secret \
--room test --type rtmp --identity obs-cam
Response contains url + streamKey — paste into OBS Stream settings.
uv run ${CLAUDE_SKILL_DIR}/scripts/livekit.py load-test \
--url ws://localhost:7880 --api-key devkey --api-secret secret \
--room bench --publishers 10 --subscribers 40 --duration 60s
uv run ${CLAUDE_SKILL_DIR}/scripts/livekit.py mint-token \
--api-key devkey --api-secret secret \
--room test --identity rec-bot --ttl 600 \
--grants roomJoin=true,canSubscribe=true,hidden=true,recorder=true
room.connectCause: token signature invalid, expired, wrong API key, or missing roomJoin grant.
Solution: re-mint with mint-token, verify API secret matches server config.
Cause: rtc.port_range_start..end UDP range blocked at firewall; no TCP fallback port.
Solution: open the UDP range publicly (50000-60000 by default), plus rtc.tcp_port.
Cause: talking to the wrong port (7880 is HTTP + WS), or Redis is required but unreachable.
Solution: check docker logs / server stdout for Redis errors.
Cause: Chromium failed to launch (missing libatk, libxss, libgbm on slim containers).
Solution: use the official egress image livekit/egress:latest which bundles deps.
Cause: old session not cleaned up; client using same identity. Solution: server will auto-kick the older session; ensure the client uses a fresh identity or reuse the existing token.
references/grants.md for the full VideoGrant / RoomAdmin grant catalog with per-flag permissions.references/deployment.md for the self-hosted stack (livekit-server, Redis, TURN via bundled Pion or coturn, egress + ingress sidecars, sample YAML).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
webrtc, livekit, sfu, realtime-communication, video-conferencing, voice-agents
npx claudepluginhub damionrashford/media-os --plugin media-os110 skills in this plugin
/audio-coreaudioManipulate macOS audio at the Core Audio HAL layer: afinfo (audio file metadata), afplay (play), afconvert (convert format/rate/bit-depth/channel layout), say (TTS), SwitchAudioSource (change default input/output/system device — brew install switchaudio-osx), audiodevice CLIs (npm/Go variants), AppleScript via osascript to drive System Preferences Sound. HAL plugins at /Library/Audio/Plug-Ins/HAL/ load virtual drivers (BlackHole 2ch/16ch/64ch, Loopback, Background Music). Aggregate Device (drift-corrected multi-in) and Multi-Output Device via Audio MIDI Setup.app or AudioHardwareCreateAggregateDevice. Use when the user asks to change default macOS audio device, route audio between apps on Mac, install BlackHole, build an Aggregate Device, convert audio files with afconvert, or script Mac audio from the terminal.
/audio-jackRoute professional low-latency audio with JACK Audio Connection Kit (jackaudio.org): jackd server (ALSA/CoreAudio/PortAudio/ASIO backends), jack_control (D-Bus JACK2 config), jack_lsp (list ports/connections), jack_connect/jack_disconnect (manage links), jack_cpu_load, jack_samplerate, jack_bufsize (runtime period size), jack_transport, jack_rec (multi-channel WAV recording), jack_iodelay (round-trip latency), jack_wait, jack_midi_dump. JACK1 C maintenance vs JACK2 C++ multicore. Modern Linux swaps jackd for PipeWire's libjack shim — same client API. JackTrip for uncompressed multichannel UDP over the Internet. Use when the user asks to run a JACK server, connect audio clients, measure roundtrip latency, record from JACK ports, set JACK period size, or bridge JACK over the network with JackTrip.
Other plugins' skills for the same job