smart-compact
by hellosverre · ★ 0 · updated today
0
Compacts at the right moment: after a commit or green tests, a minute before the prompt cache expires, or when Claude asks for it with its own request_compact tool.
Install
/plugin marketplace add hellosverre/smart-compact/plugin install smart-compact@smart-compactThen run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.
What it hooks into
From an automated scan with claude plugin validate, not a security review. Mods run with your permissions; read the code before installing.
- Events
session.starttool.callprompt.submitturn.completeui.closeui.render- API calls
$.clock.after$.command.run$.session.compact$.session.usage$.state.get$.state.set$.tool.register$.ui.close$.ui.open$.ui.resolve$.ui.toast- Draws
PaneAbovePrompt- Can see
mcp__smart-compact__request_compact callsBash callsPowerShell callsevery prompt- Reach
- level 2 of 3 other: $.state.getother: $.state.setdrives Claudedraws
Origin
- How it got here
- Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
- Repository
- github.com/hellosverre/smart-compact
- Path in repo
- repository root
- Source commit
5808714the exact code the scan read- Author
- @hellosverre
- License
- MIT
- First published
- Last pushed
- First listed here
Name and description come from the mod's own manifest. We link to the code; we don't host it, and it stays under its author's license.