sophie-optimizer
Automated context health management for OpenClaw. Monitors token usage, snapshots memory, and resets sessions to maintain performance. Authored by Sophie.
- License 许可
- MIT
- 最近更新
- 2026-04-05
- Stars
- ★ 7
- Forks
- 1
01 前言 Front Matter
- 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.
02 资源文件 3
- 参考文档_meta.json285 B
- 脚本optimizer.py6.8 KB
- 脚本reset.sh954 B
03 SKILL.md 正文
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
- Check: If tokens < 80k, exit.
- Snapshot: Save current context summary to
archives/YYYY-MM-DD_HH-MM.json. - Distill: Update
MEMORY.mdwith the new summary (keep top 3 recent, index older). - Reset: Call
reset.shto wipe session JSONL files and restartopenclaw-gateway.
04 同仓库更多 Skills
zyfai
Earn yield on any Ethereum wallet on Base, Arbitrum, and Plasma. Use when a user wants passive DeFi yield on their funds. Deploys a non-custodial subaccount (Safe) linked to their EOA, enables automated yield optimization, and lets them deposit/withdraw anytime.
zerion-api
暂无简介
zerion-api-skill
暂无简介
zerion-api-mcp
暂无简介
yahoo-finance-forex
Fetches real-time FOREX news and market data from Yahoo Finance for major currency pairs (EUR/USD, GBP/USD, USD/JPY, etc.). Analyzes sentiment and provides trading context.
yahoo-finance
This skill should be used when the user asks to "get stock prices", "check stock quotes", "look up earnings", "get financial data", "find trending stocks", or needs stock market data from Yahoo Finance.