← 返回 Skills 市场
richardiitse

Memory Optimization

作者 richardiitse · GitHub ↗ · v1.0.4 · MIT-0
cross-platform ⚠ suspicious
333
总下载
0
收藏
1
当前安装
5
版本数
在 OpenClaw 中安装
/install memory-optimization
功能描述
Comprehensive memory management optimization for AI agents. Use when: (1) Agent experiences context compression amnesia, (2) Need to rebuild context quickly...
安全使用建议
This package implements a full memory/knowledge-graph toolset (many Python scripts and shell scripts) but the registry metadata understates its runtime needs. Before installing or running it: 1) Inspect scripts/utils/llm_client.py and any code that performs network I/O to identify which environment variables or API keys are actually required (do not supply real credentials until you review). 2) Search the repo for hard-coded keys, endpoints, or upload/exfil endpoints. The CHANGELOG explicitly mentions a prior security audit with HIGH severity findings (API key exposure, prompt injection) — treat that as a warning and ask the author for remediation or a clean release. 3) Run the code in a sandboxed environment (isolated VM or container) without sensitive files mounted; do not point it at ~/.openclaw, agents/, or other directories with secrets until you are confident. 4) If you plan to use embedding/LLM features, create a limited-scope API key (minimal privileges, cost limits) and rotate it after testing. 5) If you need this functionality but cannot audit the code yourself, prefer an alternative with clearer metadata and declared env requirements or request the maintainer to: declare required env vars, document network endpoints, remove hard-coded secrets, and provide a security-fix release.
功能分析
Type: OpenClaw Skill Name: memory-optimization Version: 1.0.4 The memory-optimization skill is a comprehensive and well-engineered memory management system for AI agents, implementing a three-layer architecture (Working, Episodic, and Semantic memory) using a Knowledge Graph. The bundle includes sophisticated scripts for entity deduplication, semantic consolidation, and time-based memory decay. Security analysis reveals proactive safety measures, such as path traversal validation for the knowledge graph directory in `scripts/memory_ontology/config.py` and the use of file locking to ensure data integrity in `scripts/memory_ontology/storage.py`. All code logic and AI agent instructions in `SKILL.md` are strictly aligned with the stated purpose of improving context recovery and long-term information retention without any signs of malicious intent or data exfiltration.
能力评估
Purpose & Capability
The name/description (memory optimization, KG, TL;DRs, daily cleanup) align with the included scripts and docs (memory_ontology.py, kg_extractor.py, consolidation/decay engines). However the registry metadata claimed 'instruction-only / no required env vars', but the repo contains a full CLI toolset that clearly expects environment configuration (model / API endpoints, KG_DIR, etc.). That mismatch is unexpected and should be justified by the maintainer.
Instruction Scope
SKILL.md explicitly instructs agents to read local files at session start (SOUL.md, USER.md, memory/YYYY-MM-DD.md, MEMORY.md) and to run scripts that process agent session logs (kg_extractor.py --agents-dir agents/). Reading these files is plausible for a memory system, but they can contain sensitive identity/user preferences or other agents' data. The instructions also reference using LLM embedding/model settings (OPENAI_MODEL / OPENAI_BASE_URL) and running scripts that can batch-process directories — broad file access and batch processing of agents/ is within scope for a KG tool but increases risk if run without inspection.
Install Mechanism
There is no external install step (no network download spec). The repository includes many code files (scripts/*.py, shell scripts, tests) bundled with the skill. That means code will be present and executable in the user's workspace when installed — review the code before executing. No direct remote install was specified (good), but included scripts may themselves call external network APIs at runtime.
Credentials
Registry metadata lists no required environment variables, but multiple docs and scripts refer to environment configuration (OPENAI_MODEL, OPENAI_BASE_URL, KG_DIR, and options to pass api-key). The code includes an LLM client and embedding usage (entity deduplication, preference engine). Declaration mismatch (no required env vars) is problematic: the skill likely needs API keys and endpoints to function and may attempt network calls using those values. The CHANGELOG explicitly notes a prior 'CSO Audit' with '1 HIGH API key exposure' and '1 HIGH prompt injection risk', which suggests past or present sensitive handling of credentials/prompts.
Persistence & Privilege
The skill is not marked always:true and does not request special platform privileges in metadata. It does suggest creating/using shared KG files in ~/.openclaw/shared-kg and linking graph.jsonl, which means it expects persistent storage access in the user's home directory — reasonable for a memory/graph tool but be aware of the persistent file paths referenced.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install memory-optimization
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /memory-optimization 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.4
Version 1.0.4: .gitignore update, docs/ removed from git history, security audit (CSO), version bump to 1.0.4
v1.0.3
- Updated documentation in SKILL.md to use more general English terminology for section headings, code examples, and usage instructions. - Replaced localized terms (such as TL;DR 摘要 and related headings) with English equivalents (e.g., TL;DR Summary, Core Achievements). - Enhanced clarity and consistency in Quick Start, Usage Examples, Environment Variables, and configuration instructions. - No code or logic changes; documentation only.
v1.0.2
- Major update: Expanded functionality with new scripts, agent examples, documentation, and usage tracking. - Added comprehensive code for memory engines, entity management, knowledge graph extraction, consolidation, decay, and dashboard features. - Introduced a Skill Usage Tracker for analyzing and recording skill usage patterns. - Multi-agent sample configs and session files provided for easy integration. - Enhanced documentation, quick references, and multilingual support (including README_CN.md). - Obsolete or reorganized files removed to streamline structure and focus on new capabilities.
v1.0.1
- Added comprehensive ontology documentation and configuration files under the `ontology/` directory, including implementation summary, integration guide, quick reference, entity templates, memory and network schemas, and subagent configurations. - Expanded support for structured and knowledge graph-based memory management with detailed schema and reference files. - Improved modularity and maintainability by separating ontology and integration resources. - No changes to existing feature descriptions or usage instructions; skill functionality and purpose remain the same.
v1.0.0
Initial release: Complete memory management system with TL;DR summaries, three-file pattern, knowledge graph integration, and automated daily cleanup. Achieves 98% faster context recovery and 99% file size reduction. Includes 8 subsystems: TL;DR Summary, Three-File Pattern, Fixed Tags, Daily Cleanup Script, HEARTBEAT Integration, Rolling Summary Template, Testing Framework (6/6 tests), and Knowledge Graph (18 entities, 15 relations).
元数据
Slug memory-optimization
版本 1.0.4
许可证 MIT-0
累计安装 2
当前安装数 1
历史版本数 5
常见问题

Memory Optimization 是什么?

Comprehensive memory management optimization for AI agents. Use when: (1) Agent experiences context compression amnesia, (2) Need to rebuild context quickly... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 333 次。

如何安装 Memory Optimization?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install memory-optimization」即可一键安装,无需额外配置。

Memory Optimization 是免费的吗?

是的,Memory Optimization 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Memory Optimization 支持哪些平台?

Memory Optimization 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Memory Optimization?

由 richardiitse(@richardiitse)开发并维护,当前版本 v1.0.4。

💬 留言讨论