Claude Code Statusline
/install claude-code-statusline
Claude Code Status Line
Install a security-hardened status line for Claude Code CLI that displays:
user@host:dir (branch) | Model | In:8.5K Out:1.2K Cache:7K [23%]
Prerequisites
- Python 3 (standard library only, no pip dependencies)
git(optional, for branch display)
Script
scripts/statusline_installer.py -- Python 3, standard library only.
# Install with defaults
python3 scripts/statusline_installer.py install
# Install with custom thresholds
python3 scripts/statusline_installer.py install --threshold-yellow 30 --threshold-orange 50 --threshold-red 70
# Install with combined token display
python3 scripts/statusline_installer.py install --token-display combined
# Check installation
python3 scripts/statusline_installer.py status
# Update config
python3 scripts/statusline_installer.py configure --threshold-red 80 --color-green cyan
# Remove
python3 scripts/statusline_installer.py uninstall [--remove-config]
How It Works
-
install -- Copies
statusline.pyto~/.claude/scripts/, creates config at~/.claude/statusline.config(perms 600), updates~/.claude/settings.local.jsonwithpython3 ~/.claude/scripts/statusline.pycommand. -
status -- JSON output: script installed, config state, settings configured, git availability.
-
configure -- Update thresholds (
--threshold-yellow/orange/red), colors (--color-green/yellow/orange/red), display mode (--token-display separate|combined). Validates threshold ordering. -
uninstall -- Removes script, reverts settings.
--remove-configalso deletes config file.
Configuration
Config file: ~/.claude/statusline.config
| Option | Default | Values |
|---|---|---|
TOKEN_DISPLAY |
separate |
separate (In/Out/Cache), combined (total) |
THRESHOLD_YELLOW |
40 |
0-100 |
THRESHOLD_ORANGE |
50 |
0-100 |
THRESHOLD_RED |
70 |
0-100 |
COLOR_* |
standard ANSI | Color name or ANSI code |
Available colors: green, yellow, orange, red, blue, cyan, magenta, purple, white, pink, bright-green, bright-yellow, bright-red, bright-blue, bright-cyan, bright-magenta.
After Install
Restart Claude Code (exit then claude) to activate.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install claude-code-statusline - 安装完成后,直接呼叫该 Skill 的名称或使用
/claude-code-statusline触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Claude Code Statusline 是什么?
Install and configure a custom Claude Code status line showing real-time token usage, context window percentage, git branch, and color-coded warnings. Use wh... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 175 次。
如何安装 Claude Code Statusline?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install claude-code-statusline」即可一键安装,无需额外配置。
Claude Code Statusline 是免费的吗?
是的,Claude Code Statusline 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Claude Code Statusline 支持哪些平台?
Claude Code Statusline 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Claude Code Statusline?
由 Ajit Singh(@ajitsingh25)开发并维护,当前版本 v1.0.0。