Sophie Optimizer
Analysis
Review before installing: this skill can rewrite long-term memory, archive context summaries, delete the main session files, and restart OpenClaw, while its documented token-threshold safety check is not implemented in code.
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.
Checks for instructions or behavior that redirect the agent, misuse tools, execute unexpected code, cascade across systems, exploit user trust, or continue outside the intended task.
rm -f "$SESSION_DIR"/*.jsonl rm -f "$SESSION_DIR"/*.json ... systemctl --user restart $SERVICE_NAME
The reset script deletes the main OpenClaw session JSON/JSONL files and restarts the gateway service. This is purpose-related but high-impact and destructive, especially because it can be launched by optimizer.py when --reset is supplied.
1. **Check**: If tokens < 80k, exit.
The documentation presents a token-threshold safety gate, but the complete optimizer.py implementation does not compare tokens to 80000 before archiving, updating memory, or launching reset.sh when --reset is set.
Run the optimizer script manually or via cron/heartbeat:
The skill does not install cron itself, but the documentation explicitly supports recurring unattended operation. This is notable because the same workflow can update memory and trigger a hard reset.
Checks for exposed credentials, poisoned memory or context, unclear communication boundaries, or sensitive data that could leave the user's control.
MEMORY_FILE = os.path.expanduser("~/openclaw/MEMORY.md")
...
new_section += f"- **Summary:** {summ}\n\n---\n\n"
...
f.write(final_content)The script persists the supplied summary text into OpenClaw's MEMORY.md and also writes archive JSON files. The artifacts do not show origin labels, sanitization, review, or retention limits for memory content.
