Openclaw Skill Session Memory

v0.1.0

Automatically saves conversations daily with sensitive data redacted and supports fast keyword search across recent sessions.

0· 310·1 current·1 all-time
by魏然@qiaotucodes
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
Name/description state local conversation recording, redaction, and search; the included Python scripts (record.py, search.py, skill.py) implement those behaviors and only read/write under ~/.openclaw (sessions -> memory/conversations), which is consistent with the declared purpose.
Instruction Scope
SKILL.md instructs the agent to run the included scripts and references the same file paths the code uses. The scripts read JSONL session logs from ~/.openclaw/agents/main/sessions and write markdown files under ~/.openclaw/.../memory/conversations — this is expected for a session-memory skill. Note: the skill stores full conversation text (albeit redacted) on disk; there is no network exfiltration or access to other system config files.
Install Mechanism
No install spec (instruction-only packaging) and all code is included in the package. Nothing is downloaded or executed from remote URLs, so install risk is low.
Credentials
The skill requires no environment variables or external credentials. Its file access is limited to OpenClaw session logs and the skill's own memory directory in the user's home — proportional to its purpose.
Persistence & Privilege
always is false and the skill does not request persistent platform-level privileges. It writes its own files under the user's home directory only and does not modify other skills or global agent configs.
Assessment
This skill appears to do what it claims: locally save session logs and provide search with regex-based redaction. Before installing: (1) review and test the redaction rules — some patterns (very generic long-string rule) may over-redact or miss secrets; (2) be aware conversation logs are written unencrypted to ~/.openclaw/.../memory/conversations — ensure filesystem permissions and backups meet your privacy needs; (3) the package has minor implementation issues (e.g., skill.py references timedelta without importing it in one function) — test in a safe environment first and consider fixing those bugs; (4) if you need stronger protection, consider encrypting the memory directory or restricting access to the session files. If you want, I can point out the exact lines to change for the timedelta/import bug and suggest safer redaction regex adjustments.

Like a lobster shell, security has layers — review code before you run it.

latestvk97d33gphs72p5t2age0n1xr3x8241y9
310downloads
0stars
1versions
Updated 1mo ago
v0.1.0
MIT-0

会话记忆技能

自动记录对话内容,按日期存储,支持快速关键字搜索回忆。

功能

  • 自动记录: 每次会话结束后自动保存对话内容到md文件
  • 按日期存储: 文件保存在 memory/conversations/YYYY-MM-DD.md
  • 数据脱敏: 自动过滤账号、密码、密钥、token等敏感信息
  • 快速搜索: 支持关键字正则匹配,无需加载整个文件

使用方式

自动记录(会话结束自动调用)

技能会在会话结束时自动调用,记录本次会话内容。

手动搜索回忆

# 搜索关键字(默认搜索最近7天)
python3 ~/.openclaw/workspace/skills/session-memory/search.py "关键词"

# 搜索指定天数
python3 ~/.openclaw/workspace/skills/session-memory/search.py "关键词" --days 30

# 列出最近所有会话文件
python3 ~/.openclaw/workspace/skills/session-memory/search.py --list

脱敏规则

自动替换以下内容:

  • 邮箱: xxx@xxx.com[EMAIL]
  • 手机号: 11位数字 → [PHONE]
  • API Key/Token: 包含 keytokensecretpassword 的长字符串 → [REDACTED]
  • 身份证号: 18位 → [ID]
  • 银行卡号: 16-19位 → [CARD]
  • IP地址: → [IP]

文件格式

# 2026-03-02 会话记录

## 会话 1
- 时间: 19:13 - 19:20
- 渠道: feishu
- 消息数: 6

### 关键内容
- 用户询问焱焱是否在线
- 讨论会话丢失问题
- 要求创建会话记忆技能

### 消息摘要
- [19:13] 用户: "焱焱在吗"
- [19:15] 焱焱: "刚才应该是网络延迟"
...

技术实现

  • Python脚本处理会话日志
  • 正则表达式匹配敏感信息
  • 按日期分割文件便于快速检索

Comments

Loading comments...