smartcompact

by Amber van den Berg · ★ 0 · updated 7 days ago

Status lineCommandsPromptvalidates

0

A Claude Code mod that compacts the conversation at a good moment, asked for by the session after a nudge or chosen by a small judge model, and then tells Claude to continue.

install smartcompact

Install

/plugin marketplace add ambervdberg/smartcompact
/plugin install smartcompact@smartcompact

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.startturn.startturn.stepturn.completesession.appendprompt.editprompt.contextcommand.runsession.compactsession.end
API calls
$.agent.list$.clock.after$.clock.now$.command.register$.env.get$.fs.exists$.fs.read$.fs.write$.model.complete$.prompt.fill$.prompt.read$.prompt.submit$.session.append$.session.compact$.session.cwd$.session.id$.session.messages$.session.usage$.store.delete$.store.get$.store.set$.ui.status
Can see
the system promptcompaction
Reach
level 2 of 3 other: $.prompt.readwrites filesdrives Claudewrites the prompt boxreads filesreads env varsreads the transcriptpersists 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/ambervdberg/smartcompact
Path in repo
plugin/smartcompact
Source commit
c8a1e69 the exact code the scan read
Author
Amber van den Berg @ambervdberg
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.