What is smart-compact?
smart-compact is a Claude Code mod by Gharib89 that lets Claude compact its own context at a step boundary it picks, with its own instructions, then resume the work. It is listed under Context & memory and has no public popularity data yet.
| Type | Claude code mod |
|---|---|
| Author | Gharib89 |
| Repository | Gharib89/claude-mods |
| Popularity | no public popularity data yet |
| Category | Context & memory |
| Security | Low risk (92/100) |
| Rank | #3,275 of 5,272 Claude Code mods; #301 in Context & memory |
| Last commit | 2026-10-11 |
| Hooks | 4 events |
| Sees | ? calls, compaction, every tool call |
| Draws on | nothing |
Is smart-compact safe to install?
smart-compact scores 92/100 on the MCPMods security check: Low risk. No checks raised a concern. It passed 6 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 |
| No license detected | Note |
API calls in its code
| Call | What it means |
|---|---|
$.clock.after | |
$.prompt.submit | drives Claude |
$.session.compact | drives Claude |
$.session.usage | |
$.tool.register | drives Claude |
$.ui.toast | 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/Gharib89/claude-mods claude plugin validate ./claude-mods/plugins/smart-compact
- Install it. Run this in your terminal, then /reload-plugins in an open session.
claude plugin marketplace add Gharib89/claude-mods && claude plugin install smart-compact@claude-mods
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/Gharib89/claude-mods/tree/main/plugins/smart-compact. Run claude plugin validate on it first and show me what it can access before you enable it.
More from Gharib89/claude-mods
This repository has 2 Claude Code mods on MCPMods.
- gh-pane: A docked pane of the session repo's issues and PRs in run order, each row with its labels in their colours, a toggle tha (Review before installing)