---
title: "cache-watch"
url: "https://claudemods.dev/zh-tw/builds/cache-watch-f855f2"
source: "https://github.com/anthonyhungnguyen/claude-code-mods/tree/main/cache-watch"
source_type: "github"
repo: "https://github.com/anthonyhungnguyen/claude-code-mods/tree/main/cache-watch"
author: "anthonyhungnguyen"
author_handle: "anthonyhungnguyen"
stars: 0
category: "用量與成本"
categories: ["cost"]
tags: ["cache", "claude-code", "cost", "hooks", "plugin", "statusline"]
permission_level: 0
scan_complete: true
install: "claude plugin marketplace add anthonyhungnguyen/claude-code-mods\nclaude plugin install cache-watch"
added: "2026-10-05T17:16:52.479Z"
updated: "2026-10-02T06:26:05Z"
locale: "zh-tw"
content_locale: "zh-tw"
---

# cache-watch

一個 Claude Code 外掛，當某一輪重建提示快取時顯示 toast，並列出寫入的權杖數、該輪成本與可能原因（閒置或模型變更）。

## Description

cache-watch 是 claude-code-mods 儲存庫中的多個外掛之一，每個外掛都位於自己的資料夾。它掛接 Claude Code 的工作階段回合，偵測提示快取何時重建，並用 toast 顯示寫入的權杖數、該輪成本與可能原因，例如閒置間隔或模型變更。儲存庫 README 說明安裝方式：將儲存庫複製到 ~/.claude/mods，在 ~/.claude/settings.json 的 CLAUDE_CODE_PLUGIN_DIRS 列出外掛資料夾，再用 claude plugin validate 驗證。

## Install

```
claude plugin marketplace add anthonyhungnguyen/claude-code-mods
claude plugin install cache-watch
```

## Original 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](cost-pane/) | Token and USD spend per session and per day, in the status line and a `/cost-pane` pane |
| [context-guard](context-guard/) | Context window fill in the status line; a toast once it passes 80% |
| [cache-watch](cache-watch/) | A toast when a turn rebuilt the prompt cache: tokens written, turn cost, likely cause (idle, model change) |
| [turn-timer](turn-timer/) | Speaks (`say` on macOS) and toasts when a turn longer than 2 minutes finishes |

## Install

```sh
git clone git@github.com:anthonyhungnguyen/claude-code-mods.git ~/.claude/mods
```

List each mod folder you want in `~/.claude/settings.json`, separated by `:`:

```json
{ "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>`.
