← 返回 Skills 市场
329
总下载
0
收藏
3
当前安装
1
版本数
在 OpenClaw 中安装
/install auto-memory-distiller
功能描述
Automatically converts raw long conversations into structured, themed Markdown knowledge cards with source traceability, running incrementally and silently i...
使用说明 (SKILL.md)
Auto-Memory-Distiller
简介 (Introduction)
这是一个在后台静默运行的 OpenClaw 长期记忆自动提炼技能 (Skill)。 它负责将无序的超长对话流水账 (JSONL 记录),增量转化为结构化、按主题分类、可溯源的长期知识库 (Markdown 记忆卡片)。
特性 (Features)
- 增量游标 (Incremental):通过
state.json记录每个 Session 的已读行数,每次只处理新增对话,绝不重复消耗 Token。 - 主题聚合 (Topic Merge):自动读取已有的主题目录,将新知识合并入旧主题,防止知识碎片化。
- 安全过滤 (Redaction):利用大模型清洗真实的 API Key 和无关痛痒的报错日志。
- 溯源指针 (Pointers):生成的知识卡片永远带上原始对话的物理文件路径和行号。
依赖配置 (Prerequisites)
脚本默认使用 Gemini API,依赖以下 Python 库:
pip install google-genai python-dotenv
请在系统的环境变量,或者 ~/.openclaw/workspace/.env 中配置你的密钥:
GEMINI_API_KEY=your_gemini_api_key_here
使用方法 (Usage)
无需人工干预。建议把该脚本绑定到系统的 crontab 或者通过 OpenClaw 的 heartbeat 在闲暇时自动触发:
# 手动运行
python ~/.openclaw/workspace/skills/auto-distiller/distiller.py
存储目录 (Directory Structure)
distiller.py: 核心脚本。state.json: 游标记录文件(自动生成)。- 输出的记忆目录:
~/.openclaw/workspace/memory/topics/*.md
安全使用建议
Before installing or enabling this skill, consider the following:
- It will read your conversation logs from ~/.openclaw/agents/main/sessions/*.jsonl and send those conversations to Google's Gemini API for processing. Any secrets or personal data in those conversations will be transmitted to an external service even though the prompt instructs the model to redact secrets — that is not a guaranteed client-side safe filter.
- The registry metadata does not declare the GEMINI_API_KEY requirement or the config paths the code uses; treat that omission as a red flag and verify the behavior yourself.
- The script writes Markdown topic files and a state.json in ~/.openclaw/workspace/, and it embeds filesystem paths/line numbers pointing back to raw session files — this can make raw data easier to find and expose.
- Mitigations: (1) Run the script manually for testing rather than enabling automatic runs; (2) inspect the session JSONL files to ensure they contain no sensitive info before sending; (3) prefer using a dedicated, limited-scope API key and monitor its usage; (4) consider adding client-side redaction (remove/replace API keys, PII) before sending content to the model; (5) lock down file permissions on ~/.openclaw/workspace and the .env file; (6) if organizational policy forbids sending conversation contents to third-party models, do not enable this skill.
If you want help producing a safe wrapper that does client-side redaction or that runs in an isolated environment, I can assist with a patch or run strategy.
功能分析
Type: OpenClaw Skill
Name: auto-memory-distiller
Version: 1.0.0
The skill is a legitimate utility designed to summarize OpenClaw session logs into structured Markdown memory cards using the Gemini API. It features incremental processing via a state file (state.json), basic path traversal protection for output files, and explicit instructions within the LLM prompt to redact sensitive information like API keys from the distilled output (distiller.py). While it processes potentially sensitive conversation logs and sends them to an external LLM provider, this behavior is transparently documented and aligned with its stated purpose.
能力评估
Purpose & Capability
The skill claims to be a local, silent distiller of long conversations — that capability matches the shipped script which reads session JSONL files and writes Markdown topics. However, the registry metadata lists no required environment variables or credentials while both SKILL.md and distiller.py require a GEMINI_API_KEY/GOOGLE_API_KEY. Also the metadata declares no required config paths but the code explicitly reads/writes ~/.openclaw/workspace and ~/.openclaw/agents/main/sessions. This mismatch between declared requirements and actual behavior is an incoherence.
Instruction Scope
The SKILL.md and script instruct the agent to read full conversation contents from ~/.openclaw/agents/main/sessions/*.jsonl, send those contents to the remote Gemini model for distillation, and write topic files including explicit filesystem pointers (file path + line ranges). Sending raw conversations to an external API (even with a redaction instruction) transmits potentially sensitive user data. The model-side redaction is not guaranteed to prevent exposure because the raw data is transmitted prior to any filtering.
Install Mechanism
This is an instruction-only skill with an included Python script; there is no install spec. The SKILL.md suggests installing google-genai and python-dotenv via pip, which is expected for the stated purpose. No third-party binary downloads or obscure URLs are used.
Credentials
The registry metadata declares no required env vars or primary credential, but both SKILL.md and distiller.py require GEMINI_API_KEY/GOOGLE_API_KEY (loaded from environment or ~/.openclaw/workspace/.env). Requesting a general cloud model API key is proportional to performing remote distillation, but the omission from declared requirements is misleading. Also SKILL.md suggests storing the key in the workspace .env file — that file may be world-readable depending on system permissions and increases risk if other local agents or processes can access it.
Persistence & Privilege
always:false (no forced inclusion) and the skill does not modify other skills. It is designed to run automatically (cron or heartbeat) and will create persistent artifacts (state.json, topic Markdown files) under ~/.openclaw/workspace; those artifacts include pointers to original session files which could make sensitive content easier to locate. Autonomous invocation is allowed by platform default — combine this with the data-exfiltration aspect when deciding whether to enable automatic runs.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install auto-memory-distiller - 安装完成后,直接呼叫该 Skill 的名称或使用
/auto-memory-distiller触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release
元数据
常见问题
Auto Memory Distiller 是什么?
Automatically converts raw long conversations into structured, themed Markdown knowledge cards with source traceability, running incrementally and silently i... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 329 次。
如何安装 Auto Memory Distiller?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install auto-memory-distiller」即可一键安装,无需额外配置。
Auto Memory Distiller 是免费的吗?
是的,Auto Memory Distiller 完全免费(开源免费),可自由下载、安装和使用。
Auto Memory Distiller 支持哪些平台?
Auto Memory Distiller 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Auto Memory Distiller?
由 Peng Shu(@mashirops)开发并维护,当前版本 v1.0.0。
推荐 Skills