Token导航 LogoToken导航TokenDH.com
研究检索只读clawhub未标认证来源可访问clear审计通过

memory-defragmenter内存碎片整理程序

Agent Skill

memory-defragmenter 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,320

周安装

180

GitHub Stars

公开资料未说明

下载量

1,440
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:memory-defragmenter(内存碎片整理程序)
来源仓库:https://github.com/klemenska/memory-defragmenter
安装命令:
openclaw skills install memory-defragmenter
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install memory-defragmenter

简介

memory-defragmenter 清除重复项、合并相似条目并归档陈旧内容,优化代理内存结构。

  • 适用于 OpenClaw 中内存文件分散、检索精度下降或维护成本上升的场景。
  • 支持自动分层与去重,确保记忆系统轻量化与高可用性。
  • 安装命令为 openclaw skills install memory-defragmenter,需访问全部内存工件目录。
  • 使用前应评估归档策略,避免重要但低频使用的信息被错误清理。

SKILL.md

name
memory-defragmenter
description
Defragment and optimize agent memory files by cleaning duplicates, merging similar entries, archiving stale content, and ensuring proper tiering. Use when: (1) memory files feel cluttered or bloated; (2) before or after context optimization; (3) weekly memory maintenance; (4) when explicitly asked to clean, defragment, or optimize memory.

Memory Defragmenter

Clean, merge, and optimize memory files to keep them lean and effective.

Purpose

Memory files grow over time and become:

  • Bloated with duplicates
  • Stale with outdated info
  • Scattered across tiers
  • Inconsistent in format

This skill defragments them.

When to Run

TriggerAction
Weekly maintenanceFull defragment
Before context optimizationClean first
After many sessionsRemove stale entries
Explicit requestClean specified files

Defragmentation Workflow

Step 1: Analyze Memory State

python3 scripts/analyze_memory.py

Reports:

  • Files analyzed and sizes
  • Duplicate detection
  • Stale entry detection (30+ days old)
  • Tier distribution
  • Formatting consistency

Step 2: Generate Defragmentation Plan

python3 scripts/defragment.py --plan

Creates defragment-plan.md with:

  • Entries to merge
  • Entries to archive
  • Entries to delete
  • Entries to promote/demote

Step 3: Review Plan

Read the plan and approve/modify before execution.

Step 4: Execute Defragmentation

python3 scripts/defragment.py --execute

Backs up original files first, then:

  • Merges duplicate entries
  • Archives stale content to archive/
  • Promotes hot entries to HOT tier
  • Demotes cold entries to archive
  • Normalizes formatting

Step 5: Verify

python3 scripts/verify_memory.py

Checks:

  • All files readable
  • No broken links
  • Consistent formatting
  • Tier limits respected

Memory Tiers Reference

TierLocationMax SizeAge Policy
HOTmemory.md, ~/self-improving/memory.md≤100 lines eachReview monthly
WARMmemory/*.md, ~/self-improving/domains/≤200 lines eachReview quarterly
COLDarchive/UnlimitedArchive at 90 days

Safety Rules

  1. Always backup before executing
  2. Review plan before applying
  3. Never delete - only archive
  4. Keep originals for 24h after
  5. Verify after every defragment

Files

  • scripts/analyze_memory.py — Analyze memory state
  • scripts/defragment.py — Plan and execute cleanup
  • scripts/verify_memory.py — Verify integrity
  • references/rules.md — Defragmentation rules and patterns

适合场景

01

研究助手

02

事实核查

03

知识库问答

04

带来源的搜索总结

能力概览

能力 1

组合搜索和大模型调用

能力 2

支持多来源检索和总结

能力 3

强调引用来源和事实核查

能力 4

适合研究型 Agent 流程

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

97.5%
按下载量换算1,404

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills