catnap
by Martin Lipp · ★ 8 · updated 30 days ago
0
Claude compacts its own conversation at a clean break, then carries on by itself. A gentle note at 50% context or 300K tokens, whichever comes first, a strict one at 60% or 400K, Claude Code's auto-compact at 70% or 500K as the backstop, and a compact_now tool. All the lines are settings.
Install
/plugin marketplace add LippInc/catnap/plugin install catnap@lippincThen 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.submitskill.promptturn.startturn.stepturn.completesession.compactsession.end- API calls
$.clock.every$.clock.now$.command.run$.env.get$.env.set$.fs.read$.fs.write$.prompt.submit$.session.compact$.session.id$.session.surfaces$.session.usage$.tool.register$.ui.toast- Can see
/"^mcp__catnap__compact_now$"/ callsevery promptevery skillevery tool callcompaction- Reach
- level 2 of 3 writes filessets env varsdrives Claudereads filesreads env varsdraws
Origin
- How it got here
- Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
- Repository
- github.com/LippInc/catnap
- Path in repo
- repository root
- Source commit
faadb66the exact code the scan read- Author
- Martin Lipp @LippInc
- 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.