groove-admin-claude-statusline
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesegroove-admin-claude-statusline
groove-admin-claude-statusline
Install a rich single-line Claude Code statusline. Writes three scripts to and merges config into .
~/.claude/hooks/~/.claude/settings.jsonUse to remove. Use to show current status.
--uninstall--list安装功能丰富的单行Claude Code状态行。会将三个脚本写入,并将配置合并到中。
~/.claude/hooks/~/.claude/settings.json使用参数进行卸载,使用参数查看当前状态。
--uninstall--listOutcome
安装结果
~/.claude/settings.jsonstatusLine/loop~/.claude/settings.jsonstatusLine/loopWhat the statusline shows
状态行显示内容
claude-sonnet-4-6 | myrepo@main (+3 -1) | 42k/200k (21%) | effort: high | 5h 12% @8:00pm | 7d 3% @mar 16, 9:00am | 2 loops | check deployment @4:10pm| Section | Description |
|---|---|
| Model | Display name of the active model |
| Repo@branch | CWD folder name, git branch, staged diff |
| Tokens | Used / total context, % used |
| Effort | Current effort level (low / med / high) |
| 5h / 7d | Rate-limit utilisation with reset time (cached 60s) |
| Loops | Count of active |
claude-sonnet-4-6 | myrepo@main (+3 -1) | 42k/200k (21%) | effort: high | 5h 12% @8:00pm | 7d 3% @mar 16, 9:00am | 2 loops | check deployment @4:10pm| 区域 | 描述 |
|---|---|
| Model | 显示当前活跃模型的名称 |
| Repo@branch | 当前工作目录名称、Git分支、暂存区差异 |
| Tokens | 已使用token/总上下文token,使用百分比 |
| Effort | 当前工作强度(低/中/高) |
| 5h / 7d | 速率限制使用率及重置时间(缓存60秒) |
| Loops | 活跃 |
Steps
操作步骤
--list
--list--list
参数
--listRead . Report whether is set, and whether each hook script exists in . Exit.
~/.claude/settings.jsonstatusLine~/.claude/hooks/读取,报告是否已配置,以及每个钩子脚本是否存在于中,然后退出。
~/.claude/settings.jsonstatusLine~/.claude/hooks/--uninstall
--uninstall--uninstall
参数
--uninstallRemove from . Remove the three / hook entries added by this skill. Do not remove hook scripts (leave for manual cleanup). Report changes. Exit.
statusLine~/.claude/settings.jsonCronCreate|CronDeleteSessionEnd从中移除配置,移除该工具添加的三个/钩子条目。不删除钩子脚本(留待手动清理)。报告变更后退出。
~/.claude/settings.jsonstatusLineCronCreate|CronDeleteSessionEndDefault (install)
默认操作(安装)
-
Createif absent.
~/.claude/hooks/ -
Write the three scripts below to. Never overwrite without showing a diff and confirming.
~/.claude/hooks/ -
Make all three scripts executable ().
chmod +x -
Read(default
~/.claude/settings.json). Merge in the{}entry and the two hook entries below. Preserve all other keys. Do not create duplicate entries.statusLine -
Write.
~/.claude/settings.json -
Report:
✓ statusline.sh → ~/.claude/hooks/statusline.sh ✓ cron-state.sh → ~/.claude/hooks/cron-state.sh ✓ cron-state-clear.sh → ~/.claude/hooks/cron-state-clear.sh ✓ ~/.claude/settings.json updated Note: restart Claude Code for changes to take effect.
-
如果目录不存在则创建。
~/.claude/hooks/ -
将下方三个脚本写入。若目标文件已存在,必须先显示差异并获得确认后才能覆盖。
~/.claude/hooks/ -
为三个脚本添加可执行权限()。
chmod +x -
读取(默认内容为
~/.claude/settings.json),将{}条目和下方两个钩子条目合并到现有配置中。保留所有原有配置项,不创建重复条目。statusLine -
将合并后的配置写入。
~/.claude/settings.json -
输出报告:
✓ statusline.sh → ~/.claude/hooks/statusline.sh
✓ cron-state.sh → ~/.claude/hooks/cron-state.sh
✓ cron-state-clear.sh → ~/.claude/hooks/cron-state-clear.sh
✓ ~/.claude/settings.json 已更新
注意:请重启Claude Code以使更改生效。Scripts
脚本说明
The three shell scripts live in per the Agent Skills specification:
scripts/| Script | Installed to | Purpose |
|---|---|---|
| | Main statusline renderer |
| | Tracks |
| | Clears loop state on session end |
Copy each script from to . Never overwrite an existing script without showing a diff and confirming.
scripts/~/.claude/hooks/根据Agent Skills 规范,这三个Shell脚本位于目录下:
scripts/| 脚本 | 安装路径 | 用途 |
|---|---|---|
| | 状态行主渲染脚本 |
| | 在 |
| | 在会话结束时清除任务循环状态 |
将每个脚本从复制到。若目标脚本已存在,必须先显示差异并获得确认后才能覆盖。
scripts/~/.claude/hooks/~/.claude/settings.json
entries
~/.claude/settings.json~/.claude/settings.json
配置条目
~/.claude/settings.jsonMerge these into the existing settings. Preserve all other keys. Do not create duplicates.
json
{
"statusLine": {
"type": "command",
"command": "~/.claude/hooks/statusline.sh"
},
"hooks": {
"PostToolUse": [
{
"matcher": "CronCreate|CronDelete",
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/cron-state.sh",
"async": true
}
]
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/cron-state-clear.sh",
"async": true
}
]
}
]
}
}将以下条目合并到现有配置中,保留所有原有配置项,不创建重复条目。
json
{
"statusLine": {
"type": "command",
"command": "~/.claude/hooks/statusline.sh"
},
"hooks": {
"PostToolUse": [
{
"matcher": "CronCreate|CronDelete",
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/cron-state.sh",
"async": true
}
]
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/cron-state-clear.sh",
"async": true
}
]
}
]
}
}Constraints
约束条件
- Write to (user-global), not
~/.claude/hooks/(project-local).claude/ - Never overwrite an existing script without showing a diff and confirming
- Never discard existing keys in
~/.claude/settings.json - Requires: ,
jq,curl,python3(all standard on macOS/Linux)git - The 5h/7d usage section requires a Claude Pro/Max OAuth session; it silently omits if no token is found
- After install: restart Claude Code for the statusLine and hooks to take effect
- 写入到(用户全局目录),而非
~/.claude/hooks/(项目本地目录).claude/ - 若目标脚本已存在,必须先显示差异并获得确认后才能覆盖
- 不得丢弃中的任何原有配置项
~/.claude/settings.json - 依赖:、
jq、curl、python3(这些在macOS/Linux中均为标准工具)git - 5小时/7天使用量统计功能需要Claude Pro/Max OAuth会话;如果未找到token,该部分会自动隐藏
- 安装完成后:请重启Claude Code以使状态行和钩子生效