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

claude-memory-optimizerClaude 记忆优化器

Agent Skill

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

总安装

4,144

周安装

178

GitHub Stars

1

下载量

1,452
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:claude-memory-optimizer(Claude 记忆优化器)
来源仓库:https://github.com/mystour/claude-memory-optimizer
安装命令:
openclaw skills install claude-memory-optimizer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

ClawHubOpenClaw
openclaw skills install claude-memory-optimizer

简介

增强版结构化记忆系统,含 frontmatter 元数据与自动迁移。

  • 继承四种分类体系并优化存储性能。claude-memory-optimizer 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 适用于大规模知识库管理与历史记录回溯。
  • 需验证迁移脚本对现有文件的兼容性。
  • 建议备份原始数据后再执行结构调整。

SKILL.md

name
claude-memory-optimizer
description
Structured memory system with 4-type classification (user/feedback/project/reference), frontmatter metadata, and automated migration. Based on Claude Code memory architecture.
tags
memory, claude-code, knowledge-management, persistence
version
1.0.0

Claude Memory Optimizer

Structured memory system for OpenClaw with 4-type classification and automated migration.

When to Use

  • Setting up memory for the first time in OpenClaw
  • Migrating from unstructured memory/*.md to organized categories
  • Improving memory recall with semantic frontmatter
  • Implementing Claude Code-style memory architecture

Features

  • 4-Type Classification: user, feedback, project, reference
  • Frontmatter Metadata: structured name/description/type for semantic search
  • Auto-Migration: one-command refactor of existing memory files
  • Log Mode: optional append-only daily logs (KAIROS style)

Quick Start

Install

clawhub install claude-memory-optimizer

Run Migration

# Auto-detect workspace
node ~/.openclaw/skills/claude-memory-optimizer/scripts/refactor-memory.js

# Or specify explicitly
node ~/.openclaw/skills/claude-memory-optimizer/scripts/refactor-memory.js ~/.openclaw/workspace

Verify

ls -la ~/.openclaw/workspace/memory/
cat ~/.openclaw/workspace/MEMORY.md

Memory Types

TypePurposeExample
userUser role, preferences, skills"Data scientist, prefers concise replies"
feedbackBehavior corrections/confirmations"No trailing summaries — user can read diffs"
projectProject context, decisions, deadlines"Thesis deadline: 2026-06-01"
referenceExternal system pointers"Kaggle: https://kaggle.com/chenziong"

Directory Structure

memory/
├── user/          # User information
├── feedback/      # Behavior guidance
├── project/       # Project context
├── reference/     # External references
└── logs/          # Append-only logs (optional)
    └── YYYY/
        └── MM/
            └── YYYY-MM-DD.md

Memory File Format

Each memory file uses frontmatter metadata:

---
name: Data Science Background
description: User is a data scientist focused on observability and LLMs
type: user
---

User studies at Beijing University of Technology & UCD, GPA 3.95/4.2.
Research: LLM, AI Agents, MCP.

**Skills:** Python, PyTorch, Transformers, NLP

**How to apply:** Use data science terminology, assume ML background.

What NOT to Save

  • Code patterns, architecture, file paths (derivable from codebase)
  • Git history, recent changes (use git log)
  • Debugging solutions (fix is in the code)
  • Content already in CLAUDE.md
  • Ephemeral task details (only useful in current session)

Configuration

OpenClaw Config

{
  "agents": {
    "defaults": {
      "memorySearch": {
        "enabled": true,
        "provider": "local",
        "maxResults": 20,
        "minScore": 0.3
      },
      "compaction": {
        "memoryFlush": {
          "enabled": true,
          "softThresholdTokens": 4000
        }
      }
    }
  }
}

Usage Examples

Save User Preference

User: "Remember, I prefer concise replies without trailing summaries."

AI: Saves to memory/feedback/reply-style.md:

---
name: Reply Style Preference
description: User wants concise replies, no trailing summaries
type: feedback
---

**Rule:** Keep replies concise, no trailing summaries.

**Why:** User said "I can read the diff myself."

**How to apply:** End responses directly after completing work.

Retrieve Memory

User: "What did I say about database testing?"

AI: Runs memory_search query="database testing" → returns memory/feedback/db-testing.md

Verify Memory

User: "Is the experiment design in memory/project/dong-thesis.md still current?"

AI: Runs grep to verify → detects outdated info → updates memory file.

Migration Guide

Before

memory/
├── 2026-03-21.md
├── 2026-03-28.md
├── research-memory.md
└── video-memory.md

After

memory/
├── project/
│   ├── 2026-03-21-.md
│   ├── 2026-03-28-.md
│   └── research-memory.md
├── reference/
│   └── video-memory.md
└── logs/2026/04/2026-04-02.md

Advanced Features

Semantic Retrieval (Future)

async function findRelevantMemories(query: string, memoryDir: string) {
  const memories = await scanMemoryFiles(memoryDir);
  const selected = await selectRelevantMemories(query, memories);
  return selected.slice(0, 5); // Top 5 relevant memories
}

Verification on Recall (Future)

Before recommending from memory:

  1. If memory names a file → ls to verify existence
  2. If memory names a function → grep to confirm
  3. If memory conflicts with current state → trust current observation, update memory
"Memory says X exists" ≠ "X exists now"

Maintenance

Daily (Heartbeat)

  • Append to memory/YYYY-MM-DD.md
  • Record decisions, conversations, learnings

Weekly (Review)

  • Read daily notes
  • Distill important info to MEMORY.md
  • Remove outdated entries

Monthly (Audit)

  • Review project progress
  • Update long-term goals
  • Check .learnings/ records

Troubleshooting

Memory Not Loaded

  • Ensure MEMORY.md exists in workspace root
  • Check agents.defaults.memorySearch.enabled = true
  • Restart OpenClaw gateway

Poor Recall Quality

  • Add specific description in frontmatter
  • Use consistent keywords
  • Adjust minScore (lower = broader matches)

Migration Fails

  • Backup memory/ directory first
  • Run script with --dry-run (if available)
  • Check file permissions

References

  • Claude Code: src/memdir/ (memdir.ts, memoryTypes.ts, findRelevantMemories.ts)
  • OpenClaw Docs: docs/concepts/memory.md
  • Related Skills: memory-setup-openclaw, elite-longterm-memory

License

MIT-0

License

MIT-0

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

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

平台分布

OpenClaw

86.76%
按下载量换算1,260

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

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

来源信息

继续浏览同类 Skills