What is idle-compactor?
idle-compactor is a Claude Code mod by ymnao that compacts an idle Claude Code session shortly before its 1-hour prompt cache expires, so coming back later re-sends a short summary instead of the whole conversation uncached. It is listed under Cost & usage and has 1 GitHub stars.
| Type | Claude code mod |
|---|---|
| Author | ymnao |
| Repository | ymnao/dotfiles |
| Popularity | 1 GitHub stars |
| Category | Cost & usage |
| Security | Low risk (80/100) |
| Rank | #2,406 of 5,272 Claude Code mods; #408 in Cost & usage |
| Last commit | 2026-10-18 |
| Hooks | 5 events |
| Sees | compaction |
| Draws on | nothing |
Is idle-compactor safe to install?
idle-compactor scores 80/100 on the MCPMods security check: Low risk. Things to review: reads environment variables. It passed 5 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 |
| Reads environment variables | Review |
| Only sees the events it hooks | Pass |
| Doesn't drive Claude | Pass |
| Validator reported problems | Note |
| No license detected | Note |
API calls in its code
| Call | What it means |
|---|---|
$.clock.every | |
$.clock.now | |
$.command.register | |
$.command.run | drives Claude |
$.env.get | reads env vars |
$.session.compact | drives Claude |
$.session.id | |
$.session.usage | |
$.settings.read | reads settings |
$.store.get | keeps its own state |
$.store.set | keeps its own state |
$.ui.log | draws interface |
How do I install idle-compactor?
- 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/ymnao/dotfiles claude plugin validate ./dotfiles/claude/plugins/idle-compactor/plugin
- Install it. Run this in your terminal, then /reload-plugins in an open session.
claude plugin marketplace add ymnao/dotfiles && claude plugin install idle-compactor@claude-idle-compactor
Or ask Claude to set it up
Paste this into Claude Code and it installs idle-compactor for you:
Install the "idle-compactor" Claude Code mod from https://github.com/ymnao/dotfiles/tree/main/claude/plugins/idle-compactor/plugin. Run claude plugin validate on it first and show me what it can access before you enable it.
More from ymnao/dotfiles
This repository has 2 Claude Code mods on MCPMods.
- issue-suggest: Lists open issues of the session's GitHub repo above the prompt box while the word at the cursor starts with #; pressing (Review before installing)