cursorrules

A workspace instruction file that tells a coding agent to keep notes between work sessions using NeuralMemory, a persistent memory system.

In plain words
What is it for?
Use it to restore context at the start of a session and record important project information while working.
Why use it?
It reduces repeated explanations and helps the agent resume earlier decisions, bugs, preferences, facts, and tasks.

Cursor rule for Cursor

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/nhadaututtheky/neural-memory/cursorrules
Clone the repo
git clone --depth 1 https://github.com/nhadaututtheky/neural-memory

Made for: Cursor.

Per session 917 This file is loaded in full into every session.
When invoked 917 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 $0.00917 $0.00917
Opus 5 $0.00458 $0.00458
Sonnet 5 $0.00183 $0.00183
Haiku 4.5 $0.00092 $0.00092

Measured 2d ago against content hash c395624f03aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cursorrules 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 2d 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.

docs/agent-instructions/.cursorrules · 100 lines

How it starts

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

Memory System — NeuralMemory

This workspace uses NeuralMemory for persistent memory across sessions. You have access to nmem_* MCP tools. Use them PROACTIVELY.

Session Start (ALWAYS)

  1. nmem_recap() — Resume context from last session
  2. nmem_context(limit=20) — Load recent memories
  3. nmem_session(action="get") — Check current task/feature/progress

If gap_detected is true, run nmem_auto(action="flush", text="<recent context>") to recover.

During Work — Auto-Remember

When a DECISION is made: nmem_remember(content="Decision: ...", type="decision", priority=7, tags=["project-name"])

When a BUG is fixed: nmem_remember(content="Fixed: ... by ...", type="error", priority=7)

When user states a PREFERENCE: nmem_remember(content="User prefers ...", type="preference", priority=6)

When a FACT is learned: nmem_remember(content="...", type="fact", priority=5)

When a TODO is identified: nmem_todo(task="...", priority=6)

During Work — Recall Before Asking

ALWAYS check memory before asking the user a question: nmem_recall(query="", depth=1)

Depth: 0=instant, 1=context (default), 2=patterns, 3=deep traversal.

Session End

nmem_auto(action="process", text="") nmem_session(action="set", feature="...", task="...", progress=0.8)

Emergency Flush (before context reset)

nmem_auto(action="flush", text="")

Codebase Indexing (first time)

nmem_index(action="scan", path="./src")

After indexing, nmem_recall finds related code through the neural graph.

Project Context

nmem_eternal(action="save", project_name="MyApp", tech_stack=["React", "Node.js"]) nmem_eternal(action="save", decision="Use Redis", reason="Low latency caching")

Ephemeral Memories

For scratch notes, debugging context, or temporary reasoning: nmem_remember(content="...", ephemeral=true)

Auto-expires after 24h, never synced, excluded from consolidation. Filter them out: nmem_recall(query="...", permanent_only=true)

Read the full file on GitHub · 100 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. 2d ago First seen · 100 lines · 917 tokens per session scan A c395624f03aa

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository nhadaututtheky/neural-memory (240 stars, last pushed 17d ago), licensed MIT. It adds 917 tokens to every session, about $0.0046 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-30.