← 返回 Skills 市场
xiaobu2020

Conversation Saver

作者 xiaobu2020 · GitHub ↗ · v0.1.1 · MIT-0
cross-platform ⚠ suspicious
101
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install conversation-saver
功能描述
Automatically extract key facts from conversation history and persist to local memory files. Silent background operation with rule+LLM hybrid extraction.
使用说明 (SKILL.md)

Conversation Saver

Automatically extracts key facts from your conversations and persists them to the appropriate local memory files (WARM_MEMORY.md, MEMORY.md, ontology, USER.md). Works silently in the background without interrupting the user flow.

When to Use

  • You want your agent to remember important details from conversations automatically
  • You need hands-off fact extraction (no interactive questioning)
  • You want facts categorized into the right places (preferences, schedules, person details)
  • You prefer local-first persistence (no external dependencies)

How It Works

1. Extraction Pipeline

Raw Messages → Rule-Based Filter → LLM Extraction → Classification → Deduplication → Persistence
  • Rule-Based: Fast keyword/regex matching for obvious facts (dates, locations, names)
  • LLM: Step 3.5 Flash extracts structured facts from ambiguous conversations
  • Classification: Routes facts to the correct storage target
  • Deduplication: Avoids recording the same fact multiple times

2. Storage Targets

Fact Type Destination Example
Person details (family, friends) ontology + WARM_MEMORY.md (家庭) "老婆去上海出差"
Time commitments WARM_MEMORY.md (日程) "下周二回来"
Locations USER.md + WARM_MEMORY.md "常驻武汉"
Preferences WARM_MEMORY.md (互动偏好) "不要一股脑发照片"
System rules TOOLS.md / AGENTS.md "回复必须@老布"
Important decisions MEMORY.md "决定用Tailwind"

3. Trigger Modes

  • On Session End: Automatically run after each conversation (requires AGENTS.md hook)
  • Heartbeat Backfill: Scan recent days for missed conversations (configurable)
  • Manual: uv run scripts/extract.py --session \x3CsessionKey> or --days N

Installation

# From ClawHub (recommended)
clawhub install conversation-saver

# Or manual
cd ~/.openclaw/workspace/skills
git clone \x3Cyour-repo> conversation-saver

Configuration

Edit config.json to customize behavior:

{
  "extraction": {
    "enabled": true,
    "auto_on_session_end": true,
    "heartbeat_reprocess_days": 2,
    "min_confidence": 0.6,
    "max_facts_per_session": 10
  },
  "filters": {
    "user_id": "ou_39f0f10fb55c7c782610cad6a97f4842",
    "ignore_bot_messages": true,
    "ignore_short_messages": true,
    "min_message_length": 5
  },
  "persistence": {
    "verify_after_write": true,
    "backup_before_write": false,
    "deduplicate_across_sessions": true
  }
}

Usage

Automatic Mode (Recommended)

Add to AGENTS.md to run after each session:

## Session End Hooks
- 每次会话结束 → 运行 conversation-saver

Or integrate into your existing heartbeat:

uv run ~/.openclaw/workspace/skills/conversation-saver/scripts/extract.py --days 2 --reprocess

Manual Run

# Extract from specific session
uv run scripts/extract.py --session \x3CsessionKey>

# Backfill last 3 days
uv run scripts/extract.py --days 3 --reprocess

# Dry run (show what would be extracted)
uv run scripts/extract.py --session \x3CsessionKey> --dry-run

Files Structure

conversation-saver/
├── SKILL.md
├── config.json
├── scripts/
│   ├── __init__.py
│   ├── extract.py      # Main entry point
│   ├── classifier.py   # Fact classification
│   ├── persister.py    # File writing with verification
│   └── utils.py        # Helpers (dedupe, date parsing)
└── README.md

Customization

Add Keywords

Edit scripts/extract.pyKEYWORD_CATEGORIES:

KEYWORD_CATEGORIES = {
    "person": ["老婆", "小美美", "包子", "家人", "朋友"],
    "location": ["武汉", "上海", "郑州", "出差", "旅行"],
    "time": ["周三", "周二", "本周", "下周", "月", "日"],
    "preference": ["喜欢", "不要", "记住", "记得", "规则"]
}

Adjust LLM Prompt

Modify scripts/extract.pyLLM_EXTRACTION_PROMPT to change extraction style or output format.

Requirements

  • Python 3.10+
  • OpenClaw agent with tool access (read, write, edit)
  • StepFun model (for LLM extraction)

Testing

# Dry run on today's conversations
uv run scripts/extract.py --today --dry-run

# Check extracted facts count
uv run scripts/extract.py --today --stats-only

Limitations

  • Single-user focus: Designed for one primary user (your USER.md)
  • No vector search: Facts are stored in files, not semantic searchable (yet)
  • Language: Optimized for Chinese conversations (keywords in Chinese)
  • No GUI: All configuration via config.json

Credits

Inspired by openclaw-user-profiler's structured approach and elite-longterm-memory's tiered architecture.

安全使用建议
This skill appears to do what it claims: quietly scan your local conversation logs and append extracted facts to memory files. Before installing: (1) review the hardcoded paths (/home/admin/.openclaw/workspace/...) and ensure they match your environment and that you are comfortable granting the skill read/write access to those files; (2) run the included dry-run option (uv run scripts/extract.py --today --dry-run) to see what would be extracted; (3) inspect the persister targets (WARM_MEMORY.md, MEMORY.md, USER.md, TOOLS.md) to confirm you want those files modified automatically; (4) note that LLM extraction is mocked in this release — if you plan to enable real model calls, ensure you understand which model/credentials will be used; (5) be aware this operates silently in background mode—if privacy is a concern, keep auto_on_session_end disabled and use manual runs. Finally, consider the minor inconsistencies (missing classifier.py in manifest, classification may reference agents_md but persister doesn't write it, and _meta.json version mismatch) and verify the repository/version you install is the intended one.
功能分析
Type: OpenClaw Skill Name: conversation-saver Version: 0.1.1 The skill contains a hardcoded specific user ID (`ou_39f0f10fb55c7c782610cad6a97f4842`) in both `config.json` and `scripts/extract.py`, which is highly unusual for a general-purpose tool and suggests targeting of a specific individual. It possesses high-privilege capabilities, including reading all conversation logs in the workspace and modifying core agent configuration files (`AGENTS.md`, `TOOLS.md`) to alter agent behavior. While these actions are documented as features for 'silent' memory management and no direct data exfiltration was identified, the combination of targeted logic and broad file system access warrants a suspicious classification.
能力评估
Purpose & Capability
Name/description (extract facts and persist locally) match the code and SKILL.md. The scripts scan local conversation logs and append extracted facts to memory files (WARM_MEMORY.md, MEMORY.md, USER.md, TOOLS.md). The hardcoded workspace paths and user_id are consistent with a single-user, local-first memory saver.
Instruction Scope
Runtime instructions and extract.py explicitly read message log files from /home/admin/.openclaw/workspace/memory and write to workspace memory files. This is coherent with the stated silent/background operation, but it means the skill will collect and persist potentially sensitive conversation content without interactive prompts. Also note small inconsistencies: SKILL.md and README references a classifier.py and AGENTS.md target, but the manifest includes no classifier.py file and persister does not implement writing to an 'agents_md' target (classification can generate 'agents_md' but persist_facts ignores it).
Install Mechanism
No install spec or external downloads — the skill is instruction + local Python scripts only. No network fetch or archive extraction was found in the package, lowering install risk.
Credentials
The skill requests no environment variables or external credentials. It does access specific filesystem paths under /home/admin/.openclaw/workspace which is appropriate for a local memory manager; however these paths are hardcoded and not declared in the manifest as required config paths (not a security flaw, but worth noting so users verify the correct workspace location and permissions).
Persistence & Privilege
The skill is not forced-always and does not modify other skills' configurations. It writes only to local memory files within the workspace and does not attempt to self-enable or change global agent policies. Autonomous invocation (model invocation enabled) is normal for skills and is not by itself a concern here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install conversation-saver
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /conversation-saver 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.1
All English version
v0.1.0
- Initial release of conversation-saver. - Automatically extracts and classifies key facts from conversation history using a rule-based and LLM hybrid pipeline. - Persists extracted facts to local memory files (WARM_MEMORY.md, MEMORY.md, ontology, USER.md) in the background. - Supports automatic operation on session end, scheduled backfill, and manual runs. - Includes customizable extraction rules and destination mapping. - Designed for local-first, single-user workflows with hands-off fact extraction.
元数据
Slug conversation-saver
版本 0.1.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Conversation Saver 是什么?

Automatically extract key facts from conversation history and persist to local memory files. Silent background operation with rule+LLM hybrid extraction. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 101 次。

如何安装 Conversation Saver?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install conversation-saver」即可一键安装,无需额外配置。

Conversation Saver 是免费的吗?

是的,Conversation Saver 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Conversation Saver 支持哪些平台?

Conversation Saver 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Conversation Saver?

由 xiaobu2020(@xiaobu2020)开发并维护,当前版本 v0.1.1。

💬 留言讨论