jarrodwatts/claude-hud
A Claude Code plugin that shows what's happening - context usage, active tools, running agents, and todo progress
JavaScript · ★ 19,539 · Fork 872 · 在 GitHub 查看
在手机上浏览源码、订阅每日 AI 趋势日报与项目架构深度解读:获取 CopoHub 客户端(iOS & HarmonyOS)→
GitHub Trending 上榜记录
jarrodwatts/claude-hud 已在 GitHub Trending 每日榜单上榜 7 天,最高排名第 1,首次上榜 2026-03-17,最近一次上榜 2026-03-23。
| 日期 | 排名 | Star | 当日增长 |
|---|---|---|---|
| 2026-03-23 | #6 | 11,646 | +834 |
| 2026-03-22 | #6 | 11,112 | +832 |
| 2026-03-21 | #6 | 10,358 | +957 |
| 2026-03-20 | #1 | 9,465 | +1,074 |
| 2026-03-19 | #4 | 8,437 | +1,851 |
| 2026-03-18 | #1 | 6,799 | +1,040 |
| 2026-03-17 | #5 | 5,502 | +454 |
同期上榜的项目
- FujiwaraChoki/MoneyPrinterV2 – Automate the process of making money online.
- bytedance/deer-flow – An open-source long-horizon SuperAgent harness that researches, codes, and creates. With the help of sandboxes, memories, tools, skill, subagents and message gateway, it handles different levels of tasks that could take minutes to hours.
- Crosstalk-Solutions/project-nomad – Project NOMAD is an offline-first knowledge and education server. Wikipedia, thousands of books, courses, maps, and optional local AI, all running on hardware you own with no internet required.
- vxcontrol/pentagi – Fully autonomous AI Agents system capable of performing complex penetration testing tasks
- jamwithai/production-agentic-rag-course
- browser-use/browser-use – Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
jarrodwatts/claude-hud 项目深度剖析与商业评估报告
jarrodwatts/claude-hud 项目深度剖析与商业评估报告
1. 核心定位与商业落地价值
根本痛点解构:Claude Code 作为交互式终端代理,其黑盒式执行过程长期困扰开发者——上下文窗口何时耗尽、子代理是否陷入死循环、工具调用是否异常频繁,这些关键运行时指标在此前完全不可见。claude-hud 精准切入这一可观测性真空,将原本只能通过事后翻查 JSONL 日志才能获取的遥测数据,实时投射到状态行,本质上是为 LLM 编程代理构建了 飞行数据记录仪与仪表盘的一体化方案。
商业落地场景:该项目虽定位为开发者工具,但蕴含明确的企业级价值。其一,成本治理:通过实时展示 token 消耗速率与上下文水位,企业可量化评估 Claude Code 在 CI/CD 流水线或批量代码重构任务中的单位成本效率;其二,合规审计:display.showAuth 与 display.showCost 功能可辅助财务部门追踪不同团队、不同项目的 API 消耗归属,为内部成本分摊提供数据支撑;其三,SRE 运维:externalUsagePath 快照机制允许将用量数据导出至监控系统(如 Prometheus/Grafana),实现对 AI 编码代理集群的资源使用率统一监控。
竞品护城河:在同类生态中(如 claude-code-statusline、ccusage 等),claude-hud 的差异化优势在于深度绑定官方 statusline API 而非 hack 终端输出,这使其具备原生稳定性;同时,其对 ratelimits、cost.totalcostusd 等非文档化字段的精准解析形成了技术壁垒。27.5k Stars 与 1.2k Forks 的社区规模本身即是信任背书,MIT 许可降低了企业采用的法律风险。
2. 核心架构设计与技术深度
模块拆解思想:项目采用管道-过滤器架构,清晰划分为四个松耦合层: 输入适配层:从 stdin 读取 Claude Code 官方推送的 JSON 状态负载,同时监听 transcript JSONL 文件句柄; 解析增强层:核心引擎将原始 JSON 与 JSONL 增量解析结果进行事件融合,提取工具调用、代理状态、todo 变更等语义事件; 状态聚合层:维护一个不可变的状态快照树,通过 300ms 防抖机制合并高频事件,避免渲染抖动; 渲染输出层:根据配置矩阵(布局、语言、颜色、阈值)将状态快照编译为 ANSI 转义序列。
关键数据流设计:最精妙之处在于双源数据交叉验证。stdin 提供的是官方标准化指标(如 context 百分比、rate limits),而 transcript 提供的是非结构化的行为日志(如工具名、代理提示词)。设计上采用主从模式——stdin 数据优先,transcript 仅在 stdin 缺失或需要补充细节(如模型来源、effort 级别)时介入。这避免了单一数据源的盲区。
在 README 中展示上榜徽章
[](https://github.fq6825.top/repo/jarrodwatts/claude-hud)