← 返回 Skills 市场
161
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install context-compress
功能描述
Incrementally summarizes long conversations by pruning, preserving key segments, and using AI to maintain context coherence.
使用说明 (SKILL.md)
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)
安全使用建议
This skill will read your local OpenClaw conversation/session data and (if enabled) send the middle portion of conversations to a third‑party LLM service (SiliconFlow / DeepSeek‑V3) for summarization. Before installing: (1) assume SILICONFLOW_API_KEY is required even though the registry metadata omitted it — do not provide any key you don't trust the recipient with; (2) inspect compressor.ts and the import readSecret to confirm where API keys are read from (env vs secret manager) and that no other unexpected endpoints are contacted; (3) be aware summaries may include secrets found in chat history (the README shows such examples) — redact or remove sensitive messages before compression or disable the remote LLM step; (4) prefer installing only after verifying the upstream GitHub repo and repository owner, and avoid the one‑liner curl|tar unless you trust that repo; (5) if you cannot verify the code path that sends data to SiliconFlow, do not install on systems containing confidential data. Providing the full, untruncated compressor.ts and any network-calling code paths would increase confidence and could change this assessment to benign if they prove limited and transparent.
功能分析
Type: OpenClaw Skill
Name: context-compress
Version: 1.0.2
The context-compress skill is a utility designed to manage long conversation histories by summarizing intermediate turns using the SiliconFlow API (DeepSeek-V3). The core logic in `src/compressor.ts` implements a multi-step process to prune verbose tool outputs, protect the system prompt and recent messages, and generate a structured summary to maintain task continuity. The prompt instructions in `SKILL.md` and the compressor logic are well-structured and align with the stated purpose of preventing context window overflow. No evidence of malicious intent, unauthorized data exfiltration, or harmful prompt injection was found; the code includes defensive measures to ensure the agent treats summarized content as reference rather than active instructions.
能力标签
能力评估
Purpose & Capability
The skill claims incremental summarization using a third‑party LLM (DeepSeek‑V3 / SiliconFlow). The package and runtime invoke a remote summarizer, which makes sense for the stated purpose, but the registry metadata declares no required environment variables or primary credential while the README and scripts expect SILICONFLOW_API_KEY and the code uses a readSecret helper. This mismatch (no declared secret despite needing an API key) is an incoherence that reduces transparency.
Instruction Scope
Runtime instructions and scripts will read local conversation/session data and send content to an external API for summarization. The README shows examples where secrets found in context (e.g., SECRET_KEY) might be included in summaries — meaning potentially sensitive conversation contents could be transmitted to SiliconFlow. The SKILL.md also suggests copying the skill into a GitHub sync directory, which risks persisting sensitive summaries to a remote git repo. These behaviors are within the claimed purpose but increase privacy/exfiltration risk and are not called out in registry metadata.
Install Mechanism
There is no formal install spec; an install.sh is provided that copies files into ~/.openclaw/skills (local, low-risk). SKILL.md suggests a one‑liner that downloads a tar.gz from a GitHub repo (a common pattern). The remote download is from GitHub (well-known host) but the repository is third‑party; downloading and executing anything from an untrusted repo has inherent risk. Overall installation is not highly suspicious but lacks provenance/verification.
Credentials
The skill effectively requires at least one secret (SILICONFLOW_API_KEY) to enable LLM summarization, and the code imports a readSecret helper (which could access environment or secret stores). However the registry metadata lists no required env vars or primary credential. That omission is a transparency problem. Also the skill will send conversation contents (which may include credentials, tokens, config snippets) to a third party — this is proportionate to using an external LLM but should be explicitly declared and limited.
Persistence & Privilege
The skill does not request 'always: true' and its install.sh only writes its own files into ~/.openclaw/skills. It does not appear to change other skills' configs or system-wide settings. Autonomous invocation is allowed (default) which increases blast radius if the skill exfiltrates data, but that is platform default rather than a unique misconfiguration of this skill.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install context-compress - 安装完成后,直接呼叫该 Skill 的名称或使用
/context-compress触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
v1.0.2: 添加一键安装命令,ClaWHub安装后可直接使用
v1.0.1
v1.0.1: 详情页加入Hermes-agent+Claude Code融合卖点
v1.0.0
Initial release: 思维链连续性,防止长对话中断层
元数据
常见问题
Context Compress 是什么?
Incrementally summarizes long conversations by pruning, preserving key segments, and using AI to maintain context coherence. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 161 次。
如何安装 Context Compress?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install context-compress」即可一键安装,无需额外配置。
Context Compress 是免费的吗?
是的,Context Compress 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Context Compress 支持哪些平台?
Context Compress 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Context Compress?
由 ECsss(@olveww-dot)开发并维护,当前版本 v1.0.2。
推荐 Skills