Webrtc spec

From damionrashford/media-os · View interactive version

Webrtc spec is an AI agent skill from the GitHub repository damionrashford/media-os. Search and fetch WebRTC specs from W3C and IETF: W3C WebRTC 1.0 (RTCPeerConnection, RTCRtpSender/Receiver/Transceiver, RTCDataChannel, RTCDtlsTransport, RTCIceTransport, RTCSctpTransport, RTCStatsReport), WebRTC-Extensions (simulcast, encoded transforms), WebRTC Stats, Media Capture and Streams (get

How to use this skill

Skill file

webrtc-spec

Context: $ARGUMENTS

Search and fetch W3C + IETF WebRTC specifications. A companion to webrtc-pion, webrtc-mediasoup, webrtc-livekit — this skill is your source-of-truth for what the wire protocol and browser API actually require.

Quick start

When to use

Step 1 — Page catalog

uv run ${CLAUDE_SKILL_DIR}/scripts/webrtcdocs.py list-pages

Top picks:

| Question | Page |

|------------------------------------------------|------------------------------------|

| "What's the signature of addTransceiver?" | w3c-webrtc |

| "What does a=msid mean?" | rfc-8866 |

| "How does ICE gather candidates?" | rfc-8445 |

| "What's in JSEP?" | rfc-9429 (obsoletes 8829) |

| "How is DTLS-SRTP negotiated?" | rfc-5764 |

| "What's the WHIP protocol?" | rfc-9725 |

| "How does simulcast work in SDP?" | rfc-8853 |

| "What's a rid?" | rfc-8851 |

| "getUserMedia constraints?" | w3c-mediacapture-streams |

| "Screen-capture permission model?" | w3c-screen-capture |

| "WebCodecs frame formats?" | w3c-webcodecs |

Full catalog in CODE0.

Step 2 — Search

uv run ${CLAUDE_SKILL_DIR}/scripts/webrtcdocs.py search --query "rtcp-fb" --limit 5
uv run ${CLAUDE_SKILL_DIR}/scripts/webrtcdocs.py search --query "a=candidate" --page rfc-8866

Hits print page:line — heading, the canonical URL, and ±3 lines of context. First run fetches + caches; subsequent runs are instant.

Step 3 — Read one section

uv run ${CLAUDE_SKILL_DIR}/scripts/webrtcdocs.py section --page rfc-8866 --id 5
uv run ${CLAUDE_SKILL_DIR}/scripts/webrtcdocs.py section --page w3c-webrtc --id dom-rtcpeerconnection

--id accepts either a heading keyword or a numeric section like 5.13.

Step 4 — Fetch a whole page

Rarely needed — search + section is usually enough. Use for offline copies:

uv run ${CLAUDE_SKILL_DIR}/scripts/webrtcdocs.py fetch --page rfc-9725 --format text

Step 5 — Print the RFC table

uv run ${CLAUDE_SKILL_DIR}/scripts/webrtcdocs.py list-rfcs

Prints each RFC in the catalog with its number, short title, and canonical URL. Same data also in references/rfc-index.md for inline reading.

Step 6 — Prime the cache

uv run ${CLAUDE_SKILL_DIR}/scripts/webrtcdocs.py index

Fetches every known page to ~/.cache/webrtc-spec/. Override with WEBRTC_DOCS_CACHE=/path env.

Gotchas

Examples

Example 1 — "What does `a=setup` mean?"

uv run ${CLAUDE_SKILL_DIR}/scripts/webrtcdocs.py search --query "a=setup" --page rfc-8843

Cite RFC 8843 §5 ("Role-less" ICE handling) — a=setup:actpass|active|passive|holdconn.

Example 2 — "Is trickle ICE standardized?"

uv run ${CLAUDE_SKILL_DIR}/scripts/webrtcdocs.py search --query "trickle" --limit 5

Points at RFC 8838.

Example 3 — "What are valid RTCP feedback types?"

uv run ${CLAUDE_SKILL_DIR}/scripts/webrtcdocs.py search --query "rtcp-fb" --limit 10

Scope to rfc-8866 (syntax) and rfc-5104 (AVPF — referenced but not in our catalog).

Example 4 — "What's WHIP's authentication model?"

uv run ${CLAUDE_SKILL_DIR}/scripts/webrtcdocs.py section --page rfc-9725 --id 4

Section 4 — Bearer tokens, one-time POST to ingestion URL, 201 + Location header.

Example 5 — "Where is `createOffer` defined?"

uv run ${CLAUDE_SKILL_DIR}/scripts/webrtcdocs.py search --query "createOffer" --page w3c-webrtc

Troubleshooting

`unknown page: foo`

Cause: typo'd name.

Solution: list-pages to see valid names. Common mistake: sdp — use rfc-8866.

`urlopen error [SSL: CERTIFICATE_VERIFY_FAILED]`

Cause: out-of-date system CAs.

Solution: install/update certifi or run the macOS Install Certificates.command. Don't disable SSL verification.

Search returns nothing

Cause: wrong page or term is in a sibling RFC not in our catalog.

Solution: drop --page, try broader term, or check list-rfcs for adjacent RFCs.

Results look truncated

Cause: text extraction flattens complex IETF tables.

Solution: open the canonical URL printed in the hit — that's the authoritative view.

Reference docs

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.