ctx-keeper
by irfanfaraaz · ★ 0 · updated 4 days ago
Cache countdown, context, limits and cost band; past 350k it runs /re-fresh, copies it, compacts and pastes it back
Install
git clone https://github.com/irfanfaraaz/claude-kitclaude --plugin-dir ./claude-kit/mods/ctx-keeperThen 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.compactturn.startsession.startsession.measuretool.callturn.completeui.render- API calls
$.agent.list$.clock.after$.clock.every$.clock.now$.command.run$.env.get$.fs.write$.process.run$.prompt.submit$.session.model$.state.get$.state.set$.ui.copy$.ui.invalidate$.ui.resolve$.ui.toast- Draws
AbovePrompt- Can see
compaction/"^TaskCreate$"/ calls/"^TaskUpdate$"/ calls- Reach
- level 2 of 3 other: $.state.getother: $.state.setruns processeswrites filesdrives Claudereads 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/irfanfaraaz/claude-kit
- Path in repo
mods/ctx-keeper- Source commit
8db99a1the exact code the scan read- Author
- @irfanfaraaz
- License
- No license declared — ask the author before reusing code.
- 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 irfanfaraaz/claude-kit
carousel-ship
irfanfaraaz/claude-kit
After a carousel render: Caption, Queue Threads and Log ledger buttons; blocks Threads posts with a part over 500 characters
commit-guard
irfanfaraaz/claude-kit
Never commits docs/superpowers, never pushes unless you said push, asks before committing on main/staging/prod
env-bootstrap
irfanfaraaz/claude-kit
Per-project Node version on PATH and env file auto-loaded for Bash, so Claude stops typing nvm use / source .env
git-band
irfanfaraaz/claude-kit
Git state above the prompt: branch, upstream, ahead/behind, Claude vs your changes, PR and CI, worktree, stash; toasts where each commit landed
hybrid-agents
irfanfaraaz/claude-kit
Subagents default to Sonnet; pasting a plan path adds the hybrid rule (inline small tasks, Sonnet subagents for big ones)
rm-to-trash
irfanfaraaz/claude-kit
Rewrites rm into macOS trash so deletes are recoverable and stop hitting the rm deny rule
tool-preload
irfanfaraaz/claude-kit
Keeps context-mode, jcodemunch, claude-mem, WebSearch, Task and Supabase tools loaded so Claude stops calling ToolSearch for them
turn-coach
irfanfaraaz/claude-kit
One fork per turn: a verdict on work turns (solved, gaps, shortcuts) plus up to 3 next prompts, in one compact block above the prompt. Merges next-steps and next-steps-supervisor.