← 返回 Skills 市场
sdc-creator

Session Compact

作者 deep-claw · GitHub ↗ · v1.2.1 · MIT-0
cross-platform ⚠ suspicious
126
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install session-compact-skill
功能描述
Intelligent session compression plugin for OpenClaw that automatically manages token consumption and supports unlimited-length conversations. Compresses hist...
安全使用建议
This package appears to implement the session-compaction feature it advertises, but there are a few red flags to check before installing: - Packaging mismatch: the registry lists no install spec, yet the bundle contains a buildable code plugin (TypeScript, bin script, openclaw.plugin.json). Confirm whether you intend to run the code plugin (it requires building and copying into ~/.openclaw/extensions). - Exec/CLI LLM calls: the implementation notes use of execSync to call the OpenClaw CLI for LLM summaries. That is convenient but increases risk (shell invocation, reliance on host CLI config). Inspect the built dist/index.js (or source) for exec/child_process usage and ensure arguments are properly escaped or, ideally, prefer a direct API integration. - File writes & config edits: the plugin will persist JSON sessions under ~/.openclaw/sessions and expects changes to ~/.openclaw/openclaw.json. Back up your OpenClaw config and existing sessions before enabling. - Source provenance: the package lists no homepage and the repository URLs in docs point to GitHub placeholders. If you plan to install, verify the source repository, review the built JS to ensure no hidden network calls or obfuscated code, and prefer installing via the official ClawHub/marketplace rather than manual cloning when possible. - Inconsistent docs: different files claim different coverage/version numbers and at least one doc notes the plugin previously triggered platform security intercepts (execSync usage). Treat these as signs to audit the code rather than immediate red flags. If you are not comfortable auditing the code yourself, ask the maintainer for a signed release on the official registry (ClawHub) or request an upstream review that addresses the execSync usage and clarifies packaging/installation instructions.
功能分析
Type: OpenClaw Skill Name: session-compact-skill Version: 1.2.1 The skill bundle contains a high-risk shell injection vulnerability in 'src/compact/engine.ts'. The 'callLLM' function uses 'execSync' to execute a constructed shell command that includes conversation content. While it attempts to escape double quotes and backslashes, it fails to sanitize other shell metacharacters (e.g., backticks, dollar signs, or pipes), potentially allowing for arbitrary command execution if the agent processes malicious input. Although the extensive documentation and 163 test cases suggest the intent is a legitimate session management tool, the unsafe implementation of CLI integration poses a significant security risk.
能力标签
cryptorequires-oauth-token
能力评估
Purpose & Capability
Name/description align with the code and docs: the repo contains a compaction engine, session store, session manager, CLI registration, and an openclaw.plugin.json. However there is a packaging mismatch: registry metadata lists this as an instruction-only skill (no install spec), yet the bundle contains a fully fledged code plugin (TypeScript source, bin script, plugin manifest, package.json). That is explainable (workspace skill + accompanying plugin code) but it is an inconsistency the user should be aware of.
Instruction Scope
SKILL.md and other docs instruct only relevant actions: install/build the plugin, add the plugin id to ~/.openclaw/openclaw.json, restart the gateway, and use openclaw CLI commands. The runtime behavior described (storing sessions under ~/.openclaw/sessions, reading plugin config, compressing messages, fallback to code extraction) is consistent with the code layout. There are no instructions that request unrelated system data or to post data to unknown external endpoints in the provided docs.
Install Mechanism
No formal install spec was included in the registry entry (declared 'instruction-only'), but documentation and package files provide manual install steps (git clone, npm install, build, copy to ~/.openclaw/extensions). The sources are typical (npm/TypeScript project) and there are no opaque download URLs in the provided docs. Still: the mismatch between 'no install spec' and the presence of buildable code is a packaging/documentation inconsistency to check.
Credentials
The skill declares no required env vars or credentials (consistent). The implementation calls the OpenClaw CLI/engine (docs and comments indicate callLLM() currently invokes OpenClaw via execSync), which relies on the host's OpenClaw configuration rather than new secrets. This is proportionate to the stated purpose, but the execSync / CLI-based LLM call means the plugin depends on the host OpenClaw runtime and any credentials it uses — verify that you trust that local configuration.
Persistence & Privilege
The plugin persists session data to ~/.openclaw/sessions and expects edits to ~/.openclaw/openclaw.json to enable the plugin/CLI. That level of access is expected for a session-management plugin. The skill does not request global 'always: true' privilege and does not appear to modify other skills' credentials or configs beyond adding itself to plugins.allow (normal for plugins).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install session-compact-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /session-compact-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.1
v1.2.1: Fixed config persistence, 163 tests, updated deps to openclaw 2026.4.9, synced with code plugin
v1.1.0
Add cross-session memory, pre-compaction protection (WAL protocol), context recovery, working buffer, and daily memory archive
v1.0.0
Initial release: Intelligent session compression skill for OpenClaw
元数据
Slug session-compact-skill
版本 1.2.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

Session Compact 是什么?

Intelligent session compression plugin for OpenClaw that automatically manages token consumption and supports unlimited-length conversations. Compresses hist... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 126 次。

如何安装 Session Compact?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install session-compact-skill」即可一键安装,无需额外配置。

Session Compact 是免费的吗?

是的,Session Compact 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Session Compact 支持哪些平台?

Session Compact 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Session Compact?

由 deep-claw(@sdc-creator)开发并维护,当前版本 v1.2.1。

💬 留言讨论