跳至主要内容
小龙虾小龙虾AI
🤖

Memory Organizer

Organize, compress, and curate OpenClaw memory without polluting permanent memory. Use when the user wants to compress memory files, clean dated memory notes...

下载1.3k
星标2
版本1.2.1
AI 智能体
安全通过
💬Prompt

技能说明


name: memory-organizer description: Organize and compress memory files to reduce context loading in new sessions. Automatically identify important information and discard redundant content. metadata: { "openclaw": { "emoji": "🧠" } }

Memory Organizer Skill

Tool for organizing and compressing memory files.

Features

  1. Scan memory files - View all memories in memory/ directory
  2. Analyze content - Identify important info (user preferences, project config, todos)
  3. Compress & organize - Summarize lengthy content, keep core info
  4. Clean up - Delete outdated or unnecessary content
  5. Security - Path validation to prevent directory traversal

Installation

This skill is pre-installed in OpenClaw workspace. To use directly:

# Link to local bin (optional)
ln -sf ~/.openclaw/workspace-main/skills/memory-organizer/memory-organizer.js ~/.local/bin/memory-organizer

# Or run directly
node ~/.openclaw/workspace-main/skills/memory-organizer/memory-organizer.js <command>

Workspace Configuration

Default workspace: ~/.openclaw/workspace-main

Custom workspace:

# Via command line
memory-organizer scan --workspace /path/to/workspace

# Via environment variable
OPENCLAW_WORKSPACE=/path/to/workspace memory-organizer scan

Use Cases

  • Memory files too large, slow to load each session
  • Want to extract key info, discard details
  • Need regular memory maintenance

Commands

Scan memories

memory-organizer scan

Classify by topic

memory-organizer classify

Find redundant memories

memory-organizer redundant

Discard redundant memories

memory-organizer discard redundant --force

Compress a memory file

memory-organizer compress 2026-01-01.md        # Keep titles and key lines
memory-organizer compress 2026-01-01.md --titles  # Keep titles only
memory-organizer compress 2026-01-01.md --aggressive  # Aggressive compression

Merge to main memory

memory-organizer merge 2026-01-01.md

View memory content

memory-organizer view 2026-01-01.md

Cleanup backups

memory-organizer clean

Topic Classification

The organizer automatically classifies memories into:

  • User Preferences - name, timezone, preferences
  • Project Config - agents, cron jobs, workspaces
  • Skills - installed skills, tools
  • Money Ideas - side hustle ideas, projects
  • Todos - tasks, plans, next steps
  • Tech Notes - code, commands, solutions
  • Daily - daily logs, routine

Security

  • Path validation: All file operations are validated to prevent directory traversal attacks
  • Filename restrictions: Only .md files allowed, no path components (.., /, \)
  • Workspace isolation: Operations scoped to memory directory only

Best Practices

  1. Run organization daily or weekly
  2. Keep key info: user preferences, project config, todos
  3. Discard details: logs, temporary thoughts
  4. Keep MEMORY.md concise (< 100 lines)

Recommended File Structure

# User Preferences
- Name, how to address
- Timezone
- Key preferences

# Project Config
- Agent configurations
- Scheduled tasks
- Important file paths

# Todos
- Current tasks
- Next steps

如何使用「Memory Organizer」?

  1. 打开小龙虾AI(Web 或 iOS App)
  2. 点击上方「立即使用」按钮,或在对话框中输入任务描述
  3. 小龙虾AI 会自动匹配并调用「Memory Organizer技能完成任务
  4. 结果即时呈现,支持继续对话优化

相关技能