A sophisticated optimization framework designed to reduce LLM API token consumption by 20-35% through intelligent estimation, memory management, and history compression.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install claude-code-api-optimizer-skill
Copy the skill folder to one of these locations
~/.openclaw/skills/ <project>/skills/ Priority: Workspace > Local > Bundled
Copy this prompt to OpenClaw to install it automatically.
Help me install claude-code-api-optimizer-skill using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
The Token Optimizer is a model-agnostic framework within the Openclaw Skills ecosystem designed to combat the rising costs of LLM API usage. By implementing a standardized set of rules for context management, it allows developers to maintain high-quality agent performance while significantly reducing the financial overhead of long-running conversations.
This skill focuses on three primary pillars: estimating usage before it happens, extracting high-value memory into persistent storage, and compressing stale conversation history. By integrating these Openclaw Skills into your agent's core logic, you ensure that only the most relevant and cost-effective data is transmitted to the model provider.
Integrating the Token Optimizer is straightforward as it requires no external dependencies. Follow these steps to activate these Openclaw Skills:
SKILL.md content directly into your agent's prompt or dedicated skills directory.# Example estimation logic
tokens = char_count / 4 (text) or char_count / 2 (JSON)
./memory directory to store persistent information.The skill organizes its memory and optimization metadata using a clear, hierarchical structure to ensure fast retrieval and low overhead.
| File / Element | Description | Format |
|---|---|---|
MEMORY.md |
The main index file acting as a pointer to all extracted knowledge. | Markdown List |
memory/*.md |
Individual topic files (e.g., project-goals.md) containing detailed context. | Markdown with Frontmatter |
<compressed-context> |
A block injected at the top of prompts containing dense summaries of past turns. | XML-wrapped Markdown |
token-formula.md |
Reference sheet for calculating precise character-to-token ratios. | Markdown |
Loading
An automated code generation tool that creates full-stack Django and Vue.js modules based on simple user descriptions.

A professional diagnostic skill designed to harden long-running AI agent architectures by implementing structured session bridges and verification protocols.

A specialized skill designed to detect, tag, and log AI capability gaps and rule conflicts to drive continuous architectural evolution.

A robust state-machine framework that converts conversational promises into persistent, trackable, and auto-executing files.

An AI-powered image generation and distribution tool that edits a fixed reference portrait and sends the results to various messaging platforms.

A standardized coding workflow for AI agents that enforces planning, implementation, and rigorous verification for high-quality software development.








































