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.

What this means

Sensitive details or incorrect facts from a conversation could be stored and reused in later sessions, affecting future answers or actions.

Why it was flagged

The optimizer appends extracted conversation facts into MEMORY.md, creating persistent agent memory from chat content.

Skill content
const updatedContent = memoryContent + `\n\n## Context Optimization - ${timestamp}\n${newMemoryContent}\n`;
fs.writeFileSync(memoryFile, updatedContent);
Recommendation

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.

What this means

If a summary is incomplete or wrong, the agent may lose important instructions or constraints, and that loss can carry forward into later work.

Why it was flagged

The default configuration enables automatic removal of old context while keeping only recent messages.

Skill content
"cleanup": {
  "remove_old_context": true,
  "keep_recent_messages": 10,
  "auto_purge": true
}
Recommendation

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.

What this means

If integrated into background workflows, the skill may change context or memory without the user manually invoking it each time.

Why it was flagged

The skill advertises background monitoring and automatic optimization, although the provided artifacts do not show a hidden daemon or self-starting persistence mechanism.

Skill content
- Continuous background monitoring of context length
- Configurable thresholds for automatic optimization
- Seamless integration with normal conversation flow
Recommendation

Verify whether any scheduler, cron job, or OpenClaw background hook is enabled, and disable automatic monitoring unless you explicitly want it.

What this means

On some systems the skill may fail, or write summaries and memory files somewhere unexpected.

Why it was flagged

The monitor defaults to a hardcoded author-specific workspace path instead of the installing user's workspace.

Skill content
constructor(workspaceDir = '/home/blackworm/.openclaw/workspace')
Recommendation

Change the implementation to derive the workspace path from OpenClaw configuration or an explicit user setting.