# Claude HUD:令AI代理嘅黑箱變透明嘅插件 > Author: Tony Lee > Published: 2026-02-08 > URL: https://tonylee.im/zh-HK/blog/claude-hud-plugin-transparent-ai-agent/ > Reading time: 1 minutes > Language: zh-HK > Tags: ai, claude-code, 開發工具, 開源, 生產力 ## Canonical https://tonylee.im/zh-HK/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/en/author/ - Publication: https://tonylee.im/en/blog/about/ - Related article: https://tonylee.im/zh-HK/blog/eight-hooks-that-guarantee-ai-agent-reliability/ - Related article: https://tonylee.im/zh-HK/blog/medvi-two-person-430m-ai-compressed-funnel/ - Related article: https://tonylee.im/zh-HK/blog/claude-code-layers-over-tools-2026/ ## Citation - Author: Tony Lee - Site: tonylee.im - Canonical URL: https://tonylee.im/zh-HK/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-HK/blog/ This content is original and authored by Tony Lee. Please attribute when quoting or referencing.