Optimize Context
ReviewAudited by ClawScan on May 10, 2026.
Overview
The skill is purpose-aligned and shows no exfiltration, but it can automatically persist and prune conversation context in ways that may preserve sensitive or incorrect information and affect future chats without clear approval controls.
Install only if you are comfortable with the agent automatically summarizing chats, saving facts to MEMORY.md, and pruning old context. Before enabling it, review or disable auto-purge and background monitoring, confirm where memory files are written, and avoid using it for conversations containing secrets or highly sensitive personal information.
Findings (4)
Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.
Sensitive details or incorrect facts from a conversation could be stored and reused in later sessions, affecting future answers or actions.
The optimizer appends extracted conversation facts into MEMORY.md, creating persistent agent memory from chat content.
const updatedContent = memoryContent + `\n\n## Context Optimization - ${timestamp}\n${newMemoryContent}\n`;
fs.writeFileSync(memoryFile, updatedContent);Require explicit user approval before writing to MEMORY.md, record provenance for saved facts, filter secrets and sensitive data, and provide an easy disable/delete option.
If a summary is incomplete or wrong, the agent may lose important instructions or constraints, and that loss can carry forward into later work.
The default configuration enables automatic removal of old context while keeping only recent messages.
"cleanup": {
"remove_old_context": true,
"keep_recent_messages": 10,
"auto_purge": true
}Make pruning opt-in per run, keep restorable backups of the full context, show a summary preview before clearing, and avoid using automatic purge as the default.
If integrated into background workflows, the skill may change context or memory without the user manually invoking it each time.
The skill advertises background monitoring and automatic optimization, although the provided artifacts do not show a hidden daemon or self-starting persistence mechanism.
- Continuous background monitoring of context length - Configurable thresholds for automatic optimization - Seamless integration with normal conversation flow
Verify whether any scheduler, cron job, or OpenClaw background hook is enabled, and disable automatic monitoring unless you explicitly want it.
On some systems the skill may fail, or write summaries and memory files somewhere unexpected.
The monitor defaults to a hardcoded author-specific workspace path instead of the installing user's workspace.
constructor(workspaceDir = '/home/blackworm/.openclaw/workspace')
Change the implementation to derive the workspace path from OpenClaw configuration or an explicit user setting.
