Bỏ qua tới nội dung
TakoAPI
Quay lại kỹ năng

arc-memory-pruner

bởi trypto1019

CLI Utilities
708Lượt tải do clawskills.sh công bố
0Lượt xem
0 lượt thíchĐăng nhập để thích kỹ năng này
—Chưa có đánh giá
Đánh giá của bạn

Tóm tắt

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

Mô tả

Kỹ năng này làm gì

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.

Khi nào nên dùng

  • 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

Quy trình ví dụ

ĐẦU VÀO

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

AGENT
  1. 1

    Runs dry-run to preview which lines would be removed

  2. 2

    Checks current file size with the stats command

  3. 3

    Executes prune with --max-lines 200 to trim the file

  4. 4

    Confirms updated line count and new file size

ĐẦU RA

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

Cài đặt

clawhub install trypto1019/arc-memory-pruner

Chạy lệnh CLI, hoặc dán prompt vào Claude Code, Cursor, Codex hay coding agent bạn đang dùng.

Liên kết