context-guard

by Axton Liu · ★ 17 · updated 22 days ago

BandsCommandswarnings

0

Warns before the context fills up; one click writes a work log, compacts, then resumes from the log. 上下文快满时提醒,一键写日志、压缩、从日志接着干。

install context-guard

Install

/plugin marketplace add axtonliu/context-guard
/plugin install context-guard@axtonliu-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.startcommand.runturn.startturn.completesession.compactui.render
API calls
$.clock.every$.clock.now$.command.register$.command.run$.fs.read$.fs.stat$.prompt.submit$.session.compact$.session.usage$.state.get$.state.set$.store.get$.store.set$.ui.resolve$.ui.toast
Draws
AbovePrompt
Can see
compaction
Reach
level 2 of 3 drives Claudereads filesreads 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/axtonliu/context-guard
Path in repo
repository root
Source commit
389b199 the exact code the scan read
Author
Axton Liu @axtonliu
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.