Aggressive Context Optimizer
v1.0.0-alphaSlash OpenClaw token costs and prevent context overflow. Use whenever the user mentions high API costs, expensive tokens, context truncation, context overflo...
⭐ 0· 106·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 and description match the contained files and instructions. The SKILL.md and bundled Python script both audit and apply OpenClaw configuration changes (bootstrap, memory, tool caps, pruning, compaction). No unrelated binaries, env vars, or external services are requested.
Instruction Scope
The runtime instructions direct the agent (and the user) to run the included script and OpenClaw CLI commands (/status, /usage, openclaw config validate). The script legitimately reads the openclaw.json, reports findings, and can write tuned settings. This stays within the advertised purpose, but it does perform file I/O on a global config and invokes the 'openclaw' CLI.
Install Mechanism
No install spec; the skill is instruction + source files only. Nothing is downloaded or installed automatically — lowest risk for arbitrary code fetching. The provided Python script runs locally.
Credentials
The skill declares no required environment variables, no credentials, and no config paths up front. The behavior (reading/writing the OpenClaw config) is proportional to its purpose.
Persistence & Privilege
The skill does not force persistent inclusion (always:false) nor request special platform privileges, but it writes changes to the shared openclaw.json (global agent config). That is expected for a config-tuning tool but is high-impact: changes affect all agents using that config. The script attempts rollback on validation failure but does not make an on-disk backup before writing and relies on re-writing the original in-memory object on error. Also _extract_config_path parses the CLI output for a path — if the 'openclaw config file' output were untrusted or manipulated this could point to an unexpected file path.
Assessment
This skill is coherent with its purpose but it will modify your global OpenClaw config. Recommended precautions before using --apply:
- Run the script without --apply first to audit (python scripts/context_optimizer.py).
- Back up your openclaw.json manually (copy the file) so you can restore it if needed.
- Inspect the printed changes the script will make; the script prints SET lines before applying.
- Ensure the 'openclaw' CLI on the host is the expected trusted binary (the script relies on its output to find the config path and to validate changes).
- Prefer trying changes in a non-production or test agent first, or apply balanced (not aggressive) defaults initially.
- If you have concerns about automatic writes, manually edit the config using the examples in references/ to control exactly what changes are made.Like a lobster shell, security has layers — review code before you run it.
latestvk978awzqa7nhakvp4cw4sr18rd831qtp
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
