webrtc

webrtc is a cursor rule for Cursor from AcKeskin/contexture. It costs 0 tokens per session (1,211 once invoked), scanned A, original, MIT.

A set of WebRTC data-channel rules for choosing delivery reliability, limiting message size, handling send-buffer pressure, and following channel open and close states. WebRTC is a browser technology for direct real-time communication between devices.

In plain words
What is it for?
It is for building real-time data channels such as state synchronisation, telemetry, and other browser-to-browser communication.
Why use it?
It helps avoid dropped or stalled messages, excessive memory use, and sends made before a connection is ready.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit It is for building real-time data channels such as state synchronisation, telemetry, and other browser-to-browser communication.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/ackeskin/contexture/webrtc
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/AcKeskin/contexture

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for webrtc

README.md
[![agentmods](https://agentmods.dev/badge/rules/ackeskin/contexture/webrtc/github.svg)](https://agentmods.dev/rules/ackeskin/contexture/webrtc)
Your own site
<a href="https://agentmods.dev/rules/ackeskin/contexture/webrtc"><img src="https://agentmods.dev/badge/rules/ackeskin/contexture/webrtc/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for webrtc

Your own site · 80×15
<a href="https://agentmods.dev/rules/ackeskin/contexture/webrtc"><img src="https://agentmods.dev/badge/rules/ackeskin/contexture/webrtc.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,211 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01211
Opus 5.5 $0.00000 $0.00484
Sonnet 5.5 $0.00000 $0.00242
Haiku 4.5 $0.00000 $0.00121

Measured today against content hash 8a84e5c0520f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

webrtc scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

cursor/rules/webrtc.mdc · 46 lines

How it starts

The opening of the file, as written. The whole thing — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Generated from architectural-rules/webrtc/ — do not hand-edit.

Data channels and reliability

Choose ordered/reliable vs unreliable per use case deliberately. Set maxRetransmits or maxPacketLifeTime (never both) for partial reliability; leave both unset only when full reliability is actually required. State sync wants reliable; real-time telemetry wants unreliable. (W3C WebRTC — RTCDataChannel / createDataChannel options)

Respect message-size limits: chunk large payloads to a ~16 KB ceiling for portable interop. Larger single messages are not portably supported across SCTP implementations and can stall or drop the channel. (W3C WebRTC — RTCDataChannel.send)

Handle backpressure: check bufferedAmount before sending and pause until the bufferedamountlow event when it exceeds bufferedAmountLowThreshold. Sending blind floods the SCTP send buffer, ballooning memory and latency. (W3C WebRTC — RTCDataChannel.bufferedAmount / bufferedAmountLowThreshold)

Drive sends off the channel's open/close lifecycle: only send while readyState === "open", and clean up listeners on close. Sending before open or after close throws or silently drops. (W3C WebRTC — RTCDataChannel.readyState)

Why: RTCDataChannel runs over SCTP, which exposes both reliability/ordering knobs and a finite send buffer, so the reliability mode and message size are application decisions that must be made on purpose, not defaulted into. Honoring the ~16 KB portable size ceiling, gating on bufferedAmount/bufferedamountlow for flow control, and respecting the open/close lifecycle prevents stalled channels, unbounded buffer growth, and dropped sends. Source: W3C WebRTC specification (RTCDataChannel).

Media and tracks

Manage transceivers explicitly: set addTransceiver direction (sendrecv/sendonly/recvonly/inactive) deliberately and stop transceivers you no longer need. Implicit m-line creation via addTrack hides direction and leaves dead media sections in the SDP. (W3C WebRTC — RTCRtpTransceiver.direction)

Read the full file on GitHub · 46 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 46 lines · 1,211 tokens per session scan A 8a84e5c0520f

Subscribe to this mod's changes

webrtc is a cursor rule published in the GitHub repository AcKeskin/contexture (2 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,211 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-27.