Context Switch Token Optimizer
v1.0.1智能对话上下文切换与 Token 优化。分析对话主题连续性以管理上下文、在话题间切换并节省 Token。 适用于多任务对话、项目工作流、学习研究等需管理上下文与 Token 使用的场景。
⭐ 0· 151·0 current·0 all-time
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description (context switching and token optimization) match the code and SKILL.md. The skill only requests configuration and logging environment overrides relevant to topic management and token optimization; no unrelated credentials, binaries, or external services are required.
Instruction Scope
SKILL.md and CLI instruct running the included Python scripts which read/write a local state file (memory/context_switch_state.json), load config.json, and may scan local memory files (configured via file_types). The runtime instructions do not ask the agent to read arbitrary OS secrets or network endpoints. Note: the skill will create and modify files in the working directory (memory/), so consider where the agent runs.
Install Mechanism
There is no install spec (instruction-only from registry perspective), which is low-risk. However the package includes multiple Python source files (no external downloads or package installers). Because code is present, running the skill will write state to disk; no remote fetch/install behavior was observed.
Credentials
Environment variables the skill reads (CONTEXT_HISTORY_SIZE, MEMORY_SEARCH_DEPTH, TOKEN_OPTIMIZER_ENABLED, CONTEXT_SWITCH_LOG_LEVEL) are directly tied to its configuration and behavior. No secrets/keys/tokens/passwords are required.
Persistence & Privilege
The skill persists its own state under memory/context_switch_state.json and updates it during operations (save_context_state). always:false and normal autonomous invocation are set. This is expected for a context manager, but be aware it will create/modify files in the agent's working directory.
Assessment
This skill appears internally consistent and implements the described context-switching and token-optimization behavior without requesting secrets or performing network calls. Before installing/running: 1) Inspect or run it in an isolated directory (it will create/modify memory/context_switch_state.json and other files). 2) If you don't want automatic optimization, set TOKEN_OPTIMIZER_ENABLED=false to disable auto-triggering. 3) Enable debugging (CONTEXT_SWITCH_LOG_LEVEL=DEBUG) if you want to observe similarity calculations and compression decisions. 4) Review the memory/ files after test runs and confirm behavior on representative conversations. If you need the skill to never write to disk, do not run it or run with a sandboxed working directory.Like a lobster shell, security has layers — review code before you run it.
latestvk97ejztxsce9ffmqvbkwn5kdvh836vep
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
