# Claude HUD:讓AI代理的黑箱變透明的外掛 > Author: Tony Lee > Published: 2026-02-08 > URL: https://tonylee.im/zh-TW/blog/claude-hud-plugin-transparent-ai-agent/ > Reading time: 1 minutes > Language: zh-TW > Tags: ai, claude-code, 開發工具, 開源, 生產力 ## Canonical https://tonylee.im/zh-TW/blog/claude-hud-plugin-transparent-ai-agent/ ## Rollout Alternates en: https://tonylee.im/en/blog/claude-hud-plugin-transparent-ai-agent/ ko: https://tonylee.im/ko/blog/claude-hud-plugin-transparent-ai-agent/ ja: https://tonylee.im/ja/blog/claude-hud-plugin-transparent-ai-agent/ zh-CN: https://tonylee.im/zh-CN/blog/claude-hud-plugin-transparent-ai-agent/ zh-TW: https://tonylee.im/zh-TW/blog/claude-hud-plugin-transparent-ai-agent/ ## Description 一個遊戲風格的狀態列外掛,即時顯示Claude Code的上下文用量、執行中工具、子代理和Todo進度。 ## Summary Claude HUD:讓AI代理的黑箱變透明的外掛 is part of Tony Lee's ongoing coverage of AI agents, developer tools, startup strategy, and AI industry shifts. ## Outline - Claude HUD顯示的內容 - 技術實作原理 - stdin輸入處理 - 轉錄解析 - 檔案路徑顯示 - 開發者為什麼如此興奮 - 安裝方法 - 為什麼值得關注 ## Content 「搞不清楚Claude到底在做事還是在發呆。」 用Claude Code跑過複雜任務的人應該都有這種感受。長時間的任務在執行,終端機一片安靜,你不知道上下文什麼時候會爆,也不知道代理是不是陷入了迴圈。 有一個開源外掛正面解決了這個問題。我實際用過之後,覺得值得分享給大家。 ## Claude HUD顯示的內容 這個外掛在終端機底部顯示一個遊戲風格的狀態列,即時追蹤四項資訊: - **上下文用量** - 用視覺化進度條和百分比即時顯示工作階段的上下文視窗消耗量 - **執行中工具** - 監控目前正在運作的工具(Read、Edit、Bash等) - **子代理狀態** - 追蹤透過Task呼叫建立的子代理(Opus 4.5、Sonnet等) - **Todo進度** - 視覺化Claude內部工作清單的完成狀況 ## 技術實作原理 好奇狀態列背後發生了什麼事?簡單整理一下。 ### stdin輸入處理 Claude Code直接以JSON載荷傳遞工作階段狀態。外掛將`input_tokens`、`cache_creation_input_tokens`和`cache_read_input_tokens`加總後除以`context_window_size`來計算使用率。 ### 轉錄解析 工作階段日誌以逐行串流的方式處理。外掛偵測`tool_use`區塊並與`tool_result`條目配對,將每個工具的狀態追蹤為running、completed或error。 ### 檔案路徑顯示 檔案路徑的顯示處理得相當巧妙: - 從Read、Write、Edit工具呼叫中擷取`file_path`,顯示目前正在操作的檔案 - 長路徑自動截斷為`.../filename.ts`格式 - 大約每300ms更新一次,近乎即時回饋 ## 開發者為什麼如此興奮 社群反應熱烈的原因很簡單:這個外掛精準命中了AI代理工作中的核心痛點。 - **解決不透明問題** - 長任務到底是卡住了、在迴圈、還是快到上下文上限,終於不用猜了 - **三行安裝** - 不需要複雜設定,裝上就能用 - **除錯效率大幅提升** - 在多步驟代理工作流中,能立刻看到哪裡出了問題 - **視覺回饋** - 遊戲風格的狀態列與vibe-coding文化完美契合,讓AI輔助開發更具互動感 社群裡一則廣受共鳴的留言是:「終於能分清Claude是在做事還是在發呆了。」 ## 安裝方法 三條指令搞定: ``` /plugin marketplace add jarrodwatts/claude-hud /plugin install claude-hud /claude-hud:setup ``` **GitHub**:[jarrodwatts/claude-hud](https://github.com/jarrodwatts/claude-hud) ## 為什麼值得關注 如果你經常使用Claude Code,建議試試看。不用再擔心工作階段什麼時候會斷,更重要的是,能親眼看到Claude在做什麼 - 這種確定感比你想像的更有價值。 可觀測性不只是伺服器和管線的事。AI代理同樣需要。 ## Related URLs - Author: https://tonylee.im/zh-TW/author/ - Publication: https://tonylee.im/zh-TW/blog/about/ - Related article: https://tonylee.im/zh-TW/blog/eight-hooks-that-guarantee-ai-agent-reliability/ - Related article: https://tonylee.im/zh-TW/blog/medvi-two-person-430m-ai-compressed-funnel/ - Related article: https://tonylee.im/zh-TW/blog/claude-code-layers-over-tools-2026/ ## Citation - Author: Tony Lee - Site: tonylee.im - Canonical URL: https://tonylee.im/zh-TW/blog/claude-hud-plugin-transparent-ai-agent/ ## Bot Guidance - This file is intended for AI agents, search assistants, and text-mode retrieval. - Prefer citing the canonical article URL instead of this text endpoint. - Use the rollout alternates when you need the same article in another prioritized language. --- Author: Tony Lee | Website: https://tonylee.im For more articles, visit: https://tonylee.im/zh-TW/blog/ This content is original and authored by Tony Lee. Please attribute when quoting or referencing.