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/mr-chen-05/rules-2.1-optimized/context-recorder-advancedgit clone --depth 1 https://github.com/Mr-chen-05/rules-2.1-optimizedWrote 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.
[](https://agentmods.dev/rules/mr-chen-05/rules-2.1-optimized/context-recorder-advanced)<a href="https://agentmods.dev/rules/mr-chen-05/rules-2.1-optimized/context-recorder-advanced"><img src="https://agentmods.dev/badge/rules/mr-chen-05/rules-2.1-optimized/context-recorder-advanced.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.02877 |
| Opus 5 | $0.00000 | $0.01438 |
| Sonnet 5 | $0.00000 | $0.00575 |
| Haiku 4.5 | $0.00000 | $0.00288 |
Grade A, and why
context-recorder-advanced 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 405 lines — stays where its author put it; the contents beside it link to each section on GitHub.
⚡ Context Recorder Advanced (记录员高级功能)
模块说明: 本文件包含性能优化、智能增强和高级功能配置
相关模块
context-recorder-core.mdc- 核心定义和主要规则context-recorder-templates.mdc- 模板定义context-recorder-edge-cases.mdc- 边界情况处理
智能化增强功能
项目类型自动识别
```yaml 检测规则: 文件结构分析: - package.json → frontend - pom.xml → backend - pyproject.toml → python - Cargo.toml → rust
技术栈识别: - React/Vue → frontend - Spring/Django → backend - Express → backend - Next.js → fullstack
目录结构: - src/components → frontend - src/main/java → backend - src/pages → frontend - api/ → backend
自动配置:
- 根据项目类型加载对应模板区块
- 设置合适的归档策略和触发条件
- 配置相关的集成工具和监控指标 ```
智能标签系统
```yaml 自动标签生成: 技术标签: - 基于依赖文件分析 - 识别主要框架和库 - 标记编程语言
状态标签: - 基于项目进度 - 活动频率分析 - 开发阶段识别
团队标签: - 提交记录分析 - 协作模式识别 - 团队规模评估
标签管理:
- 动态更新: 随项目发展自动调整
- 权重计算: 基于使用频率
- 关联推荐: 相似项目标签模式 ```
质量评分机制
```yaml 评分维度: 内容完整性 (权重 30%): - 必填字段完成度 (10分) - 描述详细程度 (10分) - 格式规范性 (10分)
证据充分性 (权重 25%): - 链接有效性 (10分) - 证据完整性 (10分) - 可追溯性 (5分)
时效性 (权重 25%): - 更新频率 (10分) - 信息新鲜度 (10分) - 版本标记 (5分)
关联性 (权重 20%): - 任务依赖标记 (5分) - 决策追溯链 (5分) - 问题关联 (10分)
总分计算: 最终评分 = 维度10.3 + 维度20.25 + 维度30.25 + 维度40.2 评分范围: 0-100分 等级划分: 90-100: ⭐⭐⭐⭐⭐ 优秀 70-89: ⭐⭐⭐⭐ 良好 50-69: ⭐⭐⭐ 一般 30-49: ⭐⭐ 较差 0-29: ⭐ 极差
评分透明化:
- 每次评分时输出详细计算过程
- 显示各维度得分和权重
- 标记导致低分的具体原因
- 提供具体的改进建议 ```
关联关系管理
```yaml 自动关联检测: 任务依赖: - 基于描述和时间序列分析 - 识别前置任务和后置任务 - 标记依赖关系链
决策影响: - 分析决策对后续任务的影响 - 追踪决策执行情况 - 评估决策效果
问题关联: - 识别相似问题 - 关联解决方案 - 建立知识库
关系可视化:
- 依赖图谱: 显示任务和决策的依赖关系
- 影响分析: 评估变更的潜在影响范围
- 历史追溯: 追踪决策和问题的演化过程 ```
性能优化
大文件处理优化
```yaml 文件大小检测: 操作前检查: - 读取文件前先获取文件大小 - 如果文件 > 1MB,启用分块处理模式 - 记录文件大小到操作日志
分块操作策略: 区块定位: - 使用正则表达式 /^## / 定位区块边界 - 只读取需要修改的目标区块内容 - 保持其他区块完全不变
内存优化: - 优先使用增量更新工具 - 避免全文件重写 - 处理完成后立即释放内存 - 使用流式处理 ```
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.
- 5d ago First seen · 405 lines · 0 tokens per session scan A 737ebf1a1d66
context-recorder-advanced is a cursor rule published in the GitHub repository Mr-chen-05/rules-2.1-optimized (172 stars, last pushed 10mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,877 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-30.
Other cursor rules, from other repositories
mempalace-recall-always
Always-on MemPalace recall — search the palace before answering about past work, people, projects, or prior decisions.
dreamd-recall
Recall lessons, decisions, and prior context from the .agent/ memory daemon. Use when starting work in a project that has a .agent/ folder, when the user references a past decision, or when you are about to make a choice that has a documented prior.
session-memory
Use at conversation wrap-up or when the user explicitly indicates end-of-session — capture residual lessons not captured in-flight.
common_memory_bank
I am Cursor, an expert software engineer with a unique characteristic: my memory resets completely between sessions. This isn't a limitation - it's what drives me to maintain perfect documentation. After each reset, I rely ENTIRELY on my Memory Bank to understand the project and continue work effectively. I MUST read…
self-improving-obsidian-llm-wiki
LLM Wiki OS operating rules.
memsprout
Cursor rule "memsprout" from memsprout/agents, covering using memsprout, search first, capturing, spaces and topics and files.