anthonyhungnguyen/claude-code-mods/tree/main/context-guard
context-guard
一个 Claude Code plugin,在状态行显示上下文窗口填充量,并在使用量超过 80% 时发出 toast。
关于这个 mod
在状态行显示上下文窗口填充量,并在上下文快用完前提醒。属于 claude-code-mods 集合;通过克隆仓库,将每个 mod 文件夹列入 CLAUDE_CODE_PLUGIN_DIRS,然后重启工作階段来安装。
安装
请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。
claude plugin marketplace add anthonyhungnguyen/claude-code-mods claude plugin install context-guard
原文 / README
claude-code-mods
Mods for Claude Code, one folder each. A mod is a plugin of function hooks: panes, status lines, slash commands, tool guards.
| Mod | What it does |
| --- | --- |
| cost-pane | Token and USD spend per session and per day, in the status line and a /cost-pane pane |
| context-guard | Context window fill in the status line; a toast once it passes 80% |
| cache-watch | A toast when a turn rebuilt the prompt cache: tokens written, turn cost, likely cause (idle, model change) |
| turn-timer | Speaks (say on macOS) and toasts when a turn longer than 2 minutes finishes |
Install
git clone [email protected]:anthonyhungnguyen/claude-code-mods.git ~/.claude/mods
List each mod folder you want in ~/.claude/settings.json, separated by ::
{ "env": { "CLAUDE_CODE_PLUGIN_DIRS": "~/.claude/mods/cost-pane:~/.claude/mods/context-guard:~/.claude/mods/cache-watch:~/.claude/mods/turn-timer" } }
New sessions load them. Check a mod with claude plugin validate ~/.claude/mods/<mod>.
其他同名作品
- context-guardmelodic-software · ★ 22
