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.
git clone --depth 1 https://github.com/golid-ai/golidWrote 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.
[](https://agentmods.dev/rules/golid-ai/golid/sse-realtime)<a href="https://agentmods.dev/rules/golid-ai/golid/sse-realtime"><img src="https://agentmods.dev/badge/rules/golid-ai/golid/sse-realtime/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.
<a href="https://agentmods.dev/rules/golid-ai/golid/sse-realtime"><img src="https://agentmods.dev/badge/rules/golid-ai/golid/sse-realtime.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00611 |
| Opus 5 | $0.00000 | $0.00305 |
| Sonnet 5 | $0.00000 | $0.00122 |
| Haiku 4.5 | $0.00000 | $0.00061 |
Grade A, and why
sse-realtime 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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SSE / Real-Time Patterns
Thesis: SSE uses one-time ticket auth (never JWT in URLs), per-user buffered channels, and frontend reconnect with exponential backoff.
Hub Architecture
SSEHub is a singleton created in wire.BuildServices (internal/wire/services.go). Per-user channel sets with buffered channels (16). Non-blocking sends — if a client's buffer is full, the event is dropped (logged as warning). Max 5 connections per user prevents resource exhaustion.
// in wire.BuildServices:
sseHub := sse.NewSSEHub(cfg.SSETicketTTL)
// Pass to handler and any service that needs to push events
main.go shuts down the hub after HTTP drain: svcs.SSEHub.Shutdown().
Ticket Auth (not JWT in URL)
EventSource can't set Authorization headers. Never put JWTs in URLs (they leak into logs). Use one-time tickets:
- Client calls
POST /api/v1/events/ticketwith JWT auth → gets a 30s single-use ticket - Client opens
EventSource("/api/v1/events/stream?ticket=<ticket>") - Server validates and burns the ticket, begins streaming
The stream endpoint is on the public API group (not behind JWT middleware) — it uses ticket auth directly.
Keepalive
Send : keepalive\n\n every 30 seconds. Cloud Run closes idle connections at 15 minutes.
Frontend Reconnect
On disconnect: refresh access token first (it may have expired), request a new ticket, reconnect with exponential backoff (1s → 2s → 4s → max 30s). Reset backoff on successful connect.
Scaling Limitation
The hub is in-memory — all connected clients must be on the same instance. For multi-instance deployments, add a pub/sub layer (Redis, NATS). Send() and Broadcast() are the integration points.
Adding New Event Types
Backend — publish from any service:
sseHub.Send(userID, sse.SSEEvent{
Event: "order_updated",
Data: map[string]any{"order_id": orderID, "status": newStatus},
})
Frontend — register a typed handler:
onSSEEvent<OrderUpdate>("order_updated", (data) => {
toast.info(`Order ${data.order_id} is now ${data.status}`);
});
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.
- 9d ago First seen · 67 lines · 0 tokens per session scan A 86897298823b
sse-realtime is a cursor rule published in the GitHub repository golid-ai/golid (40 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 611 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-08-30.
Other cursor rules, from other repositories
backend
You are an expert in Go, Gin, Gorm, Gen, Cosy (https://cosy.uozi.org/) with a deep understanding of best practices and performance optimization techniques in these technologies.
windmill-overview
Windmill is an open-source developer platform for building internal tools, API integrations, background jobs, workflows, and user interfaces. It offers a unified system where scripts are automatically turned into sharable UIs and can be composed into flows or embedded in custom applications.
cursor_rules
Document Go HTTP APIs with go-swagger3 godoc annotations and generate OpenAPI 3 specs.
server-actions
Server Action, service and tenancy contract.
cursor-rule-template
A Cursor rule template for gospec, a set of software-development rules for Go backends. It routes different tasks to the relevant architecture, API, data, security, testing, and migration guidance.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.