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.
npx agentmods add rules/lawofall/agentcore/memorygit clone --depth 1 https://github.com/Lawofall/AgentCoreWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00061 | $0.00503 |
| Opus 5 | $0.00030 | $0.00251 |
| Sonnet 5 | $0.00012 | $0.00101 |
| Haiku 4.5 | $0.00006 | $0.00050 |
Grade A, and why
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 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.
What it actually says
AI 操作记忆沉淀
把开发中发现的、跨会话复现、对下一个 AI 有省时价值的操作型知识主动写进文档,免得下一个 AI 从零摸索。
何时沉淀
判据:下一个 AI 不读这条,会不会重复踩坑 / 重复摸索很久?
- 会(高复现 + 高摸索成本)→ 沉淀。
- 读代码顺手就有 → 不沉淀。
正例:「环境必须先 X 再 Y,否则报 Z」「这类排查用这条命令/脚本」「某操作有隐藏前置依赖」。 反例:某功能的实现步骤、函数签名、框架标准用法(读代码可得)。
沉淀到哪
- 可复用脚本/命令/排查配方/环境坑 →
.cursor/rules/{关注点}.mdc(AI 直接消费);复杂细节落docs/,rules 只短引用。 - 架构/设计/为什么这么做 →
docs/对应文档的「决策记录」小节。 - 优先追加进已有规则/文档,主题相关就别新建文件。
怎么写
- 可直接照做:命令可复制、路径用项目根相对路径、坑点按「症状 → 原因 → 对策」。
- 只写代码看不出来的(承接
dev-process.mdc内容策略);行为规则 ≤50 行,实现细节下沉 docs。
防膨胀(硬约束)
- 沉淀前先搜同主题条目,有则合并,不新增文件。
- 过时 / 被替代的记忆立即改或删,不留废弃条目。
- 记忆是高价值精选,不是流水账;宁缺毋滥。
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.
- yesterday First seen · 36 lines · 61 tokens per session scan A 15ca4c9d1e8f
memory is a cursor rule published in the GitHub repository Lawofall/AgentCore (78 stars, last pushed 2d ago), licensed MIT. It adds 61 tokens to every session and 503 once invoked, about $0.0003 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.
Other cursor rules, from other repositories
code-patterns
Python code style and recurring patterns (config, logging, errors, paths).
project-overview
Core project architecture, patterns, and conventions for the AI Documentation Generator.
cursorrules
You are an AI agent building the module: {{MODULENAME}} This module is part of the Mnemosyne Neural OS ecosystem by XPACEGEMS LLC.
backend-python
Python and FastAPI standards for the backend.
core-project-context
Canonical project context and ownership rules.
dashboard-typescript
React and TypeScript standards for the operator dashboard.