一键导入
usage-bar
Install or check the Claude Code usage status bar (rate limits 5h/7d, session context, reset countdown). Also use to change the display language.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Install or check the Claude Code usage status bar (rate limits 5h/7d, session context, reset countdown). Also use to change the display language.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | usage-bar |
| description | Install or check the Claude Code usage status bar (rate limits 5h/7d, session context, reset countdown). Also use to change the display language. |
| user-invocable | true |
| allowed-tools | Bash(python3 *), Bash(bash *), Bash(chmod *), Bash(cp *), Bash(mkdir *), Bash(grep *), Bash(cat *) |
Manage the persistent status bar that shows Claude Code usage limits.
!`test -f ~/.claude/statusline-usage.sh && echo "INSTALLED" || echo "NOT_INSTALLED"`
!`test -f ~/.claude/usage-bar.conf && cat ~/.claude/usage-bar.conf || echo "NO_CONFIG"`
Copy the script from the skill directory and update settings.json:
!`
cp "${CLAUDE_SKILL_DIR}/statusline-usage.sh" ~/.claude/statusline-usage.sh
chmod +x ~/.claude/statusline-usage.sh
`
!`python3 -c "
import json, os
p = os.path.expanduser('~/.claude/settings.json')
try: cfg = json.load(open(p))
except: cfg = {}
cfg['statusLine'] = {'type': 'command', 'command': '~/.claude/statusline-usage.sh'}
with open(p, 'w') as f: json.dump(cfg, f, indent=2); f.write('\n')
print('settings.json updated.')
"`
Write the default config file:
!`cat > ~/.claude/usage-bar.conf << 'EOF'
# claude-usage-bar — configuration
# Available languages: en (English), it (Italian)
# Override per-session: USAGE_BAR_LANG=it claude
#
LANG=en
EOF
echo "Config written."`
Tell the user installation is complete and they need to restart Claude Code to see the bar.
Run a live preview with simulated data:
!`bash ~/.claude/statusline-usage.sh <<'EOF'
{"context_window":{"used_percentage":42},"rate_limits":{"five_hour":{"used_percentage":28.0,"resets_at":1800},"seven_day":{"used_percentage":85.0,"resets_at":345600}}}
EOF`
Also show the current language setting from the config file.
Ask which language they want, then update ~/.claude/usage-bar.conf:
!`sed -i 's/^LANG=.*/LANG=it/' ~/.claude/usage-bar.conf && echo "Language set to: it"`
Replace it with the desired language code. No restart needed — the change takes effect on the next response.
Explain to the user what each field means:
| Code | Language |
|---|---|
en | English |
it | Italiano |
To add a new language, open statusline-usage.sh and add a new entry to the T dictionary in the Python section.