What is smart-compact?
smart-compact is a Claude Code mod by tartinerlabs that asks Haiku after each turn whether the work just reached a clean break, such as a commit, PR or approved plan, and compacts there with a summary shaped for it. Asks again only once the. It is listed under Context & memory and has no public popularity data yet.
| Type | Claude code mod |
|---|---|
| Author | tartinerlabs |
| Repository | tartinerlabs/claude-code-mods |
| Popularity | no public popularity data yet |
| Category | Context & memory |
| Security | Low risk (96/100) |
| Rank | #8,707 of 9,397 Claude Code mods; #778 in Context & memory |
| License | MIT |
| Last commit | 2026-11-30 |
| Hooks | 5 events |
| Sees | compaction, every tool call |
| Draws on | nothing |
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 |
|---|---|
$.clock.every | |
$.clock.now | |
$.model.complete | drives Claude |
$.prompt.read | |
$.prompt.submit | drives Claude |
$.session.compact | drives Claude |
$.session.usage | |
$.state.get | |
$.state.set | |
$.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/tartinerlabs/claude-code-mods claude plugin validate ./claude-code-mods/plugins/smart-compact
- Install it. Run this in your terminal, then /reload-plugins in an open session.
claude plugin marketplace add tartinerlabs/claude-code-mods && claude plugin install smart-compact@tartinerlabs-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/tartinerlabs/claude-code-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 tartinerlabs/claude-code-mods
This repository has at least 9 Claude Code mods on MCPMods.
- auto-resume: Sends "continue" once a usage limit resets, so a turn cut off by the limit picks up where it stopped. (Low risk)
- auto-session-name: Names each session from its first prompt and re-checks the name every few prompts as the work moves on, so it is easy to (Low risk)
- cache-clock: Counts down to the prompt cache going cold, with the last request's hit rate, above the prompt. (Low risk)
- git-status: Shows the branch, working tree and the branch's pull request above the prompt, toasts when checks finish or a rebase sto (Low risk)
- limit-watch: Draws the 5-hour and weekly usage limits above the prompt, coloured by use, with reset countdowns and toasts at 80% and (Low risk)
- package-manager: Holds Claude to the project's package manager and wrapper, giving the exact command to run instead, and stops it weakeni (Low risk)
- release-notes: Drafts App Store release notes for Xcode projects when the version is bumped, into fastlane metadata or CHANGELOG.md, an (Review before installing)
- resource-watch: Shows which Claude Code session is using each booted Apple simulator, Claude Design project and the Xcode app, above the (Review before installing)