micro-compaction
Reviewed
at commit 7bbe8a7
Adds /compact micro, which replaces Read results with placeholders and drops thinking without a model call, leaving every other message as it was.
0 upvotes
Log in to upvote or save- Made by
- Rui He
- Pinned commit
-
7bbe8a777caab1610c9abe6d8299828efa51c9d2 - What we checked
-
Adds `/compact micro` and `/compact tiny`, which shrink the conversation without a summary: they replace file read results with short placeholders and drop thinking blocks, and tiny also replaces the contents of Write and Edit calls. Any other /compact is left alone. It reads no files, runs no programs and makes no network calls.
Review details
Static review of the source at the pinned commit; not run. Reviewed in full: plugin.json, hooks.json, register.ts and elide.ts. Registers one handler, session.compact with trigger manual. It acts only when the compact instructions are exactly `micro` or `tiny` (case-insensitive); otherwise it calls next untouched. It then runs a pure function over the message list (e.messages): Read tool results are replaced by a placeholder naming the file path and line range (images and PDFs by a placeholder with dimensions or pages), thinking-only assistant messages are dropped, and in tiny mode the content, old_string and new_string fields of Write and Edit calls (and the file-state note in their results) are replaced by short placeholders. Error results and results already short or already elided are left alone. The rebuilt messages are returned as the new transcript; unchanged messages keep their handles. Logs a count with $.ui.log. No network, file, process, environment or storage use. The elided content can only be recovered by reading the files again, as the placeholders say.
- What it uses
-
- Reads your prompts: no
- Sees tool calls: yes
- Blocks or changes tool calls: no
- Reads or writes files: no
- Runs programs on your machine: no
- Calls the model (uses tokens): no
- Sends data over the network: no
- Stores data: no
- Shows something on screen: yes
Adds `/compact micro`: elides Read results and strips thinking, keeping the conversation structure
Made this mod? Add a badge to your README
Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.
[](https://modsforclaude.com/mods/micro-compaction/)