← 返回 Skills 市场
Memory Sync CN
作者
Guohongbin
· GitHub ↗
· v1.0.0
725
总下载
0
收藏
4
当前安装
1
版本数
在 OpenClaw 中安装
/install memory-sync-cn
功能描述
记忆同步系统 - 自动同步 MEMORY.md 与 CortexGraph,支持遗忘曲线和智能检索
使用说明 (SKILL.md)
记忆同步系统
自动同步 OpenClaw 记忆系统与 CortexGraph(带遗忘曲线)。
架构
MEMORY.md (长期记忆)
↕
CortexGraph (智能层)
↕
memory/YYYY-MM-DD.md (每日日志)
同步脚本
1. 导入 MEMORY.md 到 CortexGraph
# 运行同步
./scripts/sync-memory.sh
2. 导入每日日志
# 同步今天的日志
./scripts/sync-daily.sh
# 同步指定日期
./scripts/sync-daily.sh 2026-02-18
3. 晋升高价值记忆
# 查看晋升候选
mcporter call cortexgraph.promote_memory auto_detect=true dry_run=true
# 执行晋升
mcporter call cortexgraph.promote_memory auto_detect=true
CortexGraph 工具
核心操作
# 保存记忆
mcporter call cortexgraph.save_memory content="..." tags='["tag1"]' entities='["Entity1"]'
# 搜索记忆
mcporter call cortexgraph.search_memory query="关键词" top_k=5
# 强化记忆(减缓衰减)
mcporter call cortexgraph.touch_memory memory_id="UUID" boost_strength=true
# 查看知识图谱
mcporter call cortexgraph.read_graph limit=10
智能分析
# 分析是否值得记住
mcporter call cortexgraph.analyze_message message="用户说的话"
# 分析是否需要搜索
mcporter call cortexgraph.analyze_for_recall message="用户说的话"
# 自动回忆
mcporter call cortexgraph.auto_recall_process_message message="用户说的话"
维护
# 垃圾回收(删除低分记忆)
mcporter call cortexgraph.gc dry_run=true
# 合并相似记忆
mcporter call cortexgraph.consolidate_memories auto_detect=true mode=preview
# 生成嵌入向量
mcporter call cortexgraph.backfill_embeddings dry_run=true
遗忘曲线算法
CortexGraph 使用 Ebbinghaus 遗忘曲线:
score = (use_count)^β × e^(-λ × Δt) × strength
- β = 0.6(使用频率权重)
- λ = ln(2) / half_life(衰减常数,默认 3 天)
- strength = 1.0-2.0(重要性)
记忆会自然衰减,除非:
- 被引用(touch_memory)
- 被搜索到(auto_recall)
- 晋升到长期记忆(promote_memory)
配置
编辑 ~/.config/cortexgraph/.env:
# 存储路径
CORTEXGRAPH_STORAGE_PATH=~/.config/cortexgraph/jsonl
# 衰减参数
CORTEXGRAPH_DECAY_MODEL=power_law
CORTEXGRAPH_PL_HALFLIFE_DAYS=3.0
# 阈值
CORTEXGRAPH_FORGET_THRESHOLD=0.05
CORTEXGRAPH_PROMOTE_THRESHOLD=0.65
# 长期记忆(Obsidian)
LTM_VAULT_PATH=~/Documents/Obsidian/Vault
使用场景
1. 对话中自动记住
# 分析消息
mcporter call cortexgraph.analyze_message message="用户说..."
# 如果 should_save=true,则保存
2. 对话中自动回忆
# 分析消息
mcporter call cortexgraph.analyze_for_recall message="用户问..."
# 如果 should_search=true,则搜索
3. 定期维护
# 每周运行
mcporter call cortexgraph.gc
mcporter call cortexgraph.consolidate_memories auto_detect=true mode=apply
与 OpenClaw 集成
CortexGraph 已通过 mcporter 配置:
// ~/.openclaw/workspace/config/mcporter.json
{
"cortexgraph": {
"command": "/home/ghb/.local/bin/cortexgraph",
"description": "Temporal memory system for AI with Ebbinghaus forgetting curve"
}
}
最佳实践
- 重要信息 strength=1.5-2.0(用户偏好、关键决策)
- 普通信息 strength=1.0(日常对话)
- 临时信息 strength=0.5(上下文相关)
- 每周维护:GC + 合并 + 晋升
- 每月检查:调整衰减参数
版本: 1.0.0 作者: 赚钱小能手
安全使用建议
This skill performs exactly what it claims—reading your MEMORY.md and daily logs and pushing them into a CortexGraph instance via mcporter—but that behavior can expose secrets. Before installing or running: 1) Inspect MEMORY.md and your daily logs and remove or redact any API keys, passwords, tokens, or personal identifiers. 2) Confirm the provenance and trustworthiness of the 'mcporter' npm package and the 'cortexgraph' Python package (check their registries, maintainers, and whether they contact remote services). 3) Confirm the expected locations of ~/.config/cortexgraph/.env and ~/.openclaw/workspace/config/mcporter.json and inspect those files for credentials or remote endpoints. 4) Prefer running scripts with --dry-run first and avoid enabling automatic promotion until you are confident about what will be written to long-term memory. 5) Because registry/install metadata and SKILL.md differ (cortexgraph install appears in SKILL.md but not in registry), verify the full install steps manually before trusting automated installs.
功能分析
Type: OpenClaw Skill
Name: memory-sync-cn
Version: 1.0.0
The skill bundle is designed for memory synchronization with a local CortexGraph system. All operations, including file access (e.g., `MEMORY.md`, `daily.md`) and tool calls (`mcporter call cortexgraph.*`), are confined to the expected OpenClaw workspace and local binaries. There is no evidence of data exfiltration, unauthorized network activity, persistence mechanisms, obfuscation, or prompt injection attempts against the agent. Input sanitization (escaping quotes) is used when passing content to `mcporter` commands. The functionality aligns with the stated purpose of an AI memory management system.
能力评估
Purpose & Capability
Name/description, required binaries (cortexgraph, mcporter), and the scripts all align with a memory-sync purpose. Minor inconsistency: SKILL.md documents installing the Python 'cortexgraph' package but the registry install spec only declares the Node 'mcporter' package; the Python install is not reflected in the registry metadata.
Instruction Scope
Runtime instructions and included scripts explicitly read user files (~/.openclaw/workspace/MEMORY.md and per-day files) and send their contents to cortexgraph via mcporter calls. Scripts do not filter or redact content and even map a section named '宏斌的 API Keys' (api-keys) — meaning secrets present in MEMORY.md would be imported into CortexGraph. SKILL.md also provides commands for automated promotion, GC, and auto-recall which may change or surface stored memories.
Install Mechanism
Install items are public package installs (npm for mcporter, SKILL.md suggests pip for cortexgraph). No arbitrary URL downloads or extract-from-URL steps were found. The mismatch between registry install spec (only mcporter) and SKILL.md (cortexgraph + mcporter) is worth confirming before install.
Credentials
The skill requests no environment variables, but its instructions and scripts require and read local config files (~/.config/cortexgraph/.env and ~/.openclaw/workspace/config/mcporter.json) and workspace files. Those files can contain storage paths and credentials. The scripts will import arbitrary sections from MEMORY.md (including ones explicitly labeled for API keys or identity), so the effective access to secrets is disproportionate unless the user ensures MEMORY.md contains no sensitive data.
Persistence & Privilege
The skill does not request always:true, does not modify other skills, and uses normal agent-invocation patterns. It does require installation of binaries but does not request elevated system privileges in its manifest.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install memory-sync-cn - 安装完成后,直接呼叫该 Skill 的名称或使用
/memory-sync-cn触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release - CortexGraph integration with Ebbinghaus forgetting curve
元数据
常见问题
Memory Sync CN 是什么?
记忆同步系统 - 自动同步 MEMORY.md 与 CortexGraph,支持遗忘曲线和智能检索. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 725 次。
如何安装 Memory Sync CN?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install memory-sync-cn」即可一键安装,无需额外配置。
Memory Sync CN 是免费的吗?
是的,Memory Sync CN 完全免费(开源免费),可自由下载、安装和使用。
Memory Sync CN 支持哪些平台?
Memory Sync CN 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Memory Sync CN?
由 Guohongbin(@guohongbin-git)开发并维护,当前版本 v1.0.0。
推荐 Skills