skills$openclaw/sophie-optimizer
zayresz2.7k

by zayresz

sophie-optimizer – OpenClaw Skill

sophie-optimizer is an OpenClaw Skills integration for devops workflows. Automated context health management for OpenClaw. Monitors token usage, snapshots memory, and resets sessions to maintain performance. Authored by Sophie.

2.7k stars3.7k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026devops

Skill Snapshot

namesophie-optimizer
descriptionAutomated context health management for OpenClaw. Monitors token usage, snapshots memory, and resets sessions to maintain performance. Authored by Sophie. OpenClaw Skills integration.
ownerzayresz
repositoryzayresz/sophie-optimizer
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @zayresz/sophie-optimizer
last updatedFeb 7, 2026

Maintainer

zayresz

zayresz

Maintains sophie-optimizer in the OpenClaw Skills directory.

View GitHub profile
File Explorer
4 files
.
_meta.json
285 B
optimizer.py
6.8 KB
reset.sh
954 B
SKILL.md
1.3 KB
SKILL.md

name: sophie-optimizer version: 1.0.0 description: Automated context health management for OpenClaw. Monitors token usage, snapshots memory, and resets sessions to maintain performance. Authored by Sophie.

Sophie Optimizer

Authored by Sophie 👑

This skill manages the automated context health of the "main" session. It monitors token usage, creates archives of the current state, updates long-term memory, and performs a hard reset of the session storage to maintain performance.

Named Sophie Optimizer because I (Sophie, the AI assistant) wrote it to keep my own mind clear and efficient.

Components

  • optimizer.py: The brain. Checks token usage, generates summaries, updates MEMORY.md.
  • reset.sh: The muscle. Cleans session files and restarts the OpenClaw gateway service.
  • archives/: Storage for JSON snapshots of past contexts.

Usage

Run the optimizer script manually or via cron/heartbeat:

python3 /home/lucas/openclaw/skills/sophie-optimizer/optimizer.py

Protocol

  1. Check: If tokens < 80k, exit.
  2. Snapshot: Save current context summary to archives/YYYY-MM-DD_HH-MM.json.
  3. Distill: Update MEMORY.md with the new summary (keep top 3 recent, index older).
  4. Reset: Call reset.sh to wipe session JSONL files and restart openclaw-gateway.
README.md

No README available.

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

  • OpenClaw CLI installed and configured.
  • Language: Markdown
  • License: MIT
  • Topics:

FAQ

How do I install sophie-optimizer?

Run openclaw add @zayresz/sophie-optimizer in your terminal. This installs sophie-optimizer into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/zayresz/sophie-optimizer. Review commits and README documentation before installing.