sift-memory

sift-memory is a cursor rule for Cursor from roccodaffuso/sift. It costs 43 tokens per session (397 once invoked), scanned A, original, MIT.

A local-memory rule set that uses the sift command-line tool to search previous conversations from Claude Code, Codex, Cursor, and OpenCode. It can also show the surrounding details of selected results.

In plain words
What is it for?
For searching past coding-agent sessions by project, command, file, package, bug symptom, or decision, then reviewing relevant matching conversations.
Why use it?
It helps recover earlier decisions, implementation history, and project context instead of repeating work or guessing what was agreed.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions Claude Code; mentions Codex; mentions OpenCode.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node ./bin/sift.js index --json.

Good fit For searching past coding-agent sessions by project, command, file, package, bug symptom, or decision, then reviewing relevant matching conversations.

Compare 6 cursor rules from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/roccodaffuso/sift
agentmods
npx agentmods add rules/roccodaffuso/sift/sift-memory

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 sift-memory

README.md
[![agentmods](https://agentmods.dev/badge/rules/roccodaffuso/sift/sift-memory/github.svg)](https://agentmods.dev/rules/roccodaffuso/sift/sift-memory)
Your own site
<a href="https://agentmods.dev/rules/roccodaffuso/sift/sift-memory"><img src="https://agentmods.dev/badge/rules/roccodaffuso/sift/sift-memory/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 sift-memory

Your own site · 80×15
<a href="https://agentmods.dev/rules/roccodaffuso/sift/sift-memory"><img src="https://agentmods.dev/badge/rules/roccodaffuso/sift/sift-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 397 The whole file, excluding the scripts and references it only reads on demand.
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.00043 $0.00397
Opus 5.5 $0.00017 $0.00159
Sonnet 5.5 $0.00009 $0.00079
Haiku 4.5 $0.00004 $0.00040

Measured 1mo ago against content hash 2501f0c156c9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sift-memory 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 1mo 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.

.cursor/rules/sift-memory.mdc · 43 lines

What it actually says

Sift Memory

Use sift as local memory search for prior AI coding-assistant sessions.

Commands

Prefer the installed CLI:

sift index --json
sift "<query>" --limit 10 --json
sift "<query>" --tool codex --limit 10 --json
sift "<query>" --tool claude --limit 10 --json
sift "<query>" --tool cursor --limit 10 --json
sift "<query>" --tool opencode --limit 10 --json
sift show "<ref>" --json
sift list --limit 10 --json

When working inside the sift repo and the global command is unavailable, use:

node ./bin/sift.js index --json
node ./bin/sift.js "<query>" --limit 10 --json
node ./bin/sift.js show "<ref>" --json
node ./bin/sift.js list --limit 10 --json

Use sift index --full only when the user asks, parser/index behavior changed, or incremental results look stale.

Behavior

  • Search before answering when local session history could materially improve accuracy.
  • Use focused queries based on project names, command names, file names, bug symptoms, package names, or prior decisions.
  • Follow only relevant search refs with sift show when surrounding messages are needed.
  • Summarize only relevant findings. Do not paste large raw logs.
  • Keep the workflow local: no network calls, no telemetry, no sync, no writes to Claude Code, Codex, Cursor, or OpenCode source logs/databases.
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. 1mo ago First seen · 43 lines · 43 tokens per session scan A 2501f0c156c9

Subscribe to this mod's changes

sift-memory is a cursor rule published in the GitHub repository roccodaffuso/sift (4 stars, last pushed 2mo ago), licensed MIT. It adds 43 tokens to every session and 397 once invoked, about $0.0002 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.