用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/johnalbertini14-glitch/openclaw-skills --skill memory-sync-cn命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | memory-sync-cn |
| description | 记忆同步系统 - 自动同步 MEMORY.md 与 CortexGraph,支持遗忘曲线和智能检索 |
| metadata | {"openclaw":{"emoji":"🧠","requires":{"bins":["cortexgraph","mcporter"]},"install":[{"id":"cortexgraph","kind":"python","package":"cortexgraph","bins":["cortexgraph"],"label":"Install CortexGraph (Python)"},{"id":"mcporter","kind":"node","package":"mcporter","bins":["mcporter"],"label":"Install mcporter (Node.js)"}]}} |
自动同步 OpenClaw 记忆系统与 CortexGraph(带遗忘曲线)。
MEMORY.md (长期记忆)
↕
CortexGraph (智能层)
↕
memory/YYYY-MM-DD.md (每日日志)
# 运行同步
./scripts/sync-memory.sh
# 同步今天的日志
./scripts/sync-daily.sh
# 同步指定日期
./scripts/sync-daily.sh 2026-02-18
# 查看晋升候选
mcporter call cortexgraph.promote_memory auto_detect=true dry_run=true
# 执行晋升
mcporter call cortexgraph.promote_memory auto_detect=true
# 保存记忆
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
记忆会自然衰减,除非:
编辑 ~/.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
# 分析消息
mcporter call cortexgraph.analyze_message message="用户说..."
# 如果 should_save=true,则保存
# 分析消息
mcporter call cortexgraph.analyze_for_recall message="用户问..."
# 如果 should_search=true,则搜索
# 每周运行
mcporter call cortexgraph.gc
mcporter call cortexgraph.consolidate_memories auto_detect=true mode=apply
CortexGraph 已通过 mcporter 配置:
// ~/.openclaw/workspace/config/mcporter.json
{
"cortexgraph": {
"command": "/home/ghb/.local/bin/cortexgraph",
"description": "Temporal memory system for AI with Ebbinghaus forgetting curve"
}
}
版本: 1.0.0 作者: 赚钱小能手