/install context-compress
Context Compress Skill
🛡️ OpenClaw 混合进化方案 — 将 Hermes-agent(100K ⭐)+ Claude Code 核心能力移植到 OpenClaw
防止长对话中思维链断裂的增量摘要工具。
🚀 一键安装
mkdir -p ~/.openclaw/skills && cd ~/.openclaw/skills && curl -fsSL https://github.com/olveww-dot/openclaw-hermes-claude/archive/main.tar.gz | tar xz && cp -r openclaw-hermes-claude-main/skills/context-compress . && rm -rf openclaw-hermes-claude-main && echo "✅ context-compress 安装成功"
触发方式
- 手动触发: 对我说 "压缩上下文" 或 "compact"
- 自动触发: 当上下文超过模型 context window 的 50% 时自动压缩
五步算法
- Prune — 裁剪旧工具输出(无 LLM 调用,廉价预检)
- Head — 保护开头的系统提示和前几轮对话
- Tail — 按 token 预算保护最近几轮(~20K tokens)
- LLM Summarize — 中间部分调用 DeepSeek-V3 压缩
- Iterative — 后续压缩迭代更新摘要
摘要格式
保留以下结构化字段:
- Active Task — 当前任务(最重要)
- Goal — 总体目标
- Completed Actions — 已完成操作(含工具、目标、结果)
- Active State — 当前工作状态
- Blocked — 阻塞问题
- Key Decisions — 关键决策
- Pending User Asks — 未完成请求
- Remaining Work — 剩余工作
使用 SiliconFlow API
- 模型:
deepseek-ai/DeepSeek-V3 - API Base:
https://api.siliconflow.cn/v1 - 通过中转商调用,API Key 存储在环境变量
🧩 配套技能
本 skill 是 OpenClaw 混合进化方案 的一部分:
将 Hermesagent(100K ⭐)+ Claude Code 核心能力移植到 OpenClaw
将 Hermes-agent(100K ⭐)+ Claude Code 核心能力移植到 OpenClaw
🔗 GitHub 项目:olveww-dot/openclaw-hermes-claude
完整技能套件(6个):
- 🛡️ crash-snapshots — 崩溃防护
- 🧠 auto-distill — T1 自动记忆蒸馏
- 🎯 coordinator — 指挥官模式
- 💡 context-compress — 思维链连续性(本文)
- 🔍 lsp-client — LSP 代码智能
- 🔄 auto-reflection — 自动反思
输出文件
src/compressor.ts— 核心压缩逻辑(TypeScript)
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install context-compress - After installation, invoke the skill by name or use
/context-compress - Provide required inputs per the skill's parameter spec and get structured output
What is Context Compress?
Incrementally summarizes long conversations by pruning, preserving key segments, and using AI to maintain context coherence. It is an AI Agent Skill for Claude Code / OpenClaw, with 161 downloads so far.
How do I install Context Compress?
Run "/install context-compress" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Context Compress free?
Yes, Context Compress is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Context Compress support?
Context Compress is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Context Compress?
It is built and maintained by ECsss (@olveww-dot); the current version is v1.0.2.