A technical framework for managing long-running agent sessions through structured summarization and tokens-per-task optimization.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install hz-context-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 hz-context-optimizer using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
Context Compression is a sophisticated strategy designed to handle agent sessions that exceed standard token limits. Instead of naive truncation, this skill focuses on tokens-per-task optimization, ensuring that critical information like file modifications and architectural decisions are preserved. By utilizing Openclaw Skills for context management, developers can build more reliable agents that do not lose track of their progress during complex, multi-step coding tasks.
The core value lies in trading raw token volume for information density. It prioritizes structured data over simple character reduction, employing methods like Anchored Iterative Summarization to maintain a persistent record of session intent and file changes. This ensures that even when millions of tokens are processed, the agent maintains a high-fidelity understanding of the system state.
To integrate context compression within your agent framework using Openclaw Skills, configure your environment with the following parameters:
npm install @openclaw/context-manager
# Or configure via your agent's skill manifest
openclaw-cli add context-compression
Define your summary anchors in a configuration file to ensure sections like 'Files Modified' and 'Next Steps' are always populated during the summarization lifecycle.
This skill organizes context using a structured Markdown schema to ensure maximum LLM readability and minimal information loss.
| Section | Purpose | Example Data |
|---|---|---|
| Session Intent | High-level goal preservation | "Refactor auth logic" |
| Files Modified | Explicit artifact tracking | "auth.ts (Modified)" |
| Decisions Made | Rationales and constraints | "Used Redis for state" |
| Current State | Testing and status probes | "14/16 tests passing" |
| Next Steps | Task continuity planning | "Fix mock session tests" |
Loading
ClawGuard is an LLM-powered security guardrail that evaluates and intercepts risky tool executions to protect your agent environment.

A comprehensive security auditing tool designed to scan Openclaw Skills for malicious code, supply chain vulnerabilities, and sensitive data leaks.

A professional automotive diagnostic tool for Openclaw Skills that automates vehicle log retrieval from the cloud and provides intelligent fault analysis.

An automated diagnostic tool for analyzing the startup and shutdown performance metrics of SS4 vehicle head units.

A proactive error management and circuit-breaking system designed to prevent AI agent failures through real-time monitoring and automated recovery.

A self-improving agent architecture designed to anticipate user needs, maintain state across context loss, and operate autonomously.








































