LaunchKit · 2026
Back to Skills

arc-memory-pruner

Automatically prune and compact agent memory files to prevent unbounded growth.

0
708 downloads
by @trypto1019

Setup & Installation

openclaw skills install @trypto1019/arc-memory-pruner

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install arc-memory-pruner

Version History

v1.1.0Feb 17, 2026 - Version note by skill developer:

- Version bump to 1.1.0. - scripts/memory_pruner.py updated.

What This Skill Does

Prunes and compacts agent memory files to prevent unbounded growth. Enforces line limits, rotates log directories with a circular buffer, and removes stale state entries by date. Includes a dry-run mode to preview changes before applying them.

Combines log rotation, date-based compaction, and line-based pruning in a single script rather than requiring separate tools for each operation.

When to use it

  • Trimming agent wake-state files that have grown too large
  • Rotating log directories to keep only the last 7 runs
  • Removing outdated state entries older than a specific date
  • Checking memory file sizes before a long agent session
  • Previewing what would be deleted before committing a prune

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: prune my wake-state.md to the last 200 lines

AGENT
  1. 1Runs dry-run to preview which lines would be removed
  2. 2Checks current file size with the stats command
  3. 3Executes prune with --max-lines 200 to trim the file
  4. 4Confirms updated line count and new file size
OUTPUT

wake-state.md trimmed to 200 lines with older entries removed