statusline-workflow

v2026.09.24

Use when configuring, previewing, troubleshooting, or disabling the Claude Code statusline plugin.

GitHub
安装命令
npx skhub add duyet/statusline-workflow
Markdown
SKILL.md

Statusline

Use this skill to help configure and troubleshoot the statusline plugin.

Workflow

  1. Inspect the existing statusline config and scripts before changing settings.
  2. For setup, choose layout, visible sections, context display style, icon theme, and separator.
  3. Update the user's Claude settings only when requested or clearly part of setup.
  4. Preview the generated statusline command with representative session input.
  5. For troubleshooting, check provider detection, rate-limit fields, and empty-section hiding.

Applying a Template

When the user selects a template (via /statusline:setup or /statusline:config), apply it by:

  1. Read the template JSON from scripts/templates/<name>.json within this plugin directory.
  2. Write the template contents to ~/.claude/statusline.config.json.
  3. Preview the result with the test command.

Template apply example (for "minimal" template):

# Find the plugin directory
PLUGIN_DIR="$(find ~/.claude -path '*/statusline/scripts/templates' -type d 2>/dev/null | head -1)"

# If not found via plugin install, check the source repo
if [ -z "$PLUGIN_DIR" ]; then
  PLUGIN_DIR="$HOME/project/claude-plugins/statusline/scripts/templates"
fi

# Copy template to config
cp "$PLUGIN_DIR/minimal.json" ~/.claude/statusline.config.json

Or use the Write tool to copy the template contents directly:

// ~/.claude/statusline.config.json — written from minimal.json template
{
  "line_format": "1",
  "separator": "dot",
  "context_style": "compact",
  "icon_style": "minimal",
  "show_context": true,
  "show_rate_limits": true,
  "show_git_branch": true,
  "show_tools": false,
  "show_agents": false,
  "show_cache": false,
  "show_session": false,
  "show_reasoning": true,
  "color_style": "colorful"
}

All Template Contents (inline for reference)

detailed.json (default):

{"line_format":"3","separator":"arrow","context_style":"progress_bar","icon_style":"emoji","show_context":true,"show_rate_limits":true,"show_git_branch":true,"show_tools":true,"show_agents":true,"show_cache":true,"show_session":true,"show_reasoning":true,"color_style":"colorful"}

balanced.json:

{"line_format":"2","separator":"arrow","context_style":"tokens","icon_style":"unicode","show_context":true,"show_rate_limits":true,"show_git_branch":true,"show_tools":true,"show_agents":true,"show_cache":true,"show_session":true,"show_reasoning":true,"color_style":"colorful"}

minimal.json:

{"line_format":"1","separator":"dot","context_style":"compact","icon_style":"minimal","show_context":true,"show_rate_limits":true,"show_git_branch":true,"show_tools":false,"show_agents":false,"show_cache":false,"show_session":false,"show_reasoning":true,"color_style":"colorful"}

monitor.json:

{"line_format":"2","separator":"pipe","context_style":"progress_bar","icon_style":"emoji","show_context":true,"show_rate_limits":true,"show_git_branch":true,"show_tools":false,"show_agents":false,"show_cache":true,"show_session":true,"show_reasoning":true,"color_style":"colorful"}

developer.json:

{"line_format":"2","separator":"arrow","context_style":"tokens","icon_style":"unicode","show_context":true,"show_rate_limits":true,"show_git_branch":true,"show_tools":true,"show_agents":true,"show_cache":true,"show_session":true,"show_reasoning":true,"color_style":"colorful"}

performance.json:

{"line_format":"3","separator":"arrow","context_style":"progress_bar","icon_style":"emoji","show_context":true,"show_rate_limits":true,"show_git_branch":true,"show_tools":false,"show_agents":false,"show_cache":true,"show_session":true,"show_reasoning":true,"color_style":"colorful"}

Dual-Provider Support

The statusline automatically adapts to two model providers:

FeatureAnthropic Claudez.ai GLM
Model nameopus-4.8[200k]glm-5.1[1m]
Rate limits5h/7d from JSON payloadMay be empty (n/a)
Cache stats✅ Real prompt caching data❌ Hidden (proxy artifacts)
Context windowFrom JSON payloadFrom JSON payload
Effort levellow/medium/high/maxlow/medium/high/max
Session durationFile-based trackerFile-based tracker
Tools/agentsProcess detectionProcess detection

Configuration

Config file: ~/.claude/statusline.config.json

Config Fields

FieldValuesDefaultDescription
line_format"1", "2", "3""3"Number of output lines
separator"arrow", "pipe", "dot", "slash""arrow"Section separator character
context_style"progress_bar", "tokens", "compact""progress_bar"How context usage is displayed
icon_style"emoji", "unicode", "minimal""emoji"Icon theme for section labels
show_cachetrue/falsetrueCache hit rate + live TTL countdown (Anthropic only, hidden for GLM)
cache_ttl"5m", "1h""5m"Prompt-cache TTL window used for the countdown / expired marker
show_costtrue/falsetrueTotal session cost in USD (from Claude Code payload)
show_sessiontrue/falsetrueSession duration tracker
show_reasoningtrue/falsetrueEffort level next to model name
show_contexttrue/falsetrueToken count and percentage
show_rate_limitstrue/falsetrueAPI usage metrics
show_git_branchtrue/falsetrueCurrent git branch
show_toolstrue/falsetrueRunning MCP servers
show_agentstrue/falsetrueRunning agent count

Template Presets

Located in scripts/templates/:

TemplateLinesIconContextBest For
detailed3emojiprogress_barFull visibility (default)
balanced2unicodetokensQuick overview
minimal1nonecompactMaximum space efficiency
monitor2emojiprogress_barRate-limit tracking
developer2unicodetokensTools + agents + git
performance3emojiprogress_barCache + context optimization

Files

  • Commands live in commands/.
  • Hook configuration lives in hooks/hooks.json.
  • Runtime scripts live in scripts/.
  • Templates live in scripts/templates/.
  • Main renderer: scripts/statusline.py.
  • Live script: ~/.claude/statusline-command.sh.
发现
标签

此技能尚未发布标签。

版本
最新版本元数据

版本

v2026.09.24

发布时间

2026年9月24日

分类

未分类

许可证

未指定

源路径

statusline/skills/statusline-workflow

默认分支

master

最新提交

fd02325

Tree SHA

257906b