haiku-compact

by kjhq · ★ 0 · updated 9 days ago

BandsPromptvalidates

0

Squish your context with Haiku when the prompt cache goes cold, so your main model re-caches a short summary instead of the whole transcript. One line above the prompt shows up only when the cache is cold, says what a squish saves, then what it saved.

install haiku-compact

Install

/plugin marketplace add kjhq/haiku-compact
/plugin install haiku-compact@haiku-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
classic.SessionStartturn.startturn.completeprompt.submitsession.compactui.render
API calls
$.clock.after$.clock.now$.model.complete$.prompt.fill$.prompt.submit$.session.compact$.session.usage$.state.get$.state.set$.ui.resolve$.ui.toast
Draws
AbovePrompt
Can see
classic hooksevery promptcompaction
Reach
level 2 of 3 drives Claudewrites the prompt boxreads 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/kjhq/haiku-compact
Path in repo
repository root
Source commit
f31e212 the exact code the scan read
Author
@kjhq
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.