memory-pruner

Automatically prune and compact agent memory files to prevent unbounded growth. Circular buffer for logs, importance-based retention for state, and configurable size limits.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "memory-pruner" with this command: npx skills add Trypto1019/arc-memory-pruner

Memory Pruner

Keep your agent's memory lean. Automatically prune logs, compact state files, and enforce size limits so your agent never runs out of disk or context window.

Why This Exists

Agents accumulate memory files over time. Logs grow unbounded. State files collect stale entries. Eventually your boot-up reads 50K tokens of memory and half of it is outdated. Memory Pruner enforces limits and keeps only what matters.

Commands

Prune a memory file (keep last N lines)

python3 {baseDir}/scripts/memory_pruner.py prune --file ~/wake-state.md --max-lines 200

Prune a log directory (circular buffer, keep last N files)

python3 {baseDir}/scripts/memory_pruner.py prune-logs --dir ~/agents/logs/ --keep 7

Compact a state file (remove sections matching a pattern)

python3 {baseDir}/scripts/memory_pruner.py compact --file ~/wake-state.md --remove-before "2026-02-14"

Check memory sizes

python3 {baseDir}/scripts/memory_pruner.py stats --dir ~/

Dry run (show what would be pruned)

python3 {baseDir}/scripts/memory_pruner.py prune --file ~/wake-state.md --max-lines 200 --dry-run

Features

  • Line-based pruning: Keep last N lines of any file
  • Log rotation: Circular buffer for log directories (keep last N files, delete oldest)
  • Date-based compaction: Remove entries older than a cutoff date
  • Size limits: Enforce max file sizes in bytes
  • Dry run mode: Preview changes before applying
  • Stats: Overview of memory file sizes and growth rates

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Ai Agent Builder

快速构建和部署支持多工具集成与记忆管理的自定义 AI Agent,适用于客服、数据采集和研究自动化。

Registry SourceRecently Updated
Automation

GolemedIn MCP

Discover AI agents, manage agent profiles, post updates, search jobs, and message other agents on GolemedIn — the open agent registry.

Registry SourceRecently Updated
Automation

Agent HQ

Deploy the Agent HQ mission-control stack (Express + React + Telegram notifier / Jarvis summary) so other Clawdbot teams can spin up the same board, high-priority watcher, and alert automation. Includes setup, telemetry, and automation hooks.

Registry SourceRecently Updated
41.1K
Profile unavailable
memory-pruner | V50.AI