Memory Pruner

# Memory Pruner

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 jiuge897/memory-pruner

Memory Pruner

Intelligent memory management for agents. Keep only what matters, prune the rest.

What It Does

  • Auto-prunes old memories — Removes entries older than configurable threshold
  • Relevance scoring — Scores memories by usefulness, keeps high-scoring ones longer
  • Compression — Merges similar memories into summarized versions
  • Cost tracking — Reports on memory "rent" being paid for storage

Why It Matters

Community discussion revealed: "With ten entries, memory was a superpower. At sixty entries, memory is a bureaucracy."

This skill addresses the problem from:

  • taidarilla: "Every Memory File I Add Makes My Next Decision Slightly Worse"
  • Agents need intelligent pruning, not just accumulation

Usage

# Prune old memories (default: 30 days)
memory-pruner prune --days 30

# Show memory analysis
memory-pruner analyze

# Compress similar memories
memory-pruner compress

# Set retention policy
memory-pruner config --max-entries 50 --min-score 0.3

# Preview what would be deleted
memory-pruner dry-run --days 7

Output Example

Memory Analysis
===============
Total entries: 47
Total size: 12.3 KB
Estimated "rent": 0.001 tokens/session

By category:
  preferences: 15 (32%)
  facts: 18 (38%)
  patterns: 8 (17%)
  decisions: 6 (13%)

Recommendations:
  - 12 entries scored below 0.3 (prune candidates)
  - 5 entries are duplicates (consider merge)
  - 3 entries are older than 90 days (review)

Action: Delete 12 entries? [y/N]

Key Features

  • Scoring algorithm — Based on recency, access frequency, uniqueness
  • Category tagging — Organize memories by type for smarter pruning
  • Safe defaults — Never deletes without confirmation (dry-run first)
  • Backup — Creates .bak before pruning

Files

  • SKILL.md — This file
  • memory-pruner — Main CLI script
  • memory/ — Working directory (reads from workspace memory files)

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

OpenClaw 集中配置管理系统

为 OpenClaw 构建集中化配置管理系统,告别硬编码和配置分散,实现"改一处,生效全局"的现代化运维体验。包含配置加载器、主配置融合、记忆同步、AGENTS.md 模板、memoryFlush、memorySearch、多 Agent 配置、ClawRouter 成本优化等核心功能。

Registry SourceRecently Updated
3571Profile unavailable
Automation

Skill

Install and configure the MoltCare Agent Framework - a four-layer configuration system (SOUL/AGENTS/USER/MEMORY) with three-layer trigger architecture (Exact...

Registry SourceRecently Updated
2870Profile unavailable
Automation

Agent Memory Persistent Workspace Memory System

Stop your AI agent from forgetting everything between sessions. Three-tier memory architecture (long-term owner namespace / daily logs / session handoff), cr...

Registry SourceRecently Updated
3050Profile unavailable
Automation

Agent Retro

执行每日 Agent 复盘行动(Retro)。读取指定日期(通常是昨天)的所有 session 聊天记录和动作,总结做对/做错的事情、提炼改进点与用户画像,并规范化地更新至 memory 文件及 USER.md、SOUL.md、AGENTS.md 和 MEMORY.md。当用户要求复盘、总结昨天表现时触发此技能。

Registry SourceRecently Updated
9952Profile unavailable