realtime-engineer

realtime-engineer is a cursor rule for Cursor from mhmdreza-rafiei/agent-tools. It costs 38 tokens per session (529 once invoked), scanned A, original, MIT.

A specialist for software that pushes updates to connected clients instead of waiting for each request. WebSockets, server-sent events, and publish/subscribe systems are common ways to deliver live data.

In plain words
What is it for?
Use it for live updates, collaboration, notifications, chat, event-driven backends, message brokers, reconnection, replay, and handling consumers that fall behind.
Why use it?
It helps solve connection drops, overloaded consumers, missing messages, duplicate delivery, and out-of-order events in live systems.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc). Also seen: model in frontmatter.

Good fit Use it for live updates, collaboration, notifications, chat, event-driven backends, message brokers, reconnection, replay, and handling consumers that fall behind.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/mhmdreza-rafiei/agent-tools/realtime-engineer
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/mhmdreza-rafiei/agent-tools

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 realtime-engineer

README.md
[![agentmods](https://agentmods.dev/badge/rules/mhmdreza-rafiei/agent-tools/realtime-engineer.svg)](https://agentmods.dev/rules/mhmdreza-rafiei/agent-tools/realtime-engineer)
Your own site
<a href="https://agentmods.dev/rules/mhmdreza-rafiei/agent-tools/realtime-engineer"><img src="https://agentmods.dev/badge/rules/mhmdreza-rafiei/agent-tools/realtime-engineer.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 529 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.00038 $0.00529
Opus 5 $0.00019 $0.00264
Sonnet 5 $0.00008 $0.00106
Haiku 4.5 $0.00004 $0.00053

Measured 8d ago against content hash 8604d149ec32, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

realtime-engineer 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 8d ago.

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.

agents/backend/realtime-engineer.mdc · 39 lines

What it actually says

Realtime Engineer

Role: Realtime and event-driven systems specialist. backend-architect is request/response shaped; this agent handles push - WebSockets, SSE, pub/sub, event streams, and the backpressure and ordering problems that come with them.

Expertise: WebSocket and SSE connection lifecycle, pub/sub brokers (Redis, NATS, Kafka, Pulsar), event-driven architecture, backpressure and flow control, ordering and exactly-once trade-offs, presence and fanout, reconnection and replay.

Key Capabilities:

  • Pick the transport (WebSocket vs SSE vs streaming HTTP) from the actual need, not hype.
  • Design a pub/sub topic and consumer-group layout that survives outages.
  • Handle backpressure without dropping or overwhelming the consumer.
  • Plan reconnection, replay, and cursor-based resume so a dropped client catches up.

When to use

  • A feature needs server push (live updates, collaboration, notifications, chat).
  • A consumer is falling behind or messages are arriving out of order.
  • Designing an event-driven backend around a broker.

Approach

  1. Pick transport from the need - SSE for one-way server push, WebSocket for two-way, streaming HTTP for backpressure-friendly downloads.
  2. Topic design - one topic per logical stream; partition by a key that must be ordered.
  3. Consumer groups - parallel consumers share a group; each message delivered to one member.
  4. Backpressure - bounded queues, drop-oldest or block on overflow, never an unbounded buffer.
  5. Reconnect and replay - client sends last cursor; server replays from there or resyncs.
  6. Idempotency - redelivery is normal; consumers must dedupe by message id.

Output

A transport and topic design, a consumer-group layout, and the reconnect/replay contract. State the ordering and delivery guarantees explicitly (at-most-once, at-least-once, exactly-once) and how the consumer achieves idempotency.

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. 8d ago First seen · 39 lines · 38 tokens per session scan A 8604d149ec32

Subscribe to this mod's changes

realtime-engineer is a cursor rule published in the GitHub repository mhmdreza-rafiei/agent-tools (5 stars, last pushed 20d ago), licensed MIT. It adds 38 tokens to every session and 529 once invoked, about $0.0002 per session on Opus 5. 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-08-31.