smart-compact

by hellosverre · ★ 5 · updated 23 days ago

PanesBandsGuardsPromptTools & agentswarnings

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 smart-compact

Install

/plugin marketplace add hellosverre/smart-compact
/plugin install smart-compact@smart-compact

Then run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.

View source on GitHub

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.completeclassic.PreCompactui.closeui.render
API calls
$.clock.after$.clock.now$.command.run$.process.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 promptclassic hooks
Reach
level 2 of 3 runs processesdrives Claudereads mod statedraws

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
ccecf5f the 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.

Other mods in Panes, close to this one by stars.