self-compact

by demetre19 · ★ 0 · updated 2 Nov 2026

PanesBandsGuardsCommandsPromptTools & agentswarnings

0

The agent manages its own context: notice/warning/forced thresholds, a self_compact tool with a note-to-self handoff, and a context gauge.

install self-compact

Install

/plugin marketplace add demetre19/claude-mods
/plugin install self-compact@claude-mods

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.starttool.callprompt.submitturn.completesession.compactcommand.runui.render
API calls
$.clock.after$.command.register$.command.run$.env.get$.fs.exists$.fs.read$.fs.write$.http.fetch$.process.run$.prompt.submit$.session.compact$.session.id$.session.model$.session.usage$.state.get$.state.set$.store.delete$.store.get$.store.set$.tool.register$.ui.close$.ui.open$.ui.resolve$.ui.toast
Draws
PaneAbovePrompt
Can see
? callsevery tool callevery promptcompaction
Reach
level 3 of 3 networkruns processeswrites filesdrives Claudereads filesreads env varsreads mod statepersists 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/demetre19/claude-mods
Path in repo
self-compact
Source commit
3112a69 the exact code the scan read
Author
@demetre19
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.

More from demetre19/claude-mods

calm

demetre19/claude-mods

Hides tool rows and mid-turn working notes so the transcript reads as prose; a little boat sails while Claude works. /calm toggles.

★ 0ReskinsCommands

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