cursor

A setup for Cursor, a coding editor with an AI assistant, that adds persistent project-memory instructions. It records context, file changes, future tasks, and session summaries for later chats.

In plain words
What is it for?
Use it to install the Cursor rule, bootstrap context from Git history, log edits and to-dos, and recap work at the end of a session.
Why use it?
It reduces the context lost when a new coding session starts by carrying forward useful information from earlier work.

Agent

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 agents/rustkit-ai/aimemo/cursor
Clone the repo
git clone --depth 1 https://github.com/rustkit-ai/aimemo
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 756 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00756
Opus 5 $0.00000 $0.00378
Sonnet 5 $0.00000 $0.00151
Haiku 4.5 $0.00000 $0.00076

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

Security

Grade A, and why

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

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/agents/cursor.md · 123 lines

How it starts

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

aimemo × Cursor

Cursor reads rules from .cursor/rules/ automatically. aimemo setup writes a rule file with alwaysApply: true that instructs Cursor to maintain the memory loop: inject context at session start, log after file edits, recap at session end.


Setup

Run once in your project root:

aimemo setup --cursor

Then bootstrap from your git history so the agent has context from day one:

aimemo bootstrap

What gets written

.cursor/rules/aimemo.mdc:

---
description: aimemo persistent memory instructions
alwaysApply: true
---

## aimemo — persistent memory
- At session start: run `aimemo inject --cursor` to load context from previous sessions
- After modifying any file: run `aimemo log "modified {filename}: {one-line reason}"`
- When you identify something to fix later: run `aimemo log "todo: {description}"`
- At session end: run `aimemo recap "{what was done} — next: {what comes next}"` then `aimemo inject --cursor`

<!-- aimemo:start -->
## aimemo context
last: (no entries yet)
<!-- aimemo:end -->

Because alwaysApply: true is set, Cursor loads this rule file in every chat and Composer session automatically.


The session loop

Open Cursor
      │
      ▼
Cursor loads .cursor/rules/aimemo.mdc  (alwaysApply: true)
      │
      ▼
Agent runs: aimemo inject --cursor
      │  (updates the context block in aimemo.mdc)
      ▼
Agent reads the context — knows where it left off
      │
      ▼
You work — agent logs after each file edit:
  aimemo log "modified src/payments/service.rs: added idempotency keys"
  aimemo log "todo: write integration test for duplicate charge case"
      │
      ▼
At session end:
  aimemo recap "added idempotency to payment service — next: integration tests"
  aimemo inject --cursor
      │
      ▼
Next session starts with full context

What the context block looks like

## aimemo context
recap (2026-03-15): "added idempotency to payment service — next: integration tests"
recent (2026-03-15): "modified src/payments/service.rs: added idempotency keys"
todo: write integration test for duplicate charge case
recent tags: payments · idempotency

Read the full file on GitHub · 123 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. yesterday First seen · 123 lines · 0 tokens per session scan A f50200becf5b

Subscribe to this mod's changes

cursor is an agent published in the GitHub repository rustkit-ai/aimemo (4 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 756 tokens. 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.