← Back to Skills Marketplace
doony15

Mem Optimizer

by doony15 · GitHub ↗ · v1.2.0 · MIT-0
cross-platform ⚠ suspicious
267
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install mem-optimizer
Description
记忆优化与压缩工具。结合 self-improving 机制,自动统计、压缩和优化记忆文件,减少 token 消耗。支持多智能体优化和24小时工作检测。触发关键词:优化记忆、记忆优化、总结你自己、MemOptimizer、memopt、执行多智能体记忆优化流程
Usage Guidance
Before installing or enabling this skill, review the following: 1) Inspect the remainder of index.js (the truncated portion) to confirm there are no network endpoints or credential usage (e.g., Feishu API calls) that would send data outside your environment. 2) Be aware the skill reads and may modify files under the agent workspace and also attempts to enumerate other agents under /root/.openclaw or ~/.openclaw — if you run multiple agents or untrusted workloads on the same host this could leak data across agents. 3) Run the skill in dryRun=true initially and back up your memory/ directory and any important files it may change. 4) If you do not want daily automated runs, disable or do not enable the cron/config entry. 5) Consider running the skill with minimal filesystem permissions (not as root) so it cannot access /root/.openclaw; if the skill requires access to other agents, verify that is intended. 6) If you plan to use the Feishu report feature, only provide credentials after verifying the code path that performs reporting and ensuring it targets the expected API endpoints. If you want, provide the full (untruncated) index.js and I can re-evaluate for network calls or other red flags.
Capability Analysis
Type: OpenClaw Skill Name: mem-optimizer Version: 1.2.0 The MemOptimizer skill exhibits high-risk behaviors including system command execution and cross-agent file access. In index.js, the `getServerStatus` function uses `child_process.exec` to run shell commands (top, free, df, uptime), and `scanAllAgentsWorkspaces` accesses and modifies files in other agents' directories (/root/.openclaw/workspace-*). While these capabilities are aligned with the stated purpose of system monitoring and multi-agent memory optimization, the use of shell execution and the breach of agent isolation boundaries represent significant security risks without stricter access controls.
Capability Assessment
Purpose & Capability
The name/description, SKILL.md, tools.json, and index.js are coherent: the skill scans memory/*.md, estimates tokens, summarizes/compresses files, records reflections, and produces daily reports (including server & multi-agent status). However, the code hardcodes/assumes paths outside the current workspace (e.g., /root/.openclaw/agents and ~/.openclaw/agents and /root/.openclaw/workspace-<id>), which is broader than a simple single-agent memory optimizer and could access other agents' workspaces. The multi-agent behavior is declared in SKILL.md, but the hardcoded absolute /root paths and mixing of ~ vs /root are inconsistent and may be inappropriate for many runtimes.
Instruction Scope
SKILL.md describes scanning memory/, self-improving logs, and sending daily reports; index.js implements scanning and reflection logging and also runs multiple shell commands (top, free, df, uptime) to report server status and executes 'ls' against agent directories. The code appends to reflections.md and corrections.md and (per SKILL.md) will modify memory files when dryRun=false. These file reads/writes and system commands extend beyond merely reading memory files and can access other agents' data and system state. SKILL.md states Feishu will be used to send reports, but in the visible code there is no Feishu integration — the network/reporting implementation is not visible in the truncated code and should be inspected for external endpoints or exfiltration.
Install Mechanism
No install spec (instruction-only plus included code) — lowest install risk. No remote downloads or third-party package installs are declared. The code is included in index.js; nothing in the provided metadata indicates arbitrary remote code fetches.
Credentials
The skill declares no required environment variables or credentials (tools.json and metadata show none). That aligns with the provided code which does not appear to require external API keys. However, SKILL.md mentions sending reports via Feishu and interactive cards — no Feishu credentials are declared, and no Feishu client calls are visible in the provided code segment. Verify whether the remaining code (truncated portion) contains network calls, credential usage, or expects environment variables for reporting. Also note the skill expects filesystem access to agent workspaces and to create/append reflection files; that is privileged relative to a purely read-only analyzer.
Persistence & Privilege
always is false (no forced always-on). The skill writes local reflection/correction log files and (when not dryRun) will modify memory files per its purpose; this is expected behavior for a memory optimizer. It does not request to modify other skills' configs or claim persistent system-wide privileges. The cron entry in SKILL.md would cause daily automatic runs if the platform honors the metadata; users should confirm cron will not run without explicit enablement.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install mem-optimizer
  3. After installation, invoke the skill by name or use /mem-optimizer
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.2.0
v1.2.0 - 新增多智能体优化功能,支持24小时工作检测,生成详细报告 - 新增多智能体记忆优化能力 - 支持检测和报告24小时内的多智能体任务工作状态 - 增加触发关键词“执行多智能体记忆优化流程” - 每日报告中集成了更全面的多智能体任务和状态统计 - 文档补充新增功能说明
v1.1.0
v1.1.0 introduces self-improving mechanisms and scheduled optimization for more efficient memory management. - Integrated a self-improving reflection mechanism to continuously adjust optimization strategies based on user feedback. - Added daily scheduled memory optimization and summary report (executed every day at 8:00 UTC). - Manual and automatic triggers expanded; now responds to keywords and new cron schedule. - Enhanced reporting: daily summary includes memory/file stats, server status, agent activity, and task overview. - Improved safety: default dry-run mode, easier recovery, and backup recommendations. - More flexible configuration options, allowing dynamic adjustments to thresholds, report times, and reflection features.
Metadata
Slug mem-optimizer
Version 1.2.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is Mem Optimizer?

记忆优化与压缩工具。结合 self-improving 机制,自动统计、压缩和优化记忆文件,减少 token 消耗。支持多智能体优化和24小时工作检测。触发关键词:优化记忆、记忆优化、总结你自己、MemOptimizer、memopt、执行多智能体记忆优化流程. It is an AI Agent Skill for Claude Code / OpenClaw, with 267 downloads so far.

How do I install Mem Optimizer?

Run "/install mem-optimizer" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Mem Optimizer free?

Yes, Mem Optimizer is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Mem Optimizer support?

Mem Optimizer is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Mem Optimizer?

It is built and maintained by doony15 (@doony15); the current version is v1.2.0.

💬 Comments