cursor-rule-snippet

A set of Cursor editor rules for managing memory across coding sessions. Cursor is a code editor, and memory files store project decisions, preferences, and past lessons.

In plain words
What is it for?
Use it to initialize sessions, recall relevant history, handle explicit remember or reflect requests, and follow project or personal principles.
Why use it?
It tells the agent when to load relevant project or personal context and when a simple task does not need it.

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/wufunc/nova/cursor-rule-snippet
Clone the repo
git clone --depth 1 https://github.com/wufunc/nova
Per session 534 This file is loaded in full into every session.
When invoked 534 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.00534 $0.00534
Opus 5 $0.00267 $0.00267
Sonnet 5 $0.00107 $0.00107
Haiku 4.5 $0.00053 $0.00053

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

Security

Grade A, and why

cursor-rule-snippet 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.

templates/cursor-rule-snippet.mdc · 51 lines

How it starts

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

Memory Management

Session Initialization

At the start of each session:

  1. Read ~/.nova/constitution.md - personal principles and constraints
  2. Read .nova/constitution.md - project principles and constraints
  3. Judge whether the task needs memory context. Load memory for non-trivial, multi-step, multi-file, history-sensitive, preference-sensitive, or uncertain work. Skip session memory for simple self-contained tasks that can be completed safely from the user's message and immediate local context.
  4. When memory is needed, perform ALL of these in parallel:
    • Read ~/.nova/memory/user.md - user identity and collaboration preferences
    • Read .nova/memory/arch.md - project architecture overview
    • Read ~/.nova/memory/memory.md - curated long-term personal memory
    • /memory recall - search relevant experience from project history (DevLog, ADR) and personal notes based on the user's request
  5. If you initially skip memory loading and later realize more context is needed, load it before proceeding.

If a file doesn't exist, skip it.

Snapshot memory is not part of this on-demand durable path. Only use /memory snapshot-recall when the user explicitly asks to search historical sessions or past Q&A.

Explicit Remember

When the user explicitly asks you to remember something ("remember this", "请记住", "以后默认", "别忘了"), execute /memory remember.

This path must first inspect user.md, memory.md, and relevant notes/. If the requested memory is clearly project-related, also inspect project arch.md, ADR, and DevLog before writing.

Reflect

Use /memory reflect to capture insights from non-coding sessions (research, troubleshooting, system administration).

Constitution Protocol

CRITICAL: You MUST read constitution files to understand governing principles before proposing or implementing any solution:

  1. ~/.nova/constitution.md - personal principles (if exists)
  2. .nova/constitution.md - project principles (if exists)

Read the full file on GitHub · 51 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 · 51 lines · 534 tokens per session scan A 39e9e3481426

Subscribe to this mod's changes

cursor-rule-snippet is a cursor rule published in the GitHub repository wufunc/nova (2 stars, last pushed 4mo ago), licensed MIT. It adds 534 tokens to every session, about $0.0027 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.