Local memory system with structured indexing and auto-learning. Auto-write, heuristic recall, auto learning when knowledge is insufficient. Compatible with s...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install memory-master或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install memory-master⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/memory-master/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: memory-master version: 2.6.1 description: "Local memory system with structured indexing and auto-learning. Auto-write, heuristic recall, auto learning when knowledge is insufficient. Compatible with self-improving-agent: auto-records skill completions and errors to knowledge base." author: 李哲龙 tags: [memory, recall, indexing, context] ---
Transform your AI agent from forgetful to photographic.
---
Most AI agents suffer from memory amnesia:
You deserve better.
---
A precision-targeted memory architecture with optional network learning capability.
| Feature | Description | |---------|-------------| | 📝 Structured Memory | "Cause → Change → Todo" format for every entry | | 🔄 Auto Index Sync | Write once, index updates automatically | | 🎯 Zero Token Waste | Read only what you need, nothing more | | ⚡ Heuristic Recall | Proactively finds relevant memories when context is missing | | 🧠 Auto Learning | When local knowledge is insufficient, automatically search web to learn and update knowledge base | | 🔓 Full Control | All files visible/editable/deletable. No auto network calls. |
---
memory/daily/YYYY-MM-DD.md
Format:
## [日期] 主题
- 因:原因/背景
- 改:做了什么、改了什么
- 待:待办/后续
Example:
## [2026-03-03] 记忆系统升级
- 因:原记忆目录混乱,查找困难
- 改:目录调整为 daily/ + knowledge/,上传 v1.1.0
- 待:检查 ClawHub 描述
Why this format?
---
memory/daily-index.md
Format:
# 记忆索引
- 主题名 → daily/日期.md,日期.md
Example:
# 记忆索引
- 记忆系统升级 → daily/2026-03-03.md
- 飞书配置 → daily/2026-03-02.md,daily/2026-03-03.md
- 电商网站 → daily/2026-03-02.md
Rules:
---
DON'T wait for user to say "yesterday" or "remember"
Trigger recall when:
用户问题 → 发现上下文缺失 → 读 index 定位主题 → 读取记忆文件 → 恢复上下文 → 回答
Example:
User: "那个 skill 你觉得还有什么要改的吗?"
1. 思考:我知道用户指哪个 skill 吗?→ 不知道,上下文没有
2. 读 index → 找到"记忆系统升级 → daily/2026-03-03.md"
3. 读取文件 → 恢复记忆
4. 回答:"根据昨天记录,我们..."
"When you realize you don't know, go check the index."
---
memory/knowledge/
├── knowledge-index.md
└── *.md (knowledge entries)
memory/knowledge-index.md
极简格式 - 关键字列表:
# 知识库索引
- clawhub
- oauth
- react
启发式:当前上下文没有相关信息时才读
用户问题 → 上下文有?→ 有:直接解决 / 无:搜索引 → 有知识?→ 有:解决 / 无:自动网络搜索学习 → 写知识库 → 更新索引 → 解决问题
Example:
User: "怎么上传 skill 到 ClawHub?"
1. 上下文有 clawhub 信息?→ 有(刚学过)→ 直接回答
2. 不用读知识库
---
User: "怎么实现 OAuth?"
1. 上下文有 OAuth 信息?→ 没有
2. 搜 knowledge-index → 没有 OAuth
3. 告知用户:"我还不会,先去查一下"
4. 网络搜索学习
5. 写入 knowledge/oauth.md
6. 更新 knowledge-index
7. 开始和用户沟通解决方案
---
Write immediately after:
DO NOT wait for user to remind you!
Before every response, quickly check: "Did I learn anything new in this conversation?" If yes, write it.
Write IMMEDIATELY when any of the above happens. This is NOT optional.
When a skill completes or errors, automatically record to knowledge:
| Event | Write Location | Content | |-------|---------------|---------| | skill_complete | memory/knowledge/ | 记录学到了什么新技能/方法 | | skill_error | memory/knowledge/ | 记录错误原因和解决方案 |
统一写入知识库,因为都是"学到新知识"。
memory/daily/YYYY-MM-DD.md
daily-index.md (add new topic or append date)
IMPORTANT: Always update index when writing to daily memory!
When writing to MEMORY.md:
讨论:我们要改进记忆系统,决定把目录分成 daily/ 和 knowledge/
结论:改完了,今天上传到 GitHub 和 ClawHub
写入:
## [2026-03-04] 记忆系统升级
- 因:原记忆目录混乱,查找困难
- 改:目录调整为 daily/ + knowledge/,上传 v1.1.0
- 待:检查 ClawHub 描述
更新索引:
- 记忆系统升级 → daily/2026-03-03.md,daily/2026-03-04.md
---
| Step | Action | Trigger | |------|--------|---------| | 1 | Parse user query | User asks question | | 2 | Check: do I have context? | If uncertain | | 3 | Read daily-index.md | Context missing | | 4 | Locate relevant topic | Found in index | | 5 | Read target date file | Know the date | | 6 | Restore context | Got info | | 7 | Answer user | Complete |
---
| Step | Action | Trigger | |------|--------|---------| | 1 | Parse user query | User asks question | | 2 | Search knowledge-index | Always check first | | 3 | Found solution? | Yes → Solve / No → Continue | | 4 | Tell user "I don't know yet" | No solution | | 5 | Search web & learn | Get knowledge | | 6 | Write to knowledge/*.md | New knowledge | | 7 | Update knowledge-index | Keep index in sync | | 8 | Solve the problem | Complete |
---
~/.openclaw/workspace/
├── AGENTS.md # Your rules
├── MEMORY.md # Long-term memory (main session only)
├── memory/
│ ├── daily/ # Daily records
│ │ ├── 2026-03-02.md
│ │ ├── 2026-03-03.md
│ │ └── 2026-03-04.md
│ ├── knowledge/ # Knowledge base
│ │ ├── react-basics.md
│ │ └── flask-api.md
│ ├── daily-index.md # Daily memory index
│ └── knowledge-index.md # Knowledge index
---
| Metric | Traditional | Memory Master v1.2 | |--------|-------------|---------------------| | Recall precision | ~30% | ~95% | | Token cost per recall | High (full file) | Near zero (targeted) | | Proactive recall | ❌ | ✅ (heuristic) | | Knowledge learning | ❌ | ✅ | | API dependencies | Vector DB / OpenAI | None | | Setup complexity | High | Zero | | Latency | Variable | Instant |
---
None. This skill works with pure OpenClaw:
No external APIs. No embeddings. No costs.
---
clawdhub install memory-master
# This will automatically:
# - Migrate heartbeat rules from AGENTS.md to HEARTBEAT.md
# - Optimize AGENTS.md (deduplicate, streamline, restructure)
# - Convert MEMORY.md to pure lessons/experience repository
# - Create memory directory structure and index files
# - Backup original files to .memory-master-backup/ directory
clawdhub init memory-master
What the enhanced initialization does:
| Step | Action | Result |
|------|--------|--------|
| 1 | Backup | Original files saved to .memory-master-backup/ |
| 2 | Heartbeat Migration | Heartbeat content moved from AGENTS.md to HEARTBEAT.md |
| 3 | AGENTS.md Optimization | Remove duplicates, outdated rules, streamline language |
| 4 | MEMORY.md Transformation | Convert to pure lessons/experience repository |
| 5 | Memory Structure | Create memory/ directories and index files |
Post-initialization files:
~/.openclaw/workspace/
├── AGENTS.md # Optimized behavior rules + memory system rules
├── MEMORY.md # Pure lessons/experience repository
├── HEARTBEAT.md # Heartbeat tasks and guidelines
├── memory/
│ ├── daily/ # Daily records (YYYY-MM-DD.md format)
│ ├── knowledge/ # Knowledge base (*.md files)
│ ├── daily-index.md # Memory index
│ └── knowledge-index.md # Knowledge index
Or manually (advanced users):
# 1. Run the initialization script directly
node ~/.agents/skills/memory-master/scripts/init.js
# 2. Or manually copy templates
cp ~/.agents/skills/memory-master/templates/optimized-agents.md ~/.openclaw/workspace/AGENTS.md
cp ~/.agents/skills/memory-master/templates/heartbeat-template.md ~/.openclaw/workspace/HEARTBEAT.md
cp ~/.agents/skills/memory-master/templates/memory-lessons.md ~/.openclaw/workspace/MEMORY.md
# 3. Create memory directories
mkdir -p ~/.openclaw/workspace/memory/daily
mkdir -p ~/.openclaw/workspace/memory/knowledge
# 4. Create index files
cp ~/.agents/skills/memory-master/templates/daily-index.md ~/.openclaw/workspace/memory/daily-index.md
cp ~/.agents/skills/memory-master/templates/knowledge-index.md ~/.openclaw/workspace/memory/knowledge-index.md
---
---
---
---
⚠️ Important: Must run after EVERY response!
node ~/.agents/skills/memory-master/scripts/detect.js
Display status at the bottom of every response:
📝 上下文使用率:50% - 是否需要记录记忆或知识库?
⚠️ 上下文使用率:70% - 建议记录当前进度
🚨 上下文使用率:85% - 请立即记录当前进度!
---
> "An AI agent is only as good as its memory. Give your agent a memory system that never forgets, never wastes, and always delivers exactly what's needed."
Memory Master v1.2.0 — Because remembering everything is just as important as learning something new. 🧠⚡
安装 Memory Master 后,可以对 AI 说这些话来触发它
Help me get started with Memory Master
Explains what Memory Master does, walks through the setup, and runs a quick demo based on your current project
Use Memory Master to local memory system with structured indexing and auto-learning
Invokes Memory Master with the right parameters and returns the result directly in the conversation
What can I do with Memory Master in my documents & notes workflow?
Lists the top use cases for Memory Master, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/memory-master/ 目录(个人级,所有项目可用),或 .claude/skills/memory-master/(项目级)。重启 AI 客户端后,用 /memory-master 主动调用,或让 AI 根据上下文自动发现并使用。
Memory Master 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Memory Master 可免费安装使用。请查阅仓库了解许可证信息。
Local memory system with structured indexing and auto-learning. Auto-write, heuristic recall, auto learning when knowledge is insufficient. Compatible with s...
Memory Master 属于「Documents & Notes」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my documents & notes tasks using Memory Master
Identifies repetitive steps in your workflow and sets up Memory Master to handle them automatically