cursor-rules

cursor-rules is a cursor rule for coding agents from n0mad-ai/bastra-recall. It costs 2,438 tokens per session, scanned A, original, MIT.

A set of instructions for giving the coding agent persistent memory through the bastra-recall service, which stores and retrieves notes between sessions.

In plain words
What is it for?
Use it before editing files or making plans in an established codebase, and when checking past decisions or saving durable lessons. It also describes searching for relevant notes before writing new ones.
Why use it?
It helps prevent repeated mistakes and avoids rediscovering project facts, preferences, and earlier decisions.

Cursor rule

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.

agentmods
npx agentmods add rules/n0mad-ai/bastra-recall/cursor-rules
Clone the repo
git clone --depth 1 https://github.com/n0mad-ai/bastra-recall

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 cursor-rules

README.md
[![agentmods](https://agentmods.dev/badge/rules/n0mad-ai/bastra-recall/cursor-rules.svg)](https://agentmods.dev/rules/n0mad-ai/bastra-recall/cursor-rules)
Your own site
<a href="https://agentmods.dev/rules/n0mad-ai/bastra-recall/cursor-rules"><img src="https://agentmods.dev/badge/rules/n0mad-ai/bastra-recall/cursor-rules.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,438 This file is loaded in full into every session.
When invoked 2,438 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.02438 $0.02438
Opus 5 $0.01219 $0.01219
Sonnet 5 $0.00488 $0.00488
Haiku 4.5 $0.00244 $0.00244

Measured today against content hash da212645cc83, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

cursor-rules 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.

packages/skill/cursor-rules.mdc · 133 lines

How it starts

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

bastra-recall — autonomous teammate memory

You have a persistent memory across sessions via the bastra-recall MCP server. Treat it as YOUR own long-term memory, not as a tool the user has to invoke.

The single success metric: the user does not have to think for you anymore. Recurring mistakes don't recur. Stable preferences don't get re-stated. Project facts don't get re-discovered.

This file is triggers — WHEN to reach for the vault. The mechanics of each call (score bands, valence params, quality bars, admission rules) live in the tool descriptions, at the point of use. Anything not covered here is covered there.

Reflex order — RECALL first. The highest-frequency, highest-cost failure is skipping recall and re-deriving what the vault already holds. So the first reflex on every turn is RECALL: before acting, before any other lookup tool, and before the capture machinery below. When you're unsure whether a recall is worth it, recall.


When to RECALL — before acting, not only when prompted

Call recall(query, k=5) proactively in these moments:

Moment Query shape
Session start (once per session) "<project name> preferences user-preference active context" — preloads durable context
Before writing/editing a file "writing <filetype> at <path>, contains <topics>" — catches lessons before mistakes
Before a new coding block / plan in a feature area "<project> <feature/area> current state files architecture" — which files matter, what's already built (→ topology.md)
Before a multi-step plan or recommendation "giving plan/recommendation for <topic>" — surfaces format preferences
Before asserting a number, a measurement or project history in text meant for anyone else — a reply, release notes, a changelog entry, an issue comment, docs the claim itself: "<project> <what is being claimed> measured"
User asks for retrieval / lookup ("find...", "where is...", "how much was...", "when did...", "do I have a...", "such mal meinen...") the prompt itself + direct nouns — ALWAYS before any other search tool
User prompt touches a stored topic the prompt itself, optionally with project context
Before save_memory the title/topic — duplicate check

Read the full file on GitHub · 133 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 Changed · +2 lines · +40 tokens per session da212645cc83
  2. yesterday Changed · +64 lines · +1,655 tokens per session 992ed6f76e65
  3. 5d ago First seen · 67 lines · 743 tokens per session scan A eda784c6d517

Subscribe to this mod's changes

cursor-rules is a cursor rule published in the GitHub repository n0mad-ai/bastra-recall (9 stars, last pushed today), licensed MIT. It adds 2,438 tokens to every session, about $0.0122 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.