🤖
Memory Organizer
Organize and compress memory files to reduce context loading in new sessions. Automatically identify important information and discard redundant content.
安全通过
💬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
- Scan memory files - View all memories in memory/ directory
- Analyze content - Identify important info (user preferences, project config, todos)
- Compress & organize - Summarize lengthy content, keep core info
- Clean up - Delete outdated or unnecessary content
- 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
.mdfiles allowed, no path components (..,/,\) - Workspace isolation: Operations scoped to memory directory only
Best Practices
- Run organization daily or weekly
- Keep key info: user preferences, project config, todos
- Discard details: logs, temporary thoughts
- 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」?
- 打开小龙虾AI(Web 或 iOS App)
- 点击上方「立即使用」按钮,或在对话框中输入任务描述
- 小龙虾AI 会自动匹配并调用「Memory Organizer」技能完成任务
- 结果即时呈现,支持继续对话优化