arc-memory-pruner
由 trypto1019 提供
CLI Utilities简介
Automatically prune and compact agent memory files to prevent unbounded growth.
描述
该技能的功能
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.
何时使用
- 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
示例工作流
User asks: prune my wake-state.md to the last 200 lines
- 1
Runs dry-run to preview which lines would be removed
- 2
Checks current file size with the stats command
- 3
Executes prune with --max-lines 200 to trim the file
- 4
Confirms updated line count and new file size
wake-state.md trimmed to 200 lines with older entries removed
安装
clawhub install trypto1019/arc-memory-pruner运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。