An optimization suite for AI agents designed to eliminate context bloat and prevent token leaks through isolation and RAG protocols.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install openclaw-token-memory-optimizer
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 openclaw-token-memory-optimizer 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 skill is a technical framework designed to keep your AI environment lean, efficient, and cost-effective. As a vital component within the ecosystem of Openclaw Skills, it provides developers with the procedural logic needed to manage large-scale context windows without sacrificing performance. It specifically addresses the issues of session degradation and high latency by implementing task isolation and structured memory management.
By utilizing this skill, agents can maintain long-term continuity through the Digital Soul protocol, which involves periodic summarization and fact extraction. This ensures that the agent remains focused on current objectives while offloading historical data to a local retrieval system, effectively bypassing the limitations of standard context windows.
To deploy these Openclaw Skills, first configure your background tasks in openclaw.json to use isolated sessions:
{
"cron": {
"jobs": [
{
"name": "System Check",
"sessionTarget": "isolated",
"payload": { "deliver": true }
}
]
}
}
Next, enable local RAG by specifying your embedding model and memory paths:
# Create the required memory structure
mkdir -p memory/
touch MEMORY.md
{
"memorySearch": {
"embedding": {
"provider": "local",
"model": "hf:second-state/All-MiniLM-L6-v2-Embedding-GGUF"
},
"store": "sqlite",
"paths": ["memory/", "MEMORY.md"]
}
}
The skill organizes knowledge across three primary layers to ensure efficient retrieval and context preservation:
| Component | Format | Purpose |
|---|---|---|
| Global Memory | MEMORY.md |
Persistent store for high-level project rules, tech stacks, and user preferences. |
| Temporal Logs | memory/YYYY-MM-DD.md |
Daily activity logs that provide a chronological audit trail of agent decisions. |
| Session Archives | ~/.openclaw/sessions/*.jsonl |
Raw interaction data used for semantic search and historical indexing. |
| Vector Index | SQLite (Local) | Stores embeddings for local RAG, enabling sub-second retrieval of historical facts. |
.jsonl session files for searchable recall.memory_search and memory_get to surgically inject data into the context window.Loading
A dedicated CLI utility for installing and managing private skills from a local Claw Skill Nest server to your agent workspace.

A robust orchestration engine that transforms scripts into cinematic videos through a controlled, stage-gated pipeline using Seedream and Seedance.

Transform ideas, URLs, and text into professional podcasts, explainer videos, and high-fidelity AI images using a specialized shell-based automation suite.

An Electron-based fluid glass ball companion that provides a physical presence and voice for your Openclaw agent.

An automated health tracking skill that extracts and logs metrics like weight and blood sugar from chat messages to the AX3 system.

An AI-driven interactive storytelling engine that generates branching narratives and roleplay scenarios across infinite multiverse genres.








































