← 返回 Skills 市场
Claude Statusline
作者
mark-HeartFlow
· GitHub ↗
· v1.0.0
· MIT-0
54
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install claude-statusline-skill
功能描述
Claude Code 状态栏 - 显示Git分支、模型、Context用量、输出Token、花费、时长、代码改动行数 功能:实时显示Claude Code会话状态
使用说明 (SKILL.md)
Claude Code 状态栏
显示 Claude Code 会话的状态信息。
功能
- Git分支显示
- 当前使用模型
- Context用量
- 输出Token数量
- 会话时长
- 代码改动行数
安装
第一步:配置 settings.json
在 ~/.claude/settings.json 中添加:
{
"statusLine": {
"type": "command",
"command": "bash ~/.claude/statusline-command.sh"
}
}
第二步:创建脚本
将以下脚本保存到 ~/.claude/statusline-command.sh:
#!/bin/bash
# Claude Code Status Line Script
get_git_branch() {
if command -v git >/dev/null 2>&1 && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
git_branch=$(git branch --show-current 2>/dev/null | tr -d '\
')
[ -z "$git_branch" ] && git_branch=$(git symbolic-ref --short HEAD 2>/dev/null | tr -d '\
')
fi
[ -z "$git_branch" ] && git_branch="no-git"
}
get_model() {
model_name=$(grep -o '"model": *"[^"]*"' ~/.claude/settings.json 2>/dev/null | cut -d'"' -f4 | tr -d '\
')
[ -z "$model_name" ] && model_name="unknown"
}
get_changed_lines() {
if command -v git >/dev/null 2>&1 && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
changed=$(git diff --stat 2>/dev/null | tail -1 | awk '{print $1"+"$4}' | tr -d '\
')
[ -z "$changed" ] || [ "$changed" = "+" ] && changed="0+0"
changed_lines="$changed"
else
changed_lines="no-git"
fi
}
main() {
get_git_branch
get_model
get_changed_lines
echo "${git_branch} | ${model_name} | N/A | N/A | N/A | N/A | ${changed_lines}"
}
main
第三步:添加执行权限
chmod +x ~/.claude/statusline-command.sh
效果
重新启动 Claude Code 后,状态栏将显示:
git_branch | model_name | N/A | N/A | N/A | N/A | 10+5
前提条件
- 需要
jq(用于解析 JSON):brew install jq - 需要在 Git 仓库中(否则显示 no-git)
自定义
可根据需要修改脚本,例如:
- 添加 Context 用量检测
- 添加 Token 统计
- 添加花费计算
- 添加会话时长
MIT License
安全使用建议
Review the statusLine configuration and the referenced script before installing. Install only if you are comfortable with Claude Code automatically running that local command during status-line rendering, and prefer a version that documents exactly what files and commands it touches.
能力评估
Purpose & Capability
The described capability fits a Claude Code status-line helper, and the supplied scanner evidence says the bundled script appears simple and mostly read-only.
Instruction Scope
The skill reportedly instructs users to configure Claude Code to run a local shell command whenever the status line renders, but does not clearly explain that this creates recurring automatic code execution in the user's environment.
Install Mechanism
The install/configuration path appears to persist a statusLine command in Claude Code configuration, which is more sensitive than a one-time manual command because it can run automatically after setup.
Credentials
Local shell access is proportionate for a status-line integration only if the script scope is narrow and inspectable; the missing warning makes that boundary less clear to users.
Persistence & Privilege
The status-line hook is a persistent execution point. No supplied evidence shows credential theft, exfiltration, or destructive behavior, and VirusTotal telemetry was clean, but the automatic execution path is under-disclosed.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install claude-statusline-skill - 安装完成后,直接呼叫该 Skill 的名称或使用
/claude-statusline-skill触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
claude-statusline-skill 1.0.0
- Initial release.
- Adds a status line for Claude Code sessions displaying Git branch, model, context usage, output tokens, cost, duration, and code changed lines.
- Provides setup instructions and an example Bash script for integration.
- Supports customization through user script modification.
元数据
常见问题
Claude Statusline 是什么?
Claude Code 状态栏 - 显示Git分支、模型、Context用量、输出Token、花费、时长、代码改动行数 功能:实时显示Claude Code会话状态. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 54 次。
如何安装 Claude Statusline?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install claude-statusline-skill」即可一键安装,无需额外配置。
Claude Statusline 是免费的吗?
是的,Claude Statusline 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Claude Statusline 支持哪些平台?
Claude Statusline 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Claude Statusline?
由 mark-HeartFlow(@mark-heartflow)开发并维护,当前版本 v1.0.0。
推荐 Skills