cursor-rules

cursor-rules is a cursor rule for Cursor from n0mad-ai/bastra-recall. It costs 4,020 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 for Cursor

Written for Cursor: a Cursor rule (.mdc). Also seen: mentions CLAUDE.md; names the AskUserQuestion tool.

Good fit 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.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/n0mad-ai/bastra-recall/cursor-rules
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/n0mad-ai/bastra-recall

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

README.md
[![agentmods](https://agentmods.dev/badge/rules/n0mad-ai/bastra-recall/cursor-rules/github.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/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 cursor-rules

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,020 This file is loaded in full into every session.
When invoked 4,020 The same file — it is already loaded in full.
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.04020 $0.04020
Opus 5.5 $0.01608 $0.01608
Sonnet 5.5 $0.00804 $0.00804
Haiku 4.5 $0.00402 $0.00402

Measured today against content hash 86535c70271d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 · 169 lines

How it starts

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

bastra-recall — autonomous teammate memory

Use bastra-recall as persistent working context. At session start and before a new task type, resolve applicable saved conventions. Apply fully delivered, current rules; use load_memory for missing content by ID. Bind rules to source ID, revision, scope and task state. Re-resolve after context or rule changes. Judge the delivered result against applicable rules, not search/load counts. Current user instructions retain authority within the host hierarchy.

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 · 169 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 · -1 tokens per session 86535c70271d
  2. yesterday Changed · +4 lines · +109 tokens per session c513b644e84e
  3. 13d ago Changed · +191 tokens per session 3b12eea4c605
  4. 18d ago Changed · +1 lines · +207 tokens per session 0a74f1ad22d8
  5. 20d ago Changed · +10 lines · +315 tokens per session ce3e653528ea
  6. 27d ago Changed · +22 tokens per session 32e873315bfc
  7. 29d ago Changed · +1 tokens per session ee921de4fcbc
  8. 1mo ago Changed · +2 lines · +141 tokens per session bdbce8f71032
  9. 1mo ago Changed · +3 lines · +162 tokens per session 2197ed65896a
  10. 1mo ago First seen · 149 lines · 2,873 tokens per session scan A 835d1bd04d3f

Subscribe to this mod's changes

cursor-rules is a cursor rule published in the GitHub repository n0mad-ai/bastra-recall (12 stars, last pushed today), licensed MIT. It adds 4,020 tokens to every session, about $0.0161 per session on Opus 5.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.