All shelves / Mods / Workflow
compact-keeper
By arasovic
compact-keeper is a Claude Code workflow mod by arasovic.
Saves a handoff file at each compaction: tokens before and after, your /compact instructions, the files edited since the last one, and Claude Code's summary.
Draws
Install
The marketplace name is claude-code-mods.
claude plugin marketplace add arasovic/claude-code-mods claude plugin install compact-keeper@claude-code-mods
It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.
- Version
- 0.1.3
- License
- MIT
- Repo stars
- 7
- Last change
- 2026-10-24
What it can reach
- Draws in the session
- Reads usage or context figures
- Reads this turn's file edits
Tested on Claude Code 2.1.296. Restart after installing. The marketplace name is claude-code-mods, the same string hamzafer uses. Add arasovic/claude-code-mods. Nothing to open: the next compaction writes the first file, one Markdown file per compaction in ~/.claude/handoffs/, named by date, time, project, and session. Each file has when it ran, manual or automatic, the token count before and after, the working directory and session id with the claude --resume command, any instructions given to /compact, the files edited since the previous compaction, and the summary Claude Code wrote. A short toast names the file once it is saved. Subagent compactions are skipped, and a failed write never blocks the compaction.
The marketplace, arasovic's claude-code-mods, also holds pin-board, cache-timer, turn-footer, and other mods by the same author. This one installs on its own; to update, run claude plugin marketplace update claude-code-mods, then claude plugin update compact-keeper@claude-code-mods. Keeping what /compact would lose is why this page files it under workflow. auto-handoff, by obie, writes a handoff file after the session sits idle, runs that handoff as if you typed it, and toasts when it does. compact-handoff, by REMvisual, writes a handoff, replaces the conversation with it, and toasts once context passes 70%. This one starts nothing and replaces nothing: it saves a file at each compaction you or Claude Code run. Where Claude Code's built-in Security default plugin runs first, on Team and Enterprise plans, on a machine with managed settings, and in the desktop app unless you use a personal Pro or Max plan, the mod notices a compaction only after it, and that file has no token counts. In the desktop app, an automatic compaction cleared with /clear before its reply ends gets no file. Its plugin.json names Mehmet Aras as its author.
Demo

What it hooks into
session.startWhen a session startstool.callAround a tool call, where it can hold onesession.compactWhen the context is compactedcommand.runWhen you run its slash command/compactturn.completeWhen a turn endssession.endWhen a session ends
Read from the on() calls in its hook modules. Open its source under Files to check what each one does.
Files
The author's README and source, 4 files. They load when you open them.
Facts
- Author
- arasovic
- Category
- Workflow
- Marketplace
- claude-code-mods
- Folder
- compact-keeper
- Version
- 0.1.3
- License
- MIT
- Repo stars
- 7
- Last change
- 2026-10-24
- Language
- TypeScript
- Files
- 7