← 返回 Skills 市场
thanksandyou

token-optimizer-off

作者 thanksandyou · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
208
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install token-optimizer-off
功能描述
自动压缩会话输入token,智能管理上下文和任务记忆,将token数量从10万+压缩至8,000以内,降低成本。
安全使用建议
This skill appears to do what it claims: compress conversation history using an LLM and manage per-task memory files. Before installing: (1) review ~/.openclaw/config.json because the scripts will read it and may use its apiKey to call an LLM; ensure you trust that configuration and its permissions; (2) expect the skill to read/write files under ~/.openclaw/memory and create backups and a .session_state.json — back up anything important first; (3) the skill uses the OpenAI client (openai package) and will make network calls to whatever API URL/model you configure; provide an API key only if you trust the code and provider; (4) inspect the provided scripts (they are plain Python and readable) and run them in a safe environment or sandbox before granting access to production data; (5) integration example uses subprocess.run with a path containing '~' (tilde) which may not expand — fix path expansion in your agent code. If you want greater assurance, run the unit tests locally (they mock/require a TOKEN_OPTIMIZER_API_KEY env var) and verify no unexpected network endpoints or logging of secrets occur. If you observe the skill contacting unknown remote endpoints or printing full contents of config/API keys, treat that as suspicious and stop using it.
功能分析
Type: OpenClaw Skill Name: token-optimizer-off Version: 1.0.0 The skill bundle performs high-risk operations by accessing the master OpenClaw configuration file (~/.openclaw/config.json) to extract sensitive AI API keys and base URLs (scripts/compress_session.py). While this is intended to provide a 'zero-config' experience for its token optimization features, reading credentials outside of the skill's own directory is a significant security risk. The bundle also manages files in the global ~/.openclaw/memory/ directory and provides instructions in SKILL.md for the AI agent to execute these scripts automatically. No evidence of intentional data exfiltration to unauthorized third parties was found, as the credentials appear to be used solely for interacting with the user's configured AI service.
能力评估
Purpose & Capability
The name/description describe session-token compression and the shipped scripts implement that: session detection, compression via an LLM, memory indexing, and state management. The skill reads OpenClaw configuration (~/.openclaw/config.json) and memory (~/.openclaw/memory/) which is coherent with its goal to replace full history with summaries. No unrelated services or surprising credentials are requested.
Instruction Scope
SKILL.md and samples instruct the agent to run the provided scripts, read and write files under ~/.openclaw/memory and ~/.openclaw/workspace/skills/token-optimizer, and call compress_session which uses the OpenAI client. This is within scope, but it means the skill will access potentially sensitive files (OpenClaw config may contain API keys) and will write latest-summary.md, backups, and a .session_state.json. The integration example uses subprocess.run with cwd set to a tilde path (not expanded) — a minor implementation detail to fix. Overall the instruction set is explicit and limited to the task, not open-ended.
Install Mechanism
No install spec from external/untrusted URLs is included; files are provided in the skill bundle and requirements.txt only lists the openai library. This is a low-risk install model (instruction/code bundle) with no network download/install step from arbitrary hosts.
Credentials
The skill does not declare required env vars but will read ~/.openclaw/config.json for ai/llm settings and accepts TOKEN_OPTIMIZER_* environment overrides (API key, model, URL). That is proportionate to doing LLM-based compression, but users should be aware the skill will attempt to use/read their OpenClaw config (which may contain credentials). No unrelated credentials or external tokens are requested.
Persistence & Privilege
The skill is not always-enabled and does not request elevated platform privileges. It writes/updates files in the user's OpenClaw memory directory (latest-summary.md, backups, .session_state.json) which is expected behavior for a memory/optimizer skill. It does not modify other skills or global agent settings beyond the memory files it owns.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install token-optimizer-off
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /token-optimizer-off 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- **92% Token 节省** - 从 100K+ 压缩到 8K - **三层索引体系** - 任务层/记忆层/内容层 - **自动压缩** - 智能判断何时需要压缩 - **任务隔离** - 避免上下文污染 - **开箱即用** - 自动使用 OpenClaw AI 配置
元数据
Slug token-optimizer-off
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

token-optimizer-off 是什么?

自动压缩会话输入token,智能管理上下文和任务记忆,将token数量从10万+压缩至8,000以内,降低成本。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 208 次。

如何安装 token-optimizer-off?

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

token-optimizer-off 是免费的吗?

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

token-optimizer-off 支持哪些平台?

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

谁开发了 token-optimizer-off?

由 thanksandyou(@thanksandyou)开发并维护,当前版本 v1.0.0。

💬 留言讨论