agentsclimarketplace

Persistent memory claw

Skill 2730554131/persistent-memory-claw

跨会话持久记忆系统:为 OpenClaw agent 提供持久记忆能力。使用 SQLite 存储,按日期保存,手动触发更可控。From its SKILL.md

Install
npx -y skills add 2730554131/persistent-memory-claw

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

3.7 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it

Persistent Memory

为 OpenClaw agent 提供跨会话持久记忆能力。

核心功能

1. 手动保存记忆 (v2.1 智能标记)

当用户说"记住 XXX"、"保存 XXX"时:

const { save } = require('./actions/save');
await save({
  workspace: '{workspace}',
  content: '要记住的内容',
  autoTag: true  // 默认开启智能标记
});

CLI 用法:

# 自动智能标记(默认)
node actions/save.js --content "要记住的内容"

# 指定分类
node actions/save.js --content "任务" --category "task"

# 禁用智能标记
node actions/save.js --content "内容" --no-auto-tag

v2.1 智能标记:

  • 自动分析内容重要性(1-10星)
  • 自动分类:task / promise / decision / normal

2. RAG 问答 (v2.2)

当用户问"之前聊过什么?"、"还记得吗?"时:

const { ask } = require('./actions/ask');
await ask({
  workspace: '{workspace}',
  question: '之前我们聊了什么?'
});

CLI 用法:

# 智能问答
node actions/ask.js --question "之前我们聊了什么?"

# 指定日期
node actions/ask.js --question "之前说的密码" --date 2026-03-17

v2.2 RAG 问答:

  • 基于记忆的智能问答
  • 自动检索相关记忆
  • LLM 生成自然语言答案

3. 自我反思 (v2.3)

当用户说"反思"、"回顾"、"总结经验"时:

const { reflect } = require('./actions/reflect');
await reflect({
  workspace: '{workspace}',
  days: 7
});

CLI 用法:

# 自我反思(最近7天)
node actions/reflect.js

# 回顾最近30天
node actions/reflect.js --days 30

v2.3 自我反思:

  • 定期回顾近期记忆
  • 提取经验教训
  • 总结主要工作
  • 识别待完成任务

4. 生成摘要

const { summarize } = require('./actions/summarize');
await summarize({
  workspace: '{workspace}',
  date: '2026-03-17'
});

CLI 用法:

node actions/summarize.js
node actions/summarize.js --date 2026-03-17

3. 搜索记忆

当用户说"搜索 XXX"、"查找 XXX"时:

const { search } = require('./actions/search');
await search({
  workspace: '{workspace}',
  query: '关键词',
  date: '2026-03-17'
});

CLI 用法:

node actions/search.js --query "关键词"
node actions/search.js --query "关键词" --date 2026-03-17

4. 列出记忆

当用户说"查看记忆"、"列出记忆"时:

const { list } = require('./actions/list');
await list({
  workspace: '{workspace}',
  date: '2026-03-17'
});

CLI 用法:

node actions/list.js
node actions/list.js --date 2026-03-17

存储结构

{workspace}/memory/
├── 2026-03-17.db     # 3月17日的记忆
├── 2026-03-16.db     # 3月16日的记忆
├── 2026-03-17-summary.md  # 摘要文件
└── ...

SQLite 表结构

CREATE TABLE memories (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  content TEXT NOT NULL,
  category TEXT DEFAULT 'default',
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

意图识别

功能触发关键词
保存记忆(智能标记)记住、保存、记录、存一下
RAG 问答之前、记得、聊过、问
自我反思反思、回顾、总结经验
生成摘要摘要、总结、提炼
搜索记忆搜索、查找、找一下、记得
列出记忆查看记忆、列出记忆、今天的记忆

依赖

  • Node.js
  • sqlite3(首次使用自动安装)

What ships with it: 10 files

35.9 KB alongside SKILL.md, 6 of them executable

actions/

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.