What is smart-compact?
smart-compact is a Claude Code mod by HarzerHeribert that keeps an idle session's prompt cache warm, or compacts it just before it expires, whichever is cheaper, and says on the status line whether the next prompt is ready or cold. It is listed under Cost & usage and has no public popularity data yet.
| Type | Claude code mod |
|---|---|
| Author | HarzerHeribert |
| Repository | HarzerHeribert/claude-modpack |
| Popularity | no public popularity data yet |
| Category | Cost & usage |
| Security | Low risk (96/100) |
| Rank | #6,216 of 9,397 Claude Code mods; #1,165 in Cost & usage |
| License | MIT |
| Last commit | 2026-11-10 |
| Hooks | 9 events |
| Sees | classic hooks, compaction |
| Draws on | UserMessage |
Is smart-compact safe to install?
smart-compact scores 96/100 on the MCPMods security check: Low risk. No checks raised a concern. It passed 7 of 8 checks.
Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.
| Check | Result |
|---|---|
| No network access | Pass |
| Starts no processes | Pass |
| Writes no files or config | Pass |
| Doesn't read environment variables | Pass |
| Only sees the events it hooks | Pass |
| Drives Claude (model calls, prompts) | Note |
| Passes claude plugin validate | Pass |
| Has an open-source license | Pass |
API calls in its code
| Call | What it means |
|---|---|
$.agent.list | |
$.clock.after | |
$.clock.every | |
$.clock.now | |
$.command.register | |
$.command.run | drives Claude |
$.model.fork | drives Claude |
$.prompt.read | |
$.session.compact | drives Claude |
$.session.messages | reads the transcript |
$.session.usage | |
$.state.get | |
$.state.set | |
$.statusline.remove | |
$.statusline.set | |
$.store.get | keeps its own state |
$.store.set | keeps its own state |
$.ui.log | draws interface |
$.ui.status | draws interface |
How do I install smart-compact?
- Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
claude --version
- Read its footprint. This lists every event it hooks and every API call it makes, without running it.
git clone https://github.com/HarzerHeribert/claude-modpack claude plugin validate ./claude-modpack/smart-compact
- Install it. Run this in your terminal, then /reload-plugins in an open session.
claude plugin marketplace add HarzerHeribert/claude-modpack && claude plugin install smart-compact@claude-modpack
Or ask Claude to set it up
Paste this into Claude Code and it installs smart-compact for you:
Install the "smart-compact" Claude Code mod from https://github.com/HarzerHeribert/claude-modpack/tree/main/smart-compact. Run claude plugin validate on it first and show me what it can access before you enable it.
More from HarzerHeribert/claude-modpack
This repository has at least 9 Claude Code mods on MCPMods.
- cells: Lets Claude make several edits and their check, or a language-server lookup or rename, in one step through the real tool (Review before installing)
- delegate: A hand_off tool: Claude gives a self-contained task to a cheaper worker model (Haiku for lookups and mechanical changes, (High risk)
- draft: Writing to a length in one draft and cuts, not rewrites. When your prompt sets a word limit, it carries your setting to (Low risk)
- eta: Shows long-running and background jobs with a percentage and an estimated finish time, read live from their output. (Review before installing)
- modpack: The claude-mods modpack: statusline, smart-compact, delegate, cells, eta, seek and draft, installed together and built t (High risk)
- route: Optional, and the one mod that needs an outside classifier model: hands feature and test work to delegate's cheaper work (Review before installing)
- seek: Has Claude look around your code in few, lean steps. Every request re-reads the whole conversation, and whatever Claude (Low risk)
- statusline: One line under the prompt: the model and its effort, how full the context is, the plan's 5-hour and 7-day use with their (Low risk)