memory-compact

Installation
SKILL.md

Memory compact

Compact the persistent memory this agent has. Use whatever memory store the harness provides — a single file, a directory with an index, or a memory API. Never assume a path or a product name. If the harness has no persistent memory, say so and stop.

The primary entry file — the whole file for a single-file store, the index for a directory store — is capped at 200 lines and 25 KB; reaching either means compaction is due.

Procedure

  1. Locate. Use the memory store the harness gives you. For a directory store, read the index and every topic file; the index is a pointer list, never content.

  2. Inventory. List every entry with its size.

  3. Classify. Give every entry exactly one action — delete, merge, promote, or keep — with a one-line reason traced to the rubric below. An entry on the never-drop list stays a keep unless the user explicitly says otherwise.

  4. Propose. Present one batch table (entry → action → reason) and wait for a single confirmation; the user may accept all or adjust. Skip this step only if the invocation explicitly says to proceed without confirmation.

  5. Snapshot. For a file-based store, copy the entry file(s) to a system temp path before writing and keep the path for the report. For a non-file store, the confirmation above is the only safety net — say so in the report.

  6. Rewrite. Apply the confirmed plan in place. Never write outside the memory store.

Installs
1
GitHub Stars
40
First Seen
Sep 14, 2026