闲社服务运行正常AI智能体自动化平台
c

状态行配置

技能标识: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 when the user asks to "install statusline", "setup statusline", "configure statusline", "setup status line", "install status bar", "show token usage", "context window display", "statusline colors", "statusline thresholds", or wants to customize their Claude Code status bar display.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

状态行配置

Claude Code 状态栏

为 Claude Code CLI 安装一个安全加固的状态栏,显示内容如下:

user@host:dir (branch) | Model | In:8.5K Out:1.2K Cache:7K [23%]

前置条件

  • - Python 3(仅使用标准库,无需 pip 依赖)
  • git(可选,用于显示分支信息)

脚本

scripts/statusline_installer.py -- Python 3,仅使用标准库。

bash

使用默认设置安装


python3 scripts/statusline_installer.py install

使用自定义阈值安装

python3 scripts/statusline_installer.py install --threshold-yellow 30 --threshold-orange 50 --threshold-red 70

使用合并令牌显示模式安装

python3 scripts/statusline_installer.py install --token-display combined

检查安装状态

python3 scripts/statusline_installer.py status

更新配置

python3 scripts/statusline_installer.py configure --threshold-red 80 --color-green cyan

卸载

python3 scripts/statusline_installer.py uninstall [--remove-config]

工作原理

  1. 1. install -- 将 statusline.py 复制到 ~/.claude/scripts/,在 ~/.claude/statusline.config 创建配置文件(权限 600),使用 python3 ~/.claude/scripts/statusline.py 命令更新 ~/.claude/settings.local.json。
  1. 2. status -- JSON 格式输出:脚本安装状态、配置状态、设置配置情况、git 可用性。
  1. 3. configure -- 更新阈值(--threshold-yellow/orange/red)、颜色(--color-green/yellow/orange/red)、显示模式(--token-display separate|combined)。验证阈值顺序。
  1. 4. uninstall -- 移除脚本,恢复设置。--remove-config 同时删除配置文件。

配置

配置文件:~/.claude/statusline.config

选项默认值可选值
TOKENDISPLAYseparateseparate(输入/输出/缓存分开显示),combined(显示总计)
THRESHOLDYELLOW
40 | 0-100 |
| THRESHOLD_ORANGE | 50 | 0-100 |
| THRESHOLD_RED | 70 | 0-100 |
| COLOR_* | 标准 ANSI 颜色 | 颜色名称或 ANSI 代码 |

可用颜色:green, yellow, orange, red, blue, cyan, magenta, purple, white, pink, bright-green, bright-yellow, bright-red, bright-blue, bright-cyan, bright-magenta。

安装后

重启 Claude Code(输入 exit 然后 claude)以激活。

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 claude-code-statusline-1776106355 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 claude-code-statusline-1776106355 技能

通过命令行安装

skillhub install claude-code-statusline-1776106355

下载

⬇ 下载 claude-code-statusline v1.0.0(免费)

文件大小: 17.18 KB | 发布时间: 2026-4-14 11:07

v1.0.0 最新 2026-4-14 11:07
claude-code-statusline v1.0.0

- Initial release of a custom status line installer for Claude Code CLI.
- Displays real-time token usage, context window percentage, git branch, and color-coded warnings.
- Simple Python 3 script with no external dependencies.
- Interactive options to install, check status, configure thresholds/colors, and uninstall.
- Fully customizable through a security-hardened config file.
- Includes support for combined or separate token display and multiple color options.
返回顶部