fetching-data-with-controllers

fetching-data-with-controllers is a cursor rule for Cursor from nostr-reader/boris. It costs 6 tokens per session (201 once invoked), scanned A, a copy of fetching-data-with-controllers, MIT.

A set of rules for fetching data from Nostr relays, which are servers that exchange records in the Nostr network. It describes streaming results, using local relays first, and keeping local data updated.

In plain words
What is it for?
Use it when building controller-based reads from Nostr relays, including deduplication, stale-request cancellation, offline writes, and saving fetched data locally.
Why use it?
It prevents slow or inconsistent loading by showing local data immediately, fetching remote data in parallel, and finishing when relays report that their results are complete.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when building controller-based reads from Nostr relays, including deduplication, stale-request cancellation, offline writes, and saving fetched data locally.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/nostr-reader/boris/fetching-data-with-controllers
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/nostr-reader/boris

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 fetching-data-with-controllers

README.md
[![agentmods](https://agentmods.dev/badge/rules/nostr-reader/boris/fetching-data-with-controllers/github.svg)](https://agentmods.dev/rules/nostr-reader/boris/fetching-data-with-controllers)
Your own site
<a href="https://agentmods.dev/rules/nostr-reader/boris/fetching-data-with-controllers"><img src="https://agentmods.dev/badge/rules/nostr-reader/boris/fetching-data-with-controllers/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 fetching-data-with-controllers

Your own site · 80×15
<a href="https://agentmods.dev/rules/nostr-reader/boris/fetching-data-with-controllers"><img src="https://agentmods.dev/badge/rules/nostr-reader/boris/fetching-data-with-controllers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 201 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 100% copy Near-identical to another mod 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.00006 $0.00201
Opus 5.5 $0.00002 $0.00080
Sonnet 5.5 $0.00001 $0.00040
Haiku 4.5 $0.00001 $0.00020

Measured 4d ago against content hash 522ca9e490ee, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

fetching-data-with-controllers 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 4d 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.

Origin

This is a copy

100% identical to fetching-data-with-controllers — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.cursor/rules/fetching-data-with-controllers.mdc · 22 lines

What it actually says

Fetching Data with Controllers

We fetch data from relays using controllers:

  • Start controllers immediatly; don't await.
  • Stream via onEvent; dedupe replaceables; emit immediately.
  • Parallel local/remote queries; complete on EOSE.
  • Finalize and persist since after completion.
  • Guard with generations to cancel stale runs.
  • UI flips off loading on first streamed result.

We always include and prefer local relays for reads; optionally rebroadcast fetched content to local relays (depending on setting); and tolerate local‑only mode for writes (queueing for later).

Since we are streaming results, we should NEVER use timeouts for fetching data. We should always rely on EOSE.

In short: Local-first hydration, background network fetch, reactive updates, and replaceable lookups provide instant UI with eventual consistency. Use local relays as local data store for everything we fetch from remote relays.

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. 4d ago First seen · 22 lines · 6 tokens per session scan A 522ca9e490ee

Subscribe to this mod's changes

fetching-data-with-controllers is a cursor rule published in the GitHub repository nostr-reader/boris (19 stars, last pushed 7d ago), licensed MIT. It adds 6 tokens to every session and 201 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to fetching-data-with-controllers, differing in 0 lines, and is treated as a copy.

Related

fetching-data-with-controllers compared with cursor rules from other repositories

fetching-data-with-controllers next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
fetching-data-with-controllersnostr-reader/borisCursor rule197d agoMITA6Cursor
fetching-data-with-controllersdergigi/borisCursor rule191mo agoMITA6Cursor
zaps-and-zap-splitsdergigi/borisCursor rule191mo agoMITA8Cursor
nostr-native-blog-post-aka-long-form-kinddergigi/borisCursor rule191mo agoMITA22Cursor
web-bookmarksdergigi/borisCursor rule191mo agoMITA13Cursor
bookmarksdergigi/borisCursor rule191mo agoMITA27Cursor
mobile-first-ui-uxdergigi/borisCursor rule191mo agoMITA6Cursor