ClaudeMods
☰
ZH-CN
● 0 人在线 · 浏览 0 次
赞助提交作品
GitHub 仓库 · 发布者 anthonyhungnguyen

cache-watch

一个 Claude Code 插件,当某轮重建提示缓存时显示 toast,并展示写入的令牌数、该轮成本和可能原因(闲置或模型变化)。

anthonyhungnguyen@anthonyhungnguyen

anthonyhungnguyen/claude-code-mods/tree/main/cache-watch

已翻译

关于这个 mod

cache-watch 是 claude-code-mods 仓库中多个插件之一,每个插件都位于自己的文件夹。此插件挂接 Claude Code 的各轮处理,检测提示缓存何时被重建,并用 toast 显示写入的令牌数、该轮成本和可能原因,例如闲置间隔或模型变化。仓库 README 说明了安装方式:将仓库克隆到 ~/.claude/mods,在 ~/.claude/settings.json 的 CLAUDE_CODE_PLUGIN_DIRS 中列出插件文件夹,并通过 claude plugin validate 进行验证。

安装

请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。

claude plugin marketplace add anthonyhungnguyen/claude-code-mods
claude plugin install cache-watch
原文 / 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>.

其他同名作品

更多类似作品