fetching-data-with-controllers

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

A project rule for fetching data from Nostr relays, which are servers that store and forward Nostr data, through controller objects.

In plain words
What is it for?
It guides relay reads and writes, local caching, streaming updates, duplicate replacement, background network fetching, and queued offline writes.
Why use it?
It defines how local and remote results are combined, streamed, deduplicated, saved, and cancelled so the interface can show data quickly without timeout-based guesses.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit It guides relay reads and writes, local caching, streaming updates, duplicate replacement, background network fetching, and queued offline writes.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/dergigi/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/dergigi/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/dergigi/boris/fetching-data-with-controllers/github.svg)](https://agentmods.dev/rules/dergigi/boris/fetching-data-with-controllers)
Your own site
<a href="https://agentmods.dev/rules/dergigi/boris/fetching-data-with-controllers"><img src="https://agentmods.dev/badge/rules/dergigi/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/dergigi/boris/fetching-data-with-controllers"><img src="https://agentmods.dev/badge/rules/dergigi/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 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.00006 $0.00201
Opus 5 $0.00003 $0.00101
Sonnet 5 $0.00001 $0.00040
Haiku 4.5 $0.00001 $0.00020

Measured 3d ago against content hash 522ca9e490ee, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 3d 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.

.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. 3d 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 dergigi/boris (17 stars, last pushed yesterday), licensed MIT. It adds 6 tokens to every session and 201 once invoked, about $0.0000 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-09-09.

Related

Other cursor rules, from other repositories

dreamd-recall

Recall lessons, decisions, and prior context from the .agent/ memory daemon. Use when starting work in a project that has a .agent/ folder, when the user references a past decision, or when you are about to make a choice that has a documented prior.

botzrDev/dreamd · 54 tokens

solana-integration-constraints

Constraints and requirements for Solana integration with MetaMask Connect — wallet adapter config, CAIP-2 IDs, network support per platform, RPC routing, and platform limitations.

MetaMask/metamask-connect-cursor-plugin · 1,207 tokens

elizaos_v2_onchain_plugins

┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐ │ Wallet Provider│ │ Connection Mgmt │ │ Transaction Svc │ │ - Private Keys │───▶│ - RPC Endpoints │───▶│ - Tx Construction│ │ - Public Keys │ │ - Network Config │ │ - Fee Estimation│ │ - Signatures │ │ - Health Check │ │ - Broadcasting │ └─────────────────┘…

AIFlowML/cursor_rules · 0 tokens

solana_core_architecture

┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐ │ Entry Point │ │ Instruction │ │ Account │ │ lib.rs │───▶│ Processing │───▶│ Validation │ │ │ │ │ │ │ │ - entrypoint! │ │ - Route dispatch │ │ - Owner checks │ │ - processinst │ │ - Deserialize │ │ - Data validate │.

AIFlowML/cursor_rules · 4 tokens

ponytail

Ponytail, lazy senior dev mode. Always pick the simplest solution that works.

DietrichGebert/ponytail · 576 tokens

angular-20

This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.

angular/angular · 0 tokens