best-claude-hud

作者 GaoSSR已验证

Minimal Claude Code statusline HUD powered by Rust.

1,352
Stars
37
Forks
Rust
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/GaoSSR/best-claude-hud

快速入门

使用 best-claude-hud 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

English | 简体中文 | 日本語

best-claude-hud

Minimal Claude Code statusline HUD, powered by Rust


Rust MacOS Linux Windows supported Command: best-claude-hud License: Apache-2.0 Available on CodeGuilds

GitHub stars npm downloads per month GitTrend peak rank 79 on 2026-07-28 OSSInsight rank 37 on 2026-07-30 GitHub1K report rank 6 on 2026-07-26

AtomGit

best-claude-hud Overview

best-claude-hud is a high-performance Claude Code statusline tool written in Rust. It shows the status information you actually need while using Claude Code in a terminal: model and live reasoning effort, workspace, Git branch/status, context window usage, and optional usage/rate-limit metadata.

best-claude-hud statusline preview

The default statusline focuses on:

  • Claude model display with live reasoning effort when available
  • Claude Code launch directory, stable across temporary working-directory changes
  • Git branch, clean/dirty/conflict state, and ahead/behind counts
  • context window usage from Claude Code's official statusLine data, with active-transcript fallback
  • optional usage/rate-limit, cost, session, and output style segments

Install

best-claude-hud is distributed through npm. The npm package uses prebuilt native binaries; users do not need Rust installed.

Install best-claude-hud and configure Claude Code in one line:

npm install -g best-claude-hud@latest && best-claude-hud --setup

Restart Claude Code after setup. Existing sessions do not automatically reload ~/.claude/settings.json.

Install only:

npm install -g best-claude-hud@latest

Using yarn or pnpm:

yarn global add best-claude-hud@latest
pnpm add -g best-claude-hud@latest

For users in China:

npm install -g best-claude-hud@latest --registry https://registry.npmmirror.com && best-claude-hud --setup

Update an existing installation:

npm install -g best-claude-hud@latest

Uninstall:

npm uninstall -g best-claude-hud

Nix

best-claude-hud also ships a Nix flake for declarative and reproducible environments.

Run without installing globally:

nix run github:GaoSSR/best-claude-hud -- --help

Install into a Nix profile:

nix profile install github:GaoSSR/best-claude-hud
best-claude-hud --setup

For home-manager or another declarative setup, point Claude Code directly at the Nix store binary. The example below declaratively manages the entire ~/.claude/settings.json file and does not merge existing settings. Use it only for a new file or when all Claude Code settings are declared in the same Nix configuration:

# In your flake inputs:
# best-claude-hud.url = "github:GaoSSR/best-claude-hud";

{ inputs, pkgs, ... }:

let
  hud = inputs.best-claude-hud.packages.${pkgs.system}.default;
in
{
  home.packages = [ hud ];

  home.file.".claude/settings.json".text = builtins.toJSON {
    statusLine = {
      type = "command";
      command = "${hud}/bin/best-claude-hud";
      padding = 0;
    };
  };
}

If you keep ~/.claude/settings.json manually, run best-claude-hud --setup or add the statusLine block directly; do not use this home.file declaration. If Nix already manages the file, add statusLine to the existing Nix expression. To migrate an unmanaged file to Home Manager, first copy every existing setting into Nix, then move the original file out of the way—for example, by renaming it as a backup—before activation.

Development shell:

nix develop

Claude Code Configuration

npm install -g best-claude-hud@latest only installs the command. Claude Code will not show the HUD until statusLine is configured.

Recommended:

best-claude-hud --setup

The setup command writes a statusLine block to ~/.claude/settings.json and preserves existing settings. It resolves the installed command to an absolute path when possible:

{
  "statusLine": {
    "type": "command",
    "command": "/path/to/best-claude-hud",
    "padding": 0
  }
}

Manual configuration can also use "command": "best-claude-hud" if your Claude Code sessions inherit the same PATH as your shell. If statusLine already exists, --setup creates a timestamped backup next to settings.json before replacing it. Restart Claude Code after changing this file.

The npm package intentionally does not install a binary into ~/.claude. It uses the global npm command and resolves the matching native binary from Kiri-style npm alias optional dependencies.

Commands

best-claude-hud                    # open the interactive menu when run in a terminal
best-claude-hud --help             # print command help
best-claude-hud --version          # print version
best-claude-hud --setup            # configure Claude Code statusLine
best-claude-hud --config           # open the TUI configuration interface
best-claude-hud --theme minimal    # temporarily render with a built-in theme
best-claude-hud --patch <cli.js>   # patch Claude Code cli.js context warnings

Themes

Temporarily override the configured theme:

best-claude-hud --theme cometix
best-claude-hud --theme minimal
best-claude-hud --theme gruvbox
best-claude-hud --theme nord
best-claude-hud --theme powerline-dark
best-claude-hud --theme powerline-light
best-claude-hud --theme powerline-rose-pine
best-claude-hud --theme powerline-tokyo-night

Custom themes can be stored under:

~/.claude/best-claude-hud/themes/

Then use:

best-claude-hud --theme my-custom-theme

Configuration

Configuration files are stored under:

~/.claude/best-claude-hud/

Important files:

  • config.toml: main HUD and segment configuration
  • models.toml: model display names and context window limits
  • themes/*.toml: custom theme presets
  • .api_usage_cache.json: optional usage API cache
  • .update_state.json: update-check state

Run the TUI configurator:

best-claude-hud --config

Available segment families:

  • model
  • directory
  • git
  • context_window
  • usage
  • cost
  • session
  • output_style
  • update

Model Configuration

models.toml is created automatically on first run:

~/.claude/best-claude-hud/models.toml

It controls model display names and context limits. Claude model families are recognized automatically, while third-party models can be customized:

[[models]]
pattern = "kimi-k2.7"
display_name = "Kimi K2.7"
context_limit = 262144

[[models]]
pattern = "glm-5"
display_name = "GLM-5"
context_limit = 200000

[[models]]
pattern = "qwen3-coder"
display_name = "Qwen Coder"
context_limit = 256000

[[context_modifiers]]
pattern = "[1m]"
display_suffix = " 1M"
context_limit = 1000000

Statusline Data

Claude Code sends statusLine data to the command through stdin. best-claude-hud reads:

  • model
  • effort.level, shown as a separate item when the current model supports reasoning effort
  • workspace.project_dir for the stable Claude Code launch directory
  • workspace.current_dir as a fallback for older Claude Code versions
  • transcript_path
  • session_id, used to scope Ultracode detection to the current Claude Code process
  • context_window
  • cost
  • output_style
  • rate_limits

The effort item follows the model name with an explicit ASCII pipe and a brain icon, for example Kimi K2.7 | 🧠 max. Its label is rendered in bright purple (#B45CFF). The HUD displays low, medium, high, xhigh, max, or ultracode; Nerd Font and Powerline modes use the matching Nerd Font brain glyph.

Claude Code's official statusline payload reports Ultracode as xhigh. To keep ordinary xhigh and Ultracode distinct, the HUD cross-checks successful /effort events from the current Claude Code process only. Events from an earlier process are ignored when a conversation is resumed. An xhigh CLAUDE_CODE_EFFORT_LEVEL override remains compatible with Ultracode, while other active overrides prevent it from being reported. If Claude Code does not provide effort data, unsupported and third-party models keep the existing model-only display. The Claude Code version field is intentionally not shown.

For context window usage, the HUD prefers Claude Code's official context_window fields. The active transcript is used only as a compatibility fallback when those fields are absent, null, or temporarily zero. All-zero usage placeholders written after an interrupted response are ignored, so pressing Esc does not erase the last valid context reading. A genuinely new session with no usage still shows 0% · 0 tokens and never scans older project history.

Git Status Indicators

  • : clean working tree
  • : dirty working tree
  • : conflicts
  • ↑n: commits ahead of upstream
  • ↓n: commits behind upstream

Git commands run with --no-optional-locks, so the HUD does not create unnecessary .git/index.lock contention while you work.

Claude Code Patch Utility

The inherited patcher can patch Claude Code cli.js to reduce context warning noise:

best-claude-hud --patch /path/to/claude-code/cli.js

Example:

best-claude-hud --patch ~/.local/share/fnm/node-versions/v24.4.1/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js

The patcher creates a backup next to the target file before writing.

Platform Support

PlatformNative binary sourceStatus
MacOS arm64Native binary selected automatically by npmSupported
MacOS x64Native binary selected automatically by npmSupported
Linux x64 muslNative binary selected automatically by npmSupported
Windows x64Native binary selected automatically by npmSupported
Linux arm64 / Windows arm64-Planned

Requirements

  • Claude Code with statusLine support
  • Git for branch/status display
  • A terminal with ANSI color support
  • A Nerd Font if you choose Nerd Font or Powerline themes

Development

For maintainers and contributors working from source:

cargo fmt
cargo clippy -- -D warnings
cargo test
cargo build --release
cargo run -- --help
npm --prefix packaging/npm run check
npm --prefix packaging/npm run test

Release

Maintainers must follow the complete, approval-gated checklist in RELEASING.md. It is the source of truth for version updates, local verification, Git tags, GitHub Releases, npm publishing, and local installation upgrades.

Project Resources

Acknowledgements

Third-party attribution is preserved in NOTICE.

License

Licensed under the Apache License 2.0.

常见问题

What is best-claude-hud?

best-claude-hud is an open-source cli tools skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by GaoSSR. Minimal Claude Code statusline HUD powered by Rust. It has 1,352 GitHub stars.

Is best-claude-hud safe to use?

Yes. best-claude-hud passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install best-claude-hud?

Clone the repository with "git clone https://github.com/GaoSSR/best-claude-hud" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is best-claude-hud written in?

best-claude-hud is primarily written in Rust. It is open-source under GaoSSR on GitHub, so you can review or fork the full source.

Are there alternatives to best-claude-hud?

Yes. SkillsLLM lists many other CLI Tools skills you can browse and compare side by side. Open the CLI Tools category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh best-claude-hud against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ui-ux-pro-max-skill

by nextlevelbuilder

12

An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.

119,92012,870Python
CLI 工具ai-skillsantigravity
查看详情

happy

by slopus

Mobile and Web client for Codex and Claude Code, with realtime voice, encryption and fully featured

23,4501,980TypeScript
CLI 工具
查看详情

claudecodeui

by siteboon

Use Claude Code, OpenCode, Cursor CLI, and Codex on mobile and web with CloudCLI (aka Claude Code UI). CloudCLI is a free open source webui/GUI that helps you manage your Claude Code session and projects remotely.

13,3941,866TypeScript
CLI 工具
查看详情

CRS-自建Claude Code镜像,一站式开源中转服务,让 Claude、OpenAI、Gemini、Droid 订阅统一接入,支持拼车共享,更高效分摊成本,原生工具无缝使用。

12,5471,869JavaScript
CLI 工具
查看详情

ccstatusline

by sirmalloc

🚀 Beautiful highly customizable statusline for Claude Code CLI with powerline support, themes, and more.

12,508545TypeScript
CLI 工具
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情
best-claude-hud — Claude Code AI Skill | SkillTip