← Back to Skills Marketplace
jack-yang-ai

Token Optimization

by Jack-Yang-ai · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ✓ Security Clean
622
Downloads
0
Stars
2
Active Installs
2
Versions
Install in OpenClaw
/install token-optimization
Description
Reduce OpenClaw per-turn prompt costs by 70%+ through file splitting, prompt caching, context pruning, and model routing. Tested on production setup with 69...
Usage Guidance
This is a coherent, instruction-only optimization guide, but take precautions before applying it: 1) Back up your ~/.openclaw/workspace and openclaw.json (don't rely on the mv .bak as your only copy). 2) Test changes in a staging or non-production agent first — splitting/removing BOOTSTRAP.md or shrinking AGENTS.md can unintentionally change behavior. 3) Be cautious about caching command outputs or file contents: allowing 'exec' and 'read' to be cached may store sensitive data in prompts that could later be sent to models or logs. 4) Understand heartbeat recommendations — they keep caches warm but can increase calls/costs. 5) Ensure you have the OpenClaw CLI/tools available (session_status, openclaw gateway restart) — the registry metadata doesn't list these but SKILL.md assumes them. If you want further review, provide your current openclaw.json and a list of workspace files (or test changes on a copy) so I can point out exact edits and potential impacts.
Capability Analysis
Type: OpenClaw Skill Name: token-optimization Version: 1.1.0 The skill bundle provides a legitimate and systematic guide for optimizing token usage and reducing API costs in OpenClaw. It includes instructions for the agent to audit workspace file sizes, split large markdown files (e.g., AGENTS.md, MEMORY.md), and update the 'openclaw.json' configuration to enable prompt caching and context pruning. The commands used (e.g., 'wc', 'mv', 'openclaw gateway restart') and the configuration changes are directly aligned with the stated purpose and do not exhibit signs of malicious intent or data exfiltration.
Capability Assessment
Purpose & Capability
The skill's purpose (workspace splitting, prompt caching, pruning, model routing) matches the steps in SKILL.md. However, the registry metadata declares no required binaries/configs while the SKILL.md explicitly requires OpenClaw 2026.3.x, the ability to edit ~/.openclaw/workspace files and openclaw.json, and uses CLI commands (e.g., session_status, openclaw gateway restart, wc, mv, cat). That mismatch is operational (the guide assumes an OpenClaw runtime) but not malicious.
Instruction Scope
Instructions tell the operator to read, move, and delete workspace files (~/.openclaw/workspace/*), edit openclaw.json, and restart the gateway. These are expected for this purpose but carry operational risk: deleting/moving BOOTSTRAP.md or other files can change runtime behavior; adding caching/pruning rules that allow 'exec' and 'read' can cause command outputs and file contents to be cached and re-sent to models (potential data exposure). The guide also recommends heartbeat intervals to keep cache warm (operational cost/behavior implications).
Install Mechanism
No install spec or bundled code — instruction-only. This minimizes supply-chain risk because nothing is downloaded or executed by the skill itself.
Credentials
The skill requests no environment variables or external credentials. It references Anthropic/OpenRouter providers but assumes the host already has provider creds configured; it does not ask for new secrets, which is proportional for its stated task.
Persistence & Privilege
The skill is not always-enabled and is user-invocable only. It directs changes to local agent config and workspace files (openclaw.json, workspace/*.md), which is normal for an optimization guide but means it will persist changes across runs if you apply them — make backups and test in staging.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install token-optimization
  3. After installation, invoke the skill by name or use /token-optimization
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.0
v1.1.0: Added README, step-by-step guide, troubleshooting, real-world results
v1.0.0
Initial release: 3-layer token optimization framework for OpenClaw
Metadata
Slug token-optimization
Version 1.1.0
License MIT-0
All-time Installs 2
Active Installs 2
Total Versions 2
Frequently Asked Questions

What is Token Optimization?

Reduce OpenClaw per-turn prompt costs by 70%+ through file splitting, prompt caching, context pruning, and model routing. Tested on production setup with 69... It is an AI Agent Skill for Claude Code / OpenClaw, with 622 downloads so far.

How do I install Token Optimization?

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

Is Token Optimization free?

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

Which platforms does Token Optimization support?

Token Optimization is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Token Optimization?

It is built and maintained by Jack-Yang-ai (@jack-yang-ai); the current version is v1.1.0.

💬 Comments