context-manager
AI-powered context management for OpenClaw sessions
Why use this skill?
Maintain peak OpenClaw performance with the Context Manager. Automatically summarize session history, reduce token bloat, and reset agents while preserving key context.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/plgonzalezrx8/context-managerWhat This Skill Does
The Context Manager skill provides an intelligent mechanism for OpenClaw agents to prune and condense their conversation history without losing critical knowledge. Instead of simply deleting logs, this tool prompts the agent to perform a self-reflective summary of its active session. This summary is then injected back into a fresh session file, effectively performing a "garbage collection" that maintains the semantic core of previous interactions while resetting the token buffer to ensure high-speed performance and model coherence.
Installation
To install this skill, run the following command in your terminal within the OpenClaw environment:
clawhub install openclaw/skills/skills/plgonzalezrx8/context-manager
Use Cases
This skill is essential for power users and developers managing persistent agents. Use it when:
- You are managing long-running agent threads (e.g., project development or continuous research).
- The agent begins showing signs of latency or reduced instruction following due to context saturation (reaching 70-80% capacity).
- You need to clean up session overhead before starting a new, complex task within an existing agent context.
- You want to archive older interaction data into a compressed, human-readable summary while keeping the active state lean.
Example Prompts
- "OpenClaw, run the context-manager check-all command to see if any sessions are nearing their token limits."
- "Summarize the current agent:main:main session and replace the context, I need to clear out the excess noise."
- "Set the context threshold to 70% and make the summary depth comprehensive so I don't lose the specific architecture details from our previous session."
Tips & Limitations
- Be Careful with --replace: The
--replaceflag is destructive; it creates a backup inmemory/compressed/, but the primary session file is reset. Always ensure your agent hasn't been in the middle of a critical, non-summarized task. - Depth Settings: Use the
set-depthcommand to tune the balance. If you are working on code, use 'comprehensive'; for casual chat, 'brief' is sufficient. - Monitoring: Use
check-allregularly. It is better to perform a planned compression than to wait for an error when the token limit is reached.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-plgonzalezrx8-context-manager": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read
Related Skills
openrouter-analytics
Review OpenRouter usage, analytics, and troubleshooting data via API. Use when the user asks for spend/usage monitoring, activity trends, per-key management reporting, or deep investigation of specific request IDs (latency, provider fallback, finish reason, token/cost breakdown).
apple-remind-me
Natural language reminders that create actual Apple Reminders.app entries (macOS-native)
workflow-orchestrator
Structural parity skeleton for queue-driven orchestration in a workflow context.
web-markdown-navigator
Fetch webpages and return clean markdown instead of raw HTML. Use for URL reading, extraction, and summarization tasks where the user wants markdown output; use browser fallback for JS-heavy/SPA pages when extraction is thin.
openclaw-healthcheck-cron
Create and run a reusable OpenClaw deep healthcheck automation using a cron job plus a script. Use when setting up scheduled OpenClaw health audits, standardizing security/status checks, sanitizing environment-specific values for sharing, and packaging the setup for reuse.