Memory Compact for Openclaw

A specialized automation skill that compresses daily interaction logs into concise long-term memories and archives raw files every morning.

garryfan-ai
v1.0.5
Mar 16, 2026
1
922
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install memory-compact

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install memory-compact using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Memory Compact?

Memory Compact is a high-performance utility designed for the Openclaw Skills ecosystem to solve the problem of context bloat and data fragmentation. By running a daily scheduled routine, it parses recent dialogue records, identifies critical decisions or preferences using keyword matching, and synthesizes them into a centralized long-term memory file.

This skill ensures your AI agent remains lean and focused by moving verbose historical logs to a dedicated backup directory while maintaining a high-level summary of important events. It is built with a security-first approach, operating entirely within local file boundaries without external network dependencies.

Memory Compact Use Cases

  • Automatically summarizing daily AI interactions into a single MEMORY.md file.
  • Archiving historical conversation logs to prevent workspace clutter.
  • Generating daily status notifications for platforms like Feishu/Lark.
  • Maintaining a clean, searchable timeline of key decisions made during development cycles.

How Memory Compact Works

  1. The system triggers the script at 06:30 Asia/Shanghai time via a configured cron job.
  2. The skill reads the most recent daily memory file (YYYY-MM-DD.md) from the workspace.
  3. It executes a keyword-based extraction process to identify 2-3 critical points based on terms like 'decision', 'important', or 'plan'.
  4. The extracted points are appended to the MEMORY.md file in a streamlined format.
  5. The original raw log is moved to the backup/memory directory for long-term storage.
  6. A summary notification is generated for external reporting.

Memory Compact Setup

To manually trigger the memory compression or view logs, use the following commands within your environment:

# Run the manual compression script
python3 /root/.openclaw/workspace/skills/memory-compact/wrapper.py

# Monitor the backup execution logs
tail -f /root/.openclaw/workspace/scripts/memory_backup.log

# Verify the extracted long-term memories
cat ~/.openclaw/workspace/MEMORY.md

Memory Compact Data Schema & Taxonomy

The skill manages data within the Openclaw Skills workspace using the following structure:

Path Description Format
memory/YYYY-MM-DD.md Source file for the current day's logs Markdown
backup/memory/ Directory for archived historical logs Markdown Files
MEMORY.md The master file containing synthesized long-term memory Markdown
memory_backup.log Technical execution logs for troubleshooting Plain Text

Memory Compact Advanced Features

  • Customizable Extraction: Modify the extract_key_points() function in memory_backup.py to add custom keywords or integrate LLM-based summarization.
  • Automated Scheduling: Built-in support for cron job integration with customizable time zones and execution payloads.
  • Notification Integration: Automatically formats and prepares summary data for integration with Feishu (Lark) webhooks.
  • Local Security Validation: Strict path verification mechanism that prevents operations outside of the authorized workspace.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*