← 返回 Skills 市场
146
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install memory-defragmenter
功能描述
Defragment and optimize agent memory files by cleaning duplicates, merging similar entries, archiving stale content, and ensuring proper tiering. Use when: (...
安全使用建议
This skill appears to do what it says: analyze, plan, and modify local markdown-based memory files. Before running: (1) run the analyzer and then defragment.py --plan and carefully inspect defragment-plan.md; (2) run defragment.py --dry-run to see what would change; (3) prefer supplying --path to target only the specific memory directory instead of using the default '~' to avoid touching unrelated markdown files in your home; (4) keep and verify the backups created by the tool before committing --execute; (5) review the defragment.py execute logic (the script is included) if you need guarantees about whether files are deleted vs archived. If you don't want any chance of modification, don't run --execute and instead only use the analyzer and plan steps.
功能分析
Type: OpenClaw Skill
Name: memory-defragmenter
Version: 1.0.1
The memory-defragmenter skill is designed to manage and optimize local markdown files used for agent memory. It includes scripts for analyzing file size, identifying duplicate entries, and archiving stale content based on date markers. The workflow emphasizes safety by requiring backups (stored in `~/.defrag_backup/`) and a manual review of a generated plan before execution. No evidence of data exfiltration, malicious execution, or prompt injection was found; the scripts (scripts/analyze_memory.py, scripts/defragment.py, and scripts/verify_memory.py) use standard libraries and operate strictly on the local filesystem within the scope of the agent's memory directories.
能力评估
Purpose & Capability
Name/description match the included scripts: analyze_memory.py, defragment.py, and verify_memory.py implement analysis, plan creation, execution, backup, and verification of local markdown 'memory' files. The requested artifacts and operations (file reads/writes, backups, archiving, tiering) are proportionate to defragmentation.
Instruction Scope
Runtime instructions are explicit (analyze → plan → review → execute → verify) and tell the operator to review the plan before execution. However the default base path is '~' (home) and the scripts glob broadly for many *.md files and named files (e.g., USER.md, IDENTITY.md, memory/*.md). That means the tool can read and modify arbitrary Markdown files under your home directory unless you supply a narrower --path; the skill explicitly creates backups before changes and recommends review, which mitigates risk if the user follows guidance.
Install Mechanism
No installer; this is instruction- + script-based and runs locally with python3. No external downloads or package installs are performed, which minimizes supply-chain risk.
Credentials
The skill declares no required environment variables, credentials, or config paths. The scripts operate on local files only and do not attempt network access or request secrets.
Persistence & Privilege
always is false and the skill does not request persistent platform privileges. It is user-invocable and may be run autonomously by an agent (default), so exercise the usual caution about autonomous runs, but this is expected behavior for skills.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install memory-defragmenter - 安装完成后,直接呼叫该 Skill 的名称或使用
/memory-defragmenter触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Improved logic in defragment.py for more accurate memory file optimization.
- verify_memory.py updated with enhanced integrity checks and reporting.
- Minor cleanups and reliability enhancements for defragmentation execution.
v1.0.0
Initial release of memory-defragmenter:
- Provides tools to analyze, clean, merge, and optimize agent memory files.
- Identifies and removes duplicates, archives stale content, and maintains proper tiering.
- Offers a step-by-step workflow for defragmentation, including planning, review, execution, and verification.
- Ensures data safety with mandatory backups, manual review, and strict archival policies.
- Includes scripts for analysis (`analyze_memory.py`), defragmentation (`defragment.py`), and integrity verification (`verify_memory.py`).
元数据
常见问题
Memory Defragmenter 是什么?
Defragment and optimize agent memory files by cleaning duplicates, merging similar entries, archiving stale content, and ensuring proper tiering. Use when: (... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 146 次。
如何安装 Memory Defragmenter?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install memory-defragmenter」即可一键安装,无需额外配置。
Memory Defragmenter 是免费的吗?
是的,Memory Defragmenter 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Memory Defragmenter 支持哪些平台?
Memory Defragmenter 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Memory Defragmenter?
由 klemenska(@klemenska)开发并维护,当前版本 v1.0.1。
推荐 Skills