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.

Updated 2026-10-11

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.

TypeClaude code mod
AuthorGharib89
RepositoryGharib89/claude-mods
Popularityno public popularity data yet
CategoryContext & memory
SecurityLow risk (92/100)
Rank#3,275 of 5,272 Claude Code mods; #301 in Context & memory
Last commit2026-10-11
Hooks4 events
Sees? calls, compaction, every tool call
Draws onnothing

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.

CheckResult
No network accessPass
Starts no processesPass
Writes no files or configPass
Doesn't read environment variablesPass
Only sees the events it hooksPass
Drives Claude (model calls, prompts)Note
Passes claude plugin validatePass
No license detectedNote

API calls in its code

CallWhat it means
$.clock.after
$.prompt.submitdrives Claude
$.session.compactdrives Claude
$.session.usage
$.tool.registerdrives Claude
$.ui.toastdraws interface

How do I install smart-compact?

  1. Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
    claude --version
  2. 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
  3. 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)