An automated context management protocol that prevents AI memory loss and token waste through intelligent watermarking, partitioning, and checkpoint archiving.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install context-guard
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 context-guard using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
Context Guard is a specialized management protocol designed for high-performance AI agents within the Openclaw Skills ecosystem. It solves the critical problems of context window saturation, performance degradation (lag), and the "forgetting" phenomenon that occurs during long-running sessions. By implementing a rigorous system of watermarks and automated archiving, it ensures that agents remain lean, responsive, and always aware of their current mission state.
This skill integrates deeply with the agent's heartbeat and session start-up routines, providing a standardized way to partition context into core instructions, recent dialogue, decision logs, and background knowledge. It bridges the gap between context-sentinel and context-budgeting methodologies, offering a robust framework for both primary agents and sub-agents to operate without wasting valuable tokens.
To deploy this protocol within your Openclaw Skills environment, ensure your agent has access to a file system and update your heartbeat configuration.
# Create the necessary memory structure
mkdir -p memory/
touch STATUS.md MEMORY.md HEARTBEAT.md
Integrate the context monitoring rules into your agent's system prompt or SOUL.md to ensure the session_status check is performed during every heartbeat.
Context Guard organizes session metadata and long-term memory into a structured set of Markdown files to ensure portability and clarity.
| File | Category | Description |
|---|---|---|
| STATUS.md | Task Metadata | Tracks the current mission, progress, blockers, and specific data like TX hashes or URLs. |
| MEMORY.md | Long-term | Stores permanent strategies, tool configurations, and significant user preferences. |
| memory/YYYY-MM-DD.md | Daily Logs | A chronological record of key decisions, discoveries, and lessons learned. |
| HEARTBEAT.md | Monitoring | Contains the recurring checklist for watermark monitoring and protocol adherence. |
Loading
A conversation-intelligent skill that generates a personalized builder identity and recommends AI tools based on your actual work habits.

Analyze your conversation history to discover your unique builder archetype and receive tailored AI tool recommendations.

An advanced identity generator that transforms conversation history and social data into a personalized AI agent profile and crypto wallet.

An advanced search and intelligence skill that enables AI agents to perform deep research, web scraping, and cited answering via Valyu.ai.

A professional-grade email delivery skill for sending transactional and marketing messages at scale with 99.88% deliverability.

A specialized framework and guide for building, testing, and evaluating Model Context Protocol (MCP) servers to bridge LLMs with external APIs.








































