agentCLAWHUBUnverified

Session Memory Extractor

OpenClaw 版 Claude-Mem:自动扫描旧 Session 文件,AI 提炼决策、偏好、事实,追加写入 memory/;同步清理 .jsonl + .trajectory.jsonl,释放数百 MB 磁盘。提炼比清理先跑,记忆不丢失;提炼失败的文件自动 Quarantine 不删,避免静默丢数据。 Skill: Session Memory Extractor Owner: lmqiang-711 Summary: OpenClaw 版 Claude-Mem:自动扫描旧 Session 文件,AI 提炼决策、偏好、事实,追加写入 memory/;同步清理 .jsonl + .trajectory.jsonl,释放数百 MB 磁盘。提炼比清理先跑,记忆不丢失;提炼失败的文件自动 Quarantine 不删,避免静默丢数据。 Tags: latest:1.0.6 Version history: v1.0.6 | 2026-06-22T05:06:51.758Z | user v1.0.6: 提炼失败的 session 文件自动 Quarantine,彻底杜绝数据静默丢失。 - 引入隔离机制:只有提炼成功并检测到 __EXTRACT_OK__ marker 后才写 memory/ 并删除原始文件。 - 提炼失败或无效结构(内容

OpenClaw

Rank

62

Safety

84

Downloads

1.1k

Updated

Oct 11, 2026

Version

1.0.6

Source

CLAWHUB

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Public facts

Every fact links back to the source it came from.

Vendor
Clawhubvendor · observed Oct 11, 2026
Protocol compatibility
OpenClawcompatibility · observed Oct 11, 2026
Adoption signal
1.1K downloadsadoption · observed Oct 11, 2026
Latest release
1.0.6release · observed Jun 22, 2026
Handshake status
UNKNOWNsecurity

Install and run

Setup complexity: low.

clawhub skill install s17e4y92f44qhs1jfky5dxr9b984rsvd:session-memory-extractor
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-lmqiang-711-session-memory-extractor/snapshot"

Documentation

CLAWHUB

51,783 characters of source documentation, loaded on request.

Extracted files

3 files captured from the source.

SKILL.md

---
name: Session Memory Extractor
slug: session-memory-extractor
version: 1.0.6
homepage: https://clawhub.ai/hasakyi/session-memory-extractor
description: OpenClaw 版 Claude-Mem:自动扫描旧 Session 文件,AI 提炼决策、偏好、事实,追加写入 memory/;同步清理 .jsonl + .trajectory.jsonl,释放数百 MB 磁盘。提炼比清理先跑,记忆不丢失;提炼失败的文件自动 Quarantine 不删,避免静默丢数据。
changelog: "v1.0.6: 安全加固-提炼失败的文件 Quarantine 不删除(__EXTRACT_OK__ marker 验证 + quarantine.log 审计);v1.0.5: 修复审计问题-统一preview/dry-run语义+强化隐私保护建议+收窄触发词避免误触发+删除歧义别名SME+强化删除前确认;v1.0.4: 安全修复-收窄触发词避免误触发+删除歧义别名SME+强化删除前确认;v1.0.3: 修复飞书通知提取数为0的bug(key名extractions→results);修复预览大小显示0B的bug(stat -f %s→-f %z);飞书通知增加内容示例展示(3条snippet);v1.0.2: 支持config.env配置化、快速预览、并行处理、自然语言触发、飞书通知"
metadata: {"clawhub":{"emoji":"🧠","requires":{"bins":["python3"]},"os":["linux","darwin","win32"],"configPaths":["~/.openclaw/workspace/skills/session-memory-extractor/"]}}
---

# Session Memory Extractor

> cn: OpenClaw 版 Claude-Mem:自动扫描旧 Session 文件,AI 提炼决策、偏好、事实,追加写入 memory/;同步清理 .jsonl + .trajectory.jsonl,释放数百 MB 磁盘。提炼比清理先跑,记忆不丢失。
>
> en: OpenClaw's answer to Claude-Mem (71k GitHub stars): AI-scans old .jsonl/.trajectory.jsonl files, extracts decisions and facts into memory/, then safely deletes raw files. Extract first, cleanup second — context preserved, disk freed.

---

## When to Use

用户**明确要求**提炼 session 记忆时,触发本 skill:

| 用户说(中文) | 用户说(英文) | 含义 |
|---------------|---------------|------|
| 用 session-memory-extractor 提炼 session 记忆 | use session-memory-extractor to extract session memories | 运行提炼 |
| 提炼旧 session 记忆 | extract memories from old sessions | 运行提炼 |
| 运行 session-memory-extractor | run session-memory-extractor | 运行提炼 |

**⚠️ 以下宽泛表达不触发技能(避免误触发导致数据丢失):**
**⚠️ 以下宽泛表达不触发技能(避免误触发导致数据丢失):**
- ❌「整理 session 记忆」
- ❌「清理 session 文件」
- ❌「整理记忆」
- ❌「清理文件」
- ❌「SME」单独使用

## 触发命令

识别到上述语句后,**先运行预览**,不直接执行删除:
```bash
bash ~/.openclaw/workspace/skills/session-memory-extractor/session-memory-extractor.sh --agent main --preview
```

**参数说明:**

| 参数 | 作用 |
|------|------|
| `--preview` | 仅扫描并显示统计数字(多少文件、多大空间、最早/最新日期),**不提炼、不删除、不修改任何数据** |
| `--dry-run` | 完整执行一次提炼(写入 memory/),但**不删除**原始文件,适合验证提炼质量 |
| `--parallel N` | 并行数,建议 3-5 |
| `--min-age 14` | 自定义保留天数 |

**⚠️ 确认步骤(必须严格执行):**
1. 预览完成后,向用户展示扫描结果
2. 告知将执行的操作及风险:
   - **提炼内容**:将提取到 `memory/`,供后续 session 查阅
   - **删除原始文件**:提炼成功的 `.jsonl` 原始文件将被永久删除,**无法恢复**
   - **提炼失败的文件**:v1.0.6+ 自动 Quarantine(重命名为 `.quarantined-<reason>-<ts>.jsonl`),原文件**保留不删**,记录到 `reports/quarantine.log`
   - **隐私风险**:session 中可能包含密码、密钥、敏感对话等,提炼内容会写入 memory/,存在隐私泄露风险
3. 等待用户**明确输入 `YES`(大写)**后,才执行提炼
4. 提炼完成后,询问是否删除原始文件,需用户再次**输入 `YES`(大写)**确认删除

**⚠️ v1.0.6 安全保证:**
提炼失败的 session **绝对不会被静默删除**。三种隔离机制:
1. **marker 验证**:`extract_session.py` 输出 `__EXTRACT_OK__` marker,runner 必须看到这个 marker 才认定提炼成功
2. **内容验证**:提取内容必须 ≥ 50 字符且至少包含 1 个结构化标记(`[FACT]` / `[LEARN]` / `[TODO]` / `[INSIGHT]` / `[NOTE]` / `[REFERENCE]` / `[DECISION]`),否则视为无效
3. **Quarantine**:失败的 session 文件被重命名(不删除),保留在 sessions 目录里供事后审查;同时写入 `reports/quarantine.log` 包含失败原因

可用的 Quarantine reason:
- `no_marker`:API 调

_meta.json

{
  "ownerId": "kn7emzyk3y4chttgn07ehpxrz584s5vc",
  "slug": "session-memory-extractor",
  "version": "1.0.6",
  "publishedAt": 1782104811758
}

skill-card.md

## Description:

Scans old OpenClaw session files, uses AI to extract durable decisions, preferences, facts, and tasks into memory/, then cleans up source session files while quarantining failed extractions.

This skill is ready for commercial/non-commercial use.

## Publisher:

[lmqiang-711](https://clawhub.ai/user/lmqiang-711)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and OpenClaw users use this skill to convert older .jsonl and .trajectory.jsonl session history into persistent memory entries before removing or quarantining the original session files.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Private session history may be sent to MiniMax and persisted into memory files.

Mitigation: Use only on agents whose old sessions are acceptable for external processing, run preview or dry-run first, and review or skip sessions that may contain secrets or sensitive business content.

Risk: Normal execution can permanently remove raw session history after writing summarized memories.

Mitigation: Keep backups, use dry-run review workflows before normal execution, and confirm that quarantine logs preserve failed extraction cases for audit.

Risk: Feishu notifications can expose extracted summaries to unintended recipients.

Mitigation: Keep Feishu notifications disabled unless the recipient or webhook target is trusted and verified.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/lmqiang-711/skills/session-memory-extractor)
- [ClawHub metadata homepage](https://clawhub.ai/hasakyi/session-memory-extractor)

## Skill Output:

**Output Type(s):** [Text, Markdown, Files, Shell commands, Configuration]

**Output Format:** [Markdown memory entries, console summaries, JSON reports, and optional notification text]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [May send session content to MiniMax, append extracted memories to memory/YYYY-MM-DD.md, write quarantine audit logs, and delete successfully processed raw session files.]

## Skill Version(s):

1.0.6 (source: frontmatter and server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
Github ReposUpdated 2d agoRank 70

AionUi

Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!

MCPOPENCLAW
Github ReposUpdated 6mo agoRank 70

activepieces

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

OPENCLAW
Github ReposUpdated 6mo agoRank 70

cherry-studio

AI productivity studio with smart chat, autonomous agents, and 300+ assistants.

MCPOPENCLAW
Github ReposUpdated 7mo agoRank 70

CopilotKit

The Frontend for Agents & Generative UI. React + Angular

OPENCLAW

Machine-readable data

The same record, as JSON, for agents and crawlers.

{
  "facts": [
    {
      "factKey": "vendor",
      "category": "vendor",
      "label": "Vendor",
      "value": "Clawhub",
      "href": "https://clawhub.ai/lmqiang-711/skills/session-memory-extractor",
      "sourceUrl": "https://clawhub.ai/lmqiang-711/skills/session-memory-extractor",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-11T07:57:09.341Z",
      "isPublic": true
    },
    {
      "factKey": "protocols",
      "category": "compatibility",
      "label": "Protocol compatibility",
      "value": "OpenClaw",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-lmqiang-711-session-memory-extractor/contract",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-lmqiang-711-session-memory-extractor/contract",
      "sourceType": "contract",
      "confidence": "medium",
      "observedAt": "2026-10-11T07:57:09.341Z",
      "isPublic": true
    },
    {
      "factKey": "traction",
      "category": "adoption",
      "label": "Adoption signal",
      "value": "1.1K downloads",
      "href": "https://clawhub.ai/lmqiang-711/session-memory-extractor",
      "sourceUrl": "https://clawhub.ai/lmqiang-711/session-memory-extractor",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-11T07:57:09.341Z",
      "isPublic": true
    },
    {
      "factKey": "latest_release",
      "category": "release",
      "label": "Latest release",
      "value": "1.0.6",
      "href": "https://clawhub.ai/lmqiang-711/session-memory-extractor",
      "sourceUrl": "https://clawhub.ai/lmqiang-711/session-memory-extractor",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-06-22T05:06:51.758Z",
      "isPublic": true
    },
    {
      "factKey": "handshake_status",
      "category": "security",
      "label": "Handshake status",
      "value": "UNKNOWN",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-lmqiang-711-session-memory-extractor/trust",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-lmqiang-711-session-memory-extractor/trust",
      "sourceType": "trust",
      "confidence": "medium",
      "observedAt": null,
      "isPublic": true
    }
  ],
  "events": [
    {
      "eventType": "release",
      "title": "Release 1.0.6",
      "description": "v1.0.6: 提炼失败的 session 文件自动 Quarantine,彻底杜绝数据静默丢失。 - 引入隔离机制:只有提炼成功并检测到 `__EXTRACT_OK__` marker 后才写 memory/ 并删除原始文件。 - 提炼失败或无效结构(内容太短/缺少结构化标记)时,原 session 文件重命名为 `.quarantined-<原因>-<时间戳>.jsonl`,不再直接删除。 - 新增 `reports/quarantine.log`,详细记录被隔离文件的路径、原因和元数据,便于事后审计和回溯。 - `.find` 排除 quarantine 文件,避免二次处理。 - 保证 session 内容永不过因提炼脚本异常而丢失。",
      "href": "https://clawhub.ai/lmqiang-711/session-memory-extractor",
      "sourceUrl": "https://clawhub.ai/lmqiang-711/session-memory-extractor",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-06-22T05:06:51.758Z",
      "isPublic": true
    }
  ]
}

Record generated Oct 11, 2026.

Sponsored

Ads related to Session Memory Extractor and adjacent AI workflows.