Skills claude-code-statusline
Install and configure a custom Claude Code status line showing real-time token usage, context window percentage, git branch, and color-coded warnings. Use when the user asks to "install statusline", "setup statusline", "configure statusline", "setup status line", "install status bar", "show token usage", "context window display", "statusline colors", "statusline thresholds", or wants to customize their Claude Code status bar display.
git clone https://github.com/openclaw/skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/ajitsingh25/claude-code-statusline" ~/.claude/skills/openclaw-skills-claude-code-statusline && rm -rf "$T"
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/ajitsingh25/claude-code-statusline" ~/.openclaw/skills/openclaw-skills-claude-code-statusline && rm -rf "$T"
skills/ajitsingh25/claude-code-statusline/SKILL.mdClaude Code Status Line
Install a security-hardened status line for Claude Code CLI that displays:
user@host:dir (branch) | Model | In:8.5K Out:1.2K Cache:7K [23%]
Prerequisites
- Python 3 (standard library only, no pip dependencies)
(optional, for branch display)git
Script
scripts/statusline_installer.py -- Python 3, standard library only.
# Install with defaults python3 scripts/statusline_installer.py install # Install with custom thresholds python3 scripts/statusline_installer.py install --threshold-yellow 30 --threshold-orange 50 --threshold-red 70 # Install with combined token display python3 scripts/statusline_installer.py install --token-display combined # Check installation python3 scripts/statusline_installer.py status # Update config python3 scripts/statusline_installer.py configure --threshold-red 80 --color-green cyan # Remove python3 scripts/statusline_installer.py uninstall [--remove-config]
How It Works
-
install -- Copies
tostatusline.py
, creates config at~/.claude/scripts/
(perms 600), updates~/.claude/statusline.config
with~/.claude/settings.local.json
command.python3 ~/.claude/scripts/statusline.py -
status -- JSON output: script installed, config state, settings configured, git availability.
-
configure -- Update thresholds (
), colors (--threshold-yellow/orange/red
), display mode (--color-green/yellow/orange/red
). Validates threshold ordering.--token-display separate|combined -
uninstall -- Removes script, reverts settings.
also deletes config file.--remove-config
Configuration
Config file:
~/.claude/statusline.config
| Option | Default | Values |
|---|---|---|
| | (In/Out/Cache), (total) |
| | 0-100 |
| | 0-100 |
| | 0-100 |
| standard ANSI | Color name or ANSI code |
Available colors: green, yellow, orange, red, blue, cyan, magenta, purple, white, pink, bright-green, bright-yellow, bright-red, bright-blue, bright-cyan, bright-magenta.
After Install
Restart Claude Code (
exit then claude) to activate.