用途:帮助配置与排查 Claude Code 的 statusline 插件。改动设置前先检查现有状态栏配置与脚本;设置时选择布局、可见区块、上下文显示样式、图标主题与分隔符;仅在用户要求或明确属于设置流程时更新 Claude 设置;用代表性会话输入预览生成的命令;排查时检查提供商检测、速率限制字段与空区块隐藏。
应用模板:用户通过 /statusline:setup 或 /statusline:config 选择模板后,从插件目录 scripts/templates/<name>.json 读取模板 JSON,写入 ~/.claude/statusline.config.json,再用测试命令预览。示例:PLUGIN_DIR="$(find ~/.claude -path '*/statusline/scripts/templates' -type d 2>/dev/null | head -1)",若未找到则检查源仓库,然后 cp "$PLUGIN_DIR/minimal.json" ~/.claude/statusline.config.json。
模板预设:detailed(3 行、emoji、progress_bar,默认)、balanced(2 行、unicode、tokens)、minimal(1 行、minimal、compact)、monitor(2 行、emoji、progress_bar)、developer(2 行、unicode、tokens)、performance(3 行、emoji、progress_bar)。
配置字段:line_format("1"/"2"/"3",默认"3")、separator(arrow/pipe/dot/slash,默认 arrow)、context_style(progress_bar/tokens/compact)、icon_style(emoji/unicode/minimal)、show_cache、show_session、show_reasoning、show_context、show_rate_limits、show_git_branch、show_tools、show_agents(均为 true/false,默认 true)。
双提供商:自动适配 Anthropic Claude 与 z.ai GLM;GLM 的速率限制可能为空(n/a),缓存统计隐藏(代理产物),上下文窗口与努力级别来自 JSON 载荷。
文件:命令在 commands/,钩子配置在 hooks/hooks.json,运行时脚本在 scripts/,模板在 scripts/templates/,主渲染器 scripts/statusline.py,实时脚本 ~/.claude/statusline-command.sh。