Claude Modsunofficial directory

Context & memory·terminal·MIT

compact-keeper

A Markdown handoff in ~/.claude/handoffs for every compaction, with the resume command.

Generic Claude Mods cover used for compact-keeper, which has no screenshot of its own yet

compact-keeper saves a Markdown file each time Claude Code compacts the conversation, so the context that /compact replaced can be recovered later. It covers manual and automatic compactions, adds nothing to the context and costs no tokens.

What it saves

One file per compaction in ~/.claude/handoffs/, named by date, time, project folder and the first eight characters of the session id, such as 2026-10-03-0952-my-app-4f9c2a1e.md. Each file holds:

  • the time of the compaction, whether you or Claude Code started it, and the token count before and after
  • the working directory and the session id, with the claude --resume command that reopens the session
  • the instructions you gave /compact, if any
  • the files edited since the previous compaction
  • the summary Claude Code wrote to replace the conversation

A toast shows the file’s path once it is saved.

Install

Needs Claude Code 2.1.287 or later.

claude plugin marketplace add arasovic/claude-code-mods
claude plugin install compact-keeper@claude-code-mods

Restart Claude Code. There is nothing to open: the next compaction writes the first file.

The marketplace holds fourteen mods by the same author, among them session-meter. Its name, claude-code-mods, is also used by hamzafer’s and karanb192’s marketplaces; if you added one of those, the add clashes, so remove it first with claude plugin marketplace remove claude-code-mods.

How it works

The mod hooks two events. On tool.call it watches only the Edit and Write tools: when one succeeds, it records the file path, keeping the 100 most recent. It does not read file contents. On session.compact it lets the compaction finish, writes the handoff to your home folder and empties the list.

Compactions run by a subagent are skipped, and so are summaries prepared in advance that may never be applied. If the write fails, the compaction goes ahead as normal. The mod makes no network calls.

Limitations

  • Only edits made through the Edit and Write tools appear in the file list. Files changed by shell commands are not listed.
  • Nothing deletes old handoffs, so the folder grows by one file per compaction.

Similar Claude Mods

The whole directory →