memory-curator by irangareddy/openclaw-essentials
npx skills add https://github.com/irangareddy/openclaw-essentials --skill memory-curator通过每日日志记录、会话保存和知识提取,为智能体提供系统化的记忆管理。
# 追加到今日日志
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--entry "使用 JWT 实现了用户认证" \
--category "关键活动"
# 显示今日日志
python scripts/daily_log.py --workspace ~/.openclaw/workspace --show
# 搜索所有记忆文件
python scripts/search_memory.py \
--workspace ~/.openclaw/workspace \
--query "GraphQL"
# 仅搜索近期日志(最近 7 天)
python scripts/search_memory.py \
--workspace ~/.openclaw/workspace \
--query "authentication" \
--days 7
# 显示近期日志
python scripts/search_memory.py \
--workspace ~/.openclaw/workspace \
--recent 5
# 从当前会话生成摘要
python scripts/extract_session.py \
--session ~/.openclaw/agents/<agent-id>/sessions/<session-id>.jsonl \
--output session-summary.md
时机: 结束工作会话或切换上下文之前
步骤:
Systematic memory management for agents through daily logging, session preservation, and knowledge extraction.
# Append to today's log
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--entry "Implemented user authentication with JWT" \
--category "Key Activities"
# Show today's log
python scripts/daily_log.py --workspace ~/.openclaw/workspace --show
# Search all memory files
python scripts/search_memory.py \
--workspace ~/.openclaw/workspace \
--query "GraphQL"
# Search recent logs only (last 7 days)
python scripts/search_memory.py \
--workspace ~/.openclaw/workspace \
--query "authentication" \
--days 7
# Show recent logs
python scripts/search_memory.py \
--workspace ~/.openclaw/workspace \
--recent 5
# Generate summary from current session
python scripts/extract_session.py \
--session ~/.openclaw/agents/<agent-id>/sessions/<session-id>.jsonl \
--output session-summary.md
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
回顾完成的工作:
追加到每日日志:
python scripts/daily_log.py
--workspace ~/.openclaw/workspace
--entry "修复了支付处理中的竞态条件 - 添加了互斥锁"
为重要工作添加结构化条目:
- [14:30] 使用 GraphQL 实现了用户个人资料仪表板
- [16:00] 修复了 UserContext 中的无限重新渲染 - 对 provider 值进行了记忆化
## 做出的决策
- 选择 Apollo Client 而非 React Query - 更好的缓存 + 类型生成
- 决定在 httpOnly cookies 中使用 JWT 而非 localStorage
## 收获
- Apollo 需要 `__typename` 字段进行缓存规范化
- React.memo 无法防止因上下文变化导致的重新渲染
参见: patterns.md 了解不同场景下应记录的内容
时机: 运行 /new、/reset 或结束对话之前
步骤:
提取会话摘要:
python scripts/extract_session.py \
--session ~/.openclaw/agents/<agent-id>/sessions/<session-id>.jsonl \
--output ~/session-summary.md
2. 审阅摘要并编辑关键收获部分
保存到每日日志:
cat ~/session-summary.md >> ~/.openclaw/workspace/memory/$(date +%Y-%m-%d).md
如有需要,提取关键上下文到 MEMORY.md:
时机: 周末(周五/周日)或每月
步骤:
搜索近期日志中的模式:
python scripts/search_memory.py
--workspace ~/.openclaw/workspace
--recent 7
寻找提取信号:
提取到 MEMORY.md:
清理 MEMORY.md:
参见: extraction.md 了解详细的提取模式
用于在工作期间快速捕获上下文:
# 快速笔记
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--entry "今日学习:DataLoader 将请求批处理为单个查询"
# 决策
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--entry "使用 Zustand 管理客户端状态 - 比 Redux 更简单" \
--category "做出的决策"
# 已解决的问题
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--entry "CORS + cookies:在客户端和服务器启用凭据,Allow-Origin 不能为 *"
memory/YYYY-MM-DD.md)目的: 按时间顺序跟踪活动
内容:
保留策略: 保持近期日志可访问,可选择归档超过 90 天的日志
何时使用:
目的: 精心策划的长期知识
内容:
组织方式: 基于主题,而非时间顺序
何时使用:
参见: organization.md 了解结构模式
始终记录:
不要记录:
参见: patterns.md 获取全面的记录指导
工作期间:
daily_log.py --entry 快速记录每日结束时:
每周结束时:
当出现以下情况时提取到 MEMORY.md:
不要提取:
问题-解决方案结构:
## [技术/领域]
### [问题标题]
**问题:** [清晰描述]
**原因:** [根本原因]
**解决方案:** [如何修复]
**代码:**
```js
// 示例实现
预防: [如何避免] 上下文: [何时适用]
**参见:** [extraction.md](references/extraction.md) 了解详细的提取工作流
## 脚本参考
### daily_log.py
创建或追加到今日的每日日志。
```bash
# 追加条目
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--entry "您的日志条目" \
[--category "章节名称"]
# 从模板创建
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--template
# 显示今日日志
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--show
从会话 JSONL 中提取摘要。
python scripts/extract_session.py \
--session ~/.openclaw/agents/<id>/sessions/<session>.jsonl \
[--output summary.md]
输出:
在所有记忆文件中搜索。
# 使用查询搜索
python scripts/search_memory.py \
--workspace ~/.openclaw/workspace \
--query "搜索词" \
[--days 30]
# 显示近期日志
python scripts/search_memory.py \
--workspace ~/.openclaw/workspace \
--recent 5
在/new 或 /reset 之前:
在主要工作之后:
参见: organization.md 获取详细的结构指导
首先搜索每日日志:
python scripts/search_memory.py --workspace ~/.openclaw/workspace --query "决策关键词"
搜索 MEMORY.md:
grep -i "关键词" ~/.openclaw/workspace/MEMORY.md
搜索会话日志:
rg "关键词" ~/.openclaw/agents/<id>/sessions/*.jsonl
归档旧的每日日志(>90 天):
mkdir -p memory/archive/2025-Q1 mv memory/2025-01-*.md memory/archive/2025-Q1/
如果 >1000 行,按领域拆分 MEMORY.md:
memory/domains/ ├── react.md ├── graphql.md └── database.md
从主 MEMORY.md 链接:
- [React 模式](memory/domains/react.md)
- [GraphQL 模式](memory/domains/graphql.md)
参见: patterns.md 获取全面的记录模式
快速规则: 如果你花费了 >15 分钟在其上或学到了非显而易见的东西,就记录它。
位于:assets/templates/daily-log.md
结构:
位于:assets/templates/MEMORY-template.md
结构:
创建钩子以自动记录主要事件:
// ~/.openclaw/hooks/memory-logger/index.js
export default {
name: 'memory-logger',
async onToolCall({ tool, agent }) {
if (tool === 'write' || tool === 'edit') {
// 记录文件修改
await exec(`python scripts/daily_log.py --workspace ${agent.workspace} --entry "Modified ${tool.input.file_path}"`)
}
}
}
添加到 AGENTS.md:
## 在 /new 或 /reset 之前
始终保存上下文:
1. 提取会话摘要
2. 添加到每日日志
3. 将关键决策保存到 MEMORY.md
openclaw cron add \
--name "weekly-memory-review" \
--at "Sunday 18:00" \
--system-event "Time for weekly memory review and knowledge extraction"
每周安装次数
111
仓库
首次出现
2026年2月16日
安全审计
安装于
openclaw108
codex107
opencode107
cursor107
gemini-cli106
github-copilot106
When: Before ending work session or switching contexts
Steps:
Review what was accomplished:
Append to daily log:
python scripts/daily_log.py
--workspace ~/.openclaw/workspace
--entry "Fixed race condition in payment processing - added mutex lock"
Add structured entries for important work:
- [14:30] Implemented user profile dashboard with GraphQL
- [16:00] Fixed infinite re-render in UserContext - memoized provider value
## Decisions Made
- Chose Apollo Client over React Query - better caching + type generation
- Decided to use JWT in httpOnly cookies instead of localStorage
## Learnings
- Apollo requires `__typename` field for cache normalization
- React.memo doesn't prevent re-renders from context changes
See: patterns.md for what to log in different scenarios
When: Before running /new, /reset, or ending conversation
Steps:
Extract session summary:
python scripts/extract_session.py \
--session ~/.openclaw/agents/<agent-id>/sessions/<session-id>.jsonl \
--output ~/session-summary.md
2. Review summary and edit Key Learnings section
Save to daily log:
cat ~/session-summary.md >> ~/.openclaw/workspace/memory/$(date +%Y-%m-%d).md
Extract critical context to MEMORY.md if needed:
When: End of week (Friday/Sunday) or monthly
Steps:
Search for patterns in recent logs:
python scripts/search_memory.py
--workspace ~/.openclaw/workspace
--recent 7
Look for extraction signals:
Extract to MEMORY.md:
Clean up MEMORY.md:
See: extraction.md for detailed extraction patterns
For rapid context capture during work:
# Quick note
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--entry "TIL: DataLoader batches requests into single query"
# Decision
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--entry "Using Zustand for client state - simpler than Redux" \
--category "Decisions Made"
# Problem solved
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--entry "CORS + cookies: Enable credentials on client + server, Allow-Origin can't be *"
memory/YYYY-MM-DD.md)Purpose: Chronological activity tracking
Content:
Retention: Keep recent logs accessible, optionally archive logs >90 days
When to use:
Purpose: Curated long-term knowledge
Content:
Organization: Topic-based, not chronological
When to use:
See: organization.md for structure patterns
Always log:
Don't log:
See: patterns.md for comprehensive logging guidance
During work:
daily_log.py --entryEnd of day:
End of week:
Extract to MEMORY.md when:
Don't extract:
Problem-Solution Structure:
## [Technology/Domain]
### [Problem Title]
**Problem:** [Clear description]
**Cause:** [Root cause]
**Solution:** [How to fix]
**Code:**
```js
// Example implementation
Prevention: [How to avoid] Context: [When this applies]
**See:** [extraction.md](references/extraction.md) for detailed extraction workflow
## Scripts Reference
### daily_log.py
Create or append to today's daily log.
```bash
# Append entry
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--entry "Your log entry" \
[--category "Section Name"]
# Create from template
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--template
# Show today's log
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--show
Extract summary from session JSONL.
python scripts/extract_session.py \
--session ~/.openclaw/agents/<id>/sessions/<session>.jsonl \
[--output summary.md]
Outputs:
Search across all memory files.
# Search with query
python scripts/search_memory.py \
--workspace ~/.openclaw/workspace \
--query "search term" \
[--days 30]
# Show recent logs
python scripts/search_memory.py \
--workspace ~/.openclaw/workspace \
--recent 5
Before/new or /reset:
After major work:
See: organization.md for detailed structure guidance
Search daily logs first:
python scripts/search_memory.py --workspace ~/.openclaw/workspace --query "decision keyword"
Search MEMORY.md:
grep -i "keyword" ~/.openclaw/workspace/MEMORY.md
Search session logs:
rg "keyword" ~/.openclaw/agents/<id>/sessions/*.jsonl
Archive old daily logs (>90 days):
mkdir -p memory/archive/2025-Q1 mv memory/2025-01-*.md memory/archive/2025-Q1/
Split MEMORY.md by domain if >1000 lines:
memory/domains/ ├── react.md ├── graphql.md └── database.md
Link from main MEMORY.md:
- [React Patterns](memory/domains/react.md)
- [GraphQL Patterns](memory/domains/graphql.md)
See: patterns.md for comprehensive logging patterns
Quick rule: If you spent >15 minutes on it or learned something non-obvious, log it.
Located at: assets/templates/daily-log.md
Structure:
Located at: assets/templates/MEMORY-template.md
Structure:
Create a hook to auto-log major events:
// ~/.openclaw/hooks/memory-logger/index.js
export default {
name: 'memory-logger',
async onToolCall({ tool, agent }) {
if (tool === 'write' || tool === 'edit') {
// Log file modifications
await exec(`python scripts/daily_log.py --workspace ${agent.workspace} --entry "Modified ${tool.input.file_path}"`)
}
}
}
Add to AGENTS.md:
## Before /new or /reset
Always preserve context:
1. Extract session summary
2. Add to daily log
3. Save critical decisions to MEMORY.md
openclaw cron add \
--name "weekly-memory-review" \
--at "Sunday 18:00" \
--system-event "Time for weekly memory review and knowledge extraction"
Weekly Installs
111
Repository
First Seen
Feb 16, 2026
Security Audits
Installed on
openclaw108
codex107
opencode107
cursor107
gemini-cli106
github-copilot106
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
166,500 周安装
顺序思考(sequential-thinking)工具:迭代推理与分支修订的AI结构化问题解决技能
102 周安装
销售负责人技能指南:B2B销售战略、团队建设与管道管理全解析
89 周安装
CI/CD自动化迭代与修复工具 - ci-iteration 使用指南与工作流程详解
65 周安装
HL7 IHE PAM 消息解析器 - 解析验证医疗患者管理ADT消息,支持HL7 v2.5标准
97 周安装
Brave Search 本地描述 API:获取 AI 生成的本地商家描述,增强搜索结果与旅行指南
111 周安装
AI文章插图生成器 - 智能分析内容,一键生成风格统一的流程图、信息图等
95 周安装