← 返回 Skills 市场
asclaude-compact
作者
Sherman Schulist
· GitHub ↗
· v1.0.0
· MIT-0
91
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install asclaude-compact
功能描述
Manage AI conversation memory with layered compression, archiving chats as JSONL, summarizing key info in markdown, and cleaning long outputs locally without...
使用说明 (SKILL.md)
asclaude-compact: 智能会话记忆管理器 🧠✨
让 AI 像人类一样拥有“短期记忆”与“长期档案”,告别上下文幻觉。
🌟 核心亮点
asclaude-compact 是一套专为 OpenClaw 打造的高级会话优化方案。它不仅仅是简单的“删除旧消息”,而是通过分层压缩策略,在保留核心逻辑的同时,将庞大的对话历史精简为维护成本极低的“精华摘要”。
🚀 功能详解
- 全量归档 (Full Archival):
- 自动将当前冗长的对话打包成
.jsonl存档。 - 释放会话内存,让 AI 重新获得“轻装上阵”的响应速度。
- 自动将当前冗长的对话打包成
- 智能摘要 (Smart Summarization):
- 生成高度结构化的
session-memory.md。 - 精准记录已完成的决策、待办事项(TODO)以及关键的项目上下文。
- 生成高度结构化的
- 微压缩 (Micro-Compact):
- 针对超长工具输出(如大段代码块、日志)进行定向清理。
- 保留最近的 2 个关键步骤,删除冗余的执行细节。
- 零 API 成本:
- 纯本地运行,不消耗任何 Token 配额,响应速度快至毫秒级。
🛠️ 使用指南
- 触发全量压缩:
python scripts/compact-trigger.py - 执行快速清理:
python scripts/micro-compact.py
由 黑米 (HeiMi) 精心封装,为您打造永不遗忘且极度专注的私人 AI 助手。 🌾
安全使用建议
This skill appears to do what it says: local compression and archiving of OpenClaw session files. Before installing/running it, consider: 1) Back up your ~/.openclaw/sessions directory elsewhere — micro-compact overwrites session files (it does create a single .jsonl.backup but that may be overwritten on repeated runs). 2) Summaries (session-memory.md, daily -compact.md) include message previews and may contain sensitive data — store them securely or review the code to redact as needed. 3) The micro-compact logic has a probable schema mismatch (collects tool_use IDs from assistant messages but clears tool_result blocks inside user messages); test on non-critical sessions to confirm it behaves as you expect. 4) The tool runs entirely locally (no network/credentials), so install risk is low, but review the scripts or run them in a controlled environment if you have sensitive data.
功能分析
Type: OpenClaw Skill
Name: asclaude-compact
Version: 1.0.0
The skill bundle is a session management utility designed to archive and prune OpenClaw conversation logs to optimize token usage. The scripts (compact-trigger.py and micro-compact.py) perform legitimate file operations within the ~/.openclaw directory, such as copying session logs to an archive folder and replacing large tool outputs with summary placeholders. No evidence of data exfiltration, network activity, or malicious intent was found.
能力评估
Purpose & Capability
Name/description describe layered compression, JSONL archiving, and markdown summaries; the two main scripts implement exactly those behaviors (archive session .jsonl, create session-memory.md, and replace old tool results). No unrelated binaries, env vars, or network calls are requested.
Instruction Scope
SKILL.md tells the user to run the provided Python scripts; the scripts only read/write files under the user's home (~/.openclaw/agents/... and ~/.openclaw/workspace). There are no network endpoints or credential access. Notes: micro-compact.py collects 'tool_use' IDs from assistant messages but clears 'tool_result' blocks inside user messages — this may reflect a mismatch with some session schemas and could mean some tool results are not compacted as intended. Also, summary files include message previews (may contain sensitive content) and the scripts overwrite session files (though micro-compact creates a single .jsonl.backup in the same directory).
Install Mechanism
There is no install spec (instruction-only), and the repo contains plain Python scripts. No remote downloads, package installs, or archive extraction are performed by the skill itself.
Credentials
The skill requests no environment variables or credentials. It does access the user's home directory to read/write OpenClaw session and workspace files — this is proportional to the described function (local memory management).
Persistence & Privilege
always is false and the scripts do not modify other skills or global agent config. They persist artifacts in ~/.openclaw (archived-sessions, memory summaries) and create/overwrite a .jsonl.backup when saving — normal for local data-management tools.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install asclaude-compact - 安装完成后,直接呼叫该 Skill 的名称或使用
/asclaude-compact触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
## 📦 Skill 包清单
### 1. 🗜️ Session Compact (v1.0.0)
**文件名**: `session-compact-1.0.0.tar.gz` (11KB)
**简介**:
智能会话压缩工具,基于 Claude Code 的 Session Memory Compact 机制。自动归档长对话、生成结构化摘要、节省 90-98% tokens,零成本运行(不调用 LLM)。
**核心功能**:
- ✅ 自动归档长对话(50k tokens 阈值)
- ✅ 生成结构化摘要(关键决策、错误修复)
- ✅ 微压缩清理旧工具结果
- ✅ 自动监控会话长度
- ✅ 持久化记忆到 session-memory.md
- ✅ 支持手动 `/compact` 命令
**适用场景**:
- 对话太长,响应变慢
- 需要回顾之前的关键决策
- 节省 tokens 成本
- 知识沉淀和归档
**安装方式**:
```bash
openclaw skills install session-compact
```
**文件结构**:
```
session-compact-1.0.0/
├── SKILL.md # 主文档(详细使用说明)
├── README.md # 快速入门
├── scripts/
│ ├── compact-trigger.py # 手动压缩脚本
│ ├── micro-compact.py # 微压缩脚本
│ └── compact-monitor.py # 自动监控脚本
└── docs/ # 技术文档(可选)
```
**性能指标**:
- 压缩率: 90-98%
- 速度: 100ms (Micro) / 1-3s (Full)
- 成本: $0(不调用 LLM)
- Token 节省: 50k → 1-5k
元数据
常见问题
asclaude-compact 是什么?
Manage AI conversation memory with layered compression, archiving chats as JSONL, summarizing key info in markdown, and cleaning long outputs locally without... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 91 次。
如何安装 asclaude-compact?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install asclaude-compact」即可一键安装,无需额外配置。
asclaude-compact 是免费的吗?
是的,asclaude-compact 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
asclaude-compact 支持哪些平台?
asclaude-compact 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 asclaude-compact?
由 Sherman Schulist(@miaoxingjun)开发并维护,当前版本 v1.0.0。
推荐 Skills