← Back to Skills Marketplace
thanksandyou

token-optimizer-off

by thanksandyou · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
208
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install token-optimizer-off
Description
自动压缩会话输入token,智能管理上下文和任务记忆,将token数量从10万+压缩至8,000以内,降低成本。
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install token-optimizer-off
  3. After installation, invoke the skill by name or use /token-optimizer-off
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- **92% Token 节省** - 从 100K+ 压缩到 8K - **三层索引体系** - 任务层/记忆层/内容层 - **自动压缩** - 智能判断何时需要压缩 - **任务隔离** - 避免上下文污染 - **开箱即用** - 自动使用 OpenClaw AI 配置
Metadata
Slug token-optimizer-off
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is token-optimizer-off?

自动压缩会话输入token,智能管理上下文和任务记忆,将token数量从10万+压缩至8,000以内,降低成本。 It is an AI Agent Skill for Claude Code / OpenClaw, with 208 downloads so far.

How do I install token-optimizer-off?

Run "/install token-optimizer-off" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is token-optimizer-off free?

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

Which platforms does token-optimizer-off support?

token-optimizer-off is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created token-optimizer-off?

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

💬 Comments