context-sync

context-sync is a cursor rule for Cursor from 1EchA/context-sync-mcp. It costs 725 tokens per session, scanned A, original, MIT.

Rules for keeping project context in sync, including decisions, known problems, interface notes, and progress across coding sessions or devices.

In plain words
What is it for?
Use it to record architecture decisions, bugs and their fixes, API behavior, completed tasks, and to restore project notes on another session or device.
Why use it?
They reduce the need to rediscover past decisions and pitfalls when work resumes. Context can be initialized, saved to a remote location, or loaded later with the specified commands.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it to record architecture decisions, bugs and their fixes, API behavior, completed tasks, and to restore project notes on another session or device.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/1echa/context-sync-mcp/context-sync
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.

Clone the repo
git clone --depth 1 https://github.com/1EchA/context-sync-mcp

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 context-sync

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

Your own site · 80×15
<a href="https://agentmods.dev/rules/1echa/context-sync-mcp/context-sync"><img src="https://agentmods.dev/badge/rules/1echa/context-sync-mcp/context-sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 725 This file is loaded in full into every session.
When invoked 725 The same file — it is already loaded in full.
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.00725 $0.00725
Opus 5.5 $0.00290 $0.00290
Sonnet 5.5 $0.00145 $0.00145
Haiku 4.5 $0.00072 $0.00072

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

Security

Grade A, and why

context-sync 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 2mo 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.

rules/context-sync.mdc · 57 lines

What it actually says

上下文记忆规则(Context Sync MCP)

实时记录(自动,无需用户触发)

发现以下信息时,调用 write_context 工具批量写入:

  1. 避雷点/踩坑 → file:"gotchas", action:"append"

    • 必须包含:现象、原因、解决方案、影响文件
    • 写入后告知用户:"⚠️ 已记录避雷点:[标题]"
  2. 架构决策 → file:"architecture", action:"append"

    • 必须包含:决策、原因、权衡
    • 写入后告知用户:"📐 已记录架构决策:[决策]"
  3. 接口行为/限制 → file:"api_notes", action:"append"

    • 包含:接口路径、行为特征、限制条件
  4. 完成待办项 → file:"progress", action:"overwrite"

    • 更新完整的待办清单状态
  5. 如果新记录与已有记录有关联,在 related_to 中标注(如 ["ADR-1", "踩坑#2"])

可以在一次 write_context 调用中批量写入多个文件,减少工具调用次数。

/sync-init(用户手动,首次初始化)

当用户输入 /sync-init、“初始化上下文同步”、“初始化这个仓库的 context sync” 时:

  1. 调用 sync_init 工具建立初始 progress 和 summary
  2. 如果项目已有 .context/,不要覆盖,提示用户改用 /sync-load
  3. 初始化完成后,告知用户后续使用 /sync-save 保存增量、/sync-load 恢复上下文

/sync-save(用户手动,推送到远程)

当用户输入 /sync-save、sync push、“保存上下文”、"上传上下文" 时:

  1. 确保 progress 和 summary 是最新的(如有需要先 write_context)
  2. 调用 sync_push 工具推送到远程
  3. 告知用户推送结果

/sync-load(用户手动,从远程拉取)

当用户输入 /sync-load、sync pull、“拉取上下文”、"恢复上下文"、"新设备恢复上下文" 时:

  1. 调用 sync_load 工具获取上下文
  2. 如返回引导信息,展示引导步骤
  3. 成功后重点关注:gotchas(避免踩坑)和 progress(继续进度)
  4. 向用户汇报恢复的上下文,询问继续哪个任务

命名约束

  • sync_push / sync_load 是 MCP 内部工具名,不是给用户看的 slash 命令
  • 面向用户时,推送统一说 /sync-save
  • 面向用户时,拉取统一说 /sync-load;其中 sync pull 视为 /sync-load 的自然语言别名

主动提醒

  • 完成大任务后提醒:"如果要切换设备,可以 /sync-save 推送上下文"
  • 本地有多条未推送记录时提醒用户
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. 2mo ago First seen · 57 lines · 725 tokens per session scan A 9c9ea711438f

Subscribe to this mod's changes

context-sync is a cursor rule published in the GitHub repository 1EchA/context-sync-mcp (20 stars, last pushed 7mo ago), licensed MIT. It adds 725 tokens to every session, about $0.0029 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-30.