← Back to Skills Marketplace
geoshan

Context Compactor

by geoshan · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
308
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install subagent-context-compactor
Description
上下文压缩代理,采用分层压缩策略,基于内存使用触发机制。处理HOT/WARM/COLD三层数据,优化token使用。当用户需要压缩对话上下文、优化内存使用、管理会话历史、减少token消耗时使用此技能。特别适用于长时间对话、复杂任务处理、需要保留重要历史信息的场景。
Usage Guidance
This package is largely coherent with a context-compression agent, but review a few things before installing: - Inspect integration.py and api_server.py to confirm whether any HTTP endpoints are exposed and whether they require authentication (Flask-based APIs often default to no auth). An unauthenticated API could leak conversation memory or compressed data. - Search the code for any outbound network calls (requests, urllib, socket, or subprocess calls that curl/wget) to ensure data is not silently sent to external hosts. If you find any external endpoints, verify they are legitimate and appropriate. - Confirm the service only reads OpenClaw workspace paths you expect (~/.openclaw/workspace). If you need tighter control, run the skill in an isolated environment (container or VM) or adjust file permissions and configuration to limit accessible paths. - Because SKILL.md suggests cloning a repository but the package already contains code, avoid running any git clone or install commands from untrusted URLs; use the included files instead or obtain the upstream source from a known homepage. Lack of a homepage / unknown source lowers trust and is why this is flagged. - If you allow the skill to auto-start or add cron/heartbeat entries, ensure you understand and control that integration (review heartbeats, cron entries) and monitor logs (logs/ directory) for unexpected behavior. If you want, I can scan integration.py and api_server.py for network calls and any hard-coded hosts/keys, or point out exact lines to review for authentication and outbound requests.
Capability Analysis
Type: OpenClaw Skill Name: subagent-context-compactor Version: 1.0.0 The 'subagent-context-compactor' bundle is a legitimate utility designed to manage and optimize LLM conversation history within the OpenClaw ecosystem. It implements a tiered storage strategy (HOT/WARM/COLD) and uses a local SQLite database to track message importance and compression history. While the code (specifically in integration.py and monitor.py) accesses sensitive session data located in the user's OpenClaw workspace (~/.openclaw/workspace/), this behavior is strictly aligned with its stated purpose of context compaction. The included Flask API server (api_server.py) binds only to the local loopback interface (127.0.0.1), and there is no evidence of data exfiltration, unauthorized persistence, or malicious intent.
Capability Assessment
Purpose & Capability
Name/description, configuration, and included code (compactor.py, hierarchical_compactor.py, monitor.py, integration.py, api_server.py, control scripts) align with a Context Compactor that monitors session memory, classifies HOT/WARM/COLD and compresses or archives items. No unrelated cloud credentials, binaries, or config paths are requested.
Instruction Scope
SKILL.md and scripts instruct the agent to monitor ~/.openclaw/workspace memory files, run background monitor/integration services, write logs and a local SQLite DB, and add cron/tasks or heartbeat entries. Those actions are consistent with the stated purpose but grant the skill read access to the user's OpenClaw workspace and persistent write access (logs, DB). The SKILL.md suggests cloning from a repository URL but the package already contains code; the placeholder git clone line is vague and could encourage fetching remote code if followed.
Install Mechanism
There is no remote install spec; the package is instruction-and-code-only and uses a small Python dependency (Flask) declared in requirements.txt. No external downloads, URL shorteners, or archive-extract steps were found in the provided files.
Credentials
The skill asks for no environment variables or external credentials (primary credential none). It does read files under the user's OpenClaw workspace (~/.openclaw/workspace/memory) which is appropriate for a memory-aware compactor, but that access could expose sensitive conversation history. config.json includes auto_start_with_openclaw:true, meaning it is designed to be started automatically if integrated—this increases its access surface.
Persistence & Privilege
The skill runs background processes (monitor, integration), persists a SQLite DB and logs, and includes start/stop scripts. 'always' is false and it does not force-enable itself in the registry, but its files and config indicate it is intended to be integrated (auto-start) with OpenClaw; that persistent presence is reasonable for a monitoring/self-managing service but should be reviewed by the operator.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install subagent-context-compactor
  3. After installation, invoke the skill by name or use /subagent-context-compactor
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial native agent release with hierarchical compression and memory-based triggers. - Migrated from plugin/JS implementation to standalone Python agent with API server and monitoring tools - Introduced HOT/WARM/COLD three-level context compression strategy - Automatic compaction triggered by token usage, message counts, timer, or manual command - New monitoring and reporting scripts for compression status and resource usage - Added configuration files for compression thresholds and strategies - Removed previous JS/TypeScript plugin files; all logic is now in Python and shell scripts
Metadata
Slug subagent-context-compactor
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Context Compactor?

上下文压缩代理,采用分层压缩策略,基于内存使用触发机制。处理HOT/WARM/COLD三层数据,优化token使用。当用户需要压缩对话上下文、优化内存使用、管理会话历史、减少token消耗时使用此技能。特别适用于长时间对话、复杂任务处理、需要保留重要历史信息的场景。 It is an AI Agent Skill for Claude Code / OpenClaw, with 308 downloads so far.

How do I install Context Compactor?

Run "/install subagent-context-compactor" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Context Compactor free?

Yes, Context Compactor is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Context Compactor support?

Context Compactor is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Context Compactor?

It is built and maintained by geoshan (@geoshan); the current version is v1.0.0.

💬 Comments