What is smart-compact?
smart-compact is a Claude Code mod by tartinerlabs that compacts between turns when the context is full enough, sooner after a commit, PR, approved plan or finished todo list, or when the prompt cache is about to go cold or the 5-hour limit. It is listed under Cost & usage 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 | Cost & usage |
| Security | Low risk (96/100) |
| Rank | #4,778 of 5,272 Claude Code mods; #944 in Cost & usage |
| License | MIT |
| Last commit | 2026-10-16 |
| Hooks | 4 events |
| Sees | 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 | |
$.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 8 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 again a few prompts in when that one was short, so it is easy to find in / (Low risk)
- cache-clock: Counts down to the prompt cache going cold, with the last request's hit rate, above the prompt. (Low risk)
- limit-watch: Draws the 5-hour and weekly usage limits and the session's cost above the prompt, limits coloured by use, with reset cou (Low risk)
- pr-pilot: Shows the current branch's pull request above the prompt, with its checks and whether it can merge, toasts when checks f (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)
- token-weather: A live forecast of the context window, drawn above the prompt. (Low risk)