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 wh...

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 68 · 0 current installs · 0 all-time installs
byAjit Singh@ajitsingh25
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the delivered artifacts: a statusline renderer (statusline.py) and an installer (statusline_installer.py). The code only touches ~/.claude, reads JSON from stdin (the expected Claude Code runtime input), optionally calls git for branch info, and writes a local config file. No unrelated credentials, binaries, or remote installs are requested.
Instruction Scope
SKILL.md's runtime instructions align with the installer usage (install/configure/status/uninstall). One small mismatch: SKILL.md says it 'updates ~/.claude/settings.local.json', but the installer updates ~/.claude/settings.json (and cleans settings.local.json). Apart from that documentation mismatch, the instructions do not ask the agent to read or transmit unrelated system data or external endpoints.
Install Mechanism
There is no network download/install in the spec — installation is performed by running the bundled installer script which copies local files into ~/.claude. No package managers or external URLs are used, lowering install risk.
Credentials
The skill requires no environment variables or external credentials. The scripts read USER and use standard os.environ when invoking git (to disable prompts) and operate only under the user's home directory. The workspace path is taken from the JSON input (expected for showing git branch).
Persistence & Privilege
The installer persistently writes files under ~/.claude, creates a config (~/.claude/statusline.config), and injects a statusLine command into ~/.claude/settings.json so the status line runs when Claude Code starts. This is expected for a UI plugin but is a persistent change to application settings.
Assessment
This skill appears to do what it claims: a local status line and installer that writes files under ~/.claude and updates your Claude Code settings.json. Before installing: (1) Inspect the bundled scripts (they're included) if you have any doubt. (2) Back up ~/.claude/settings.json (the installer modifies this file). (3) Note the documentation mismatch: SKILL.md mentions settings.local.json but the installer updates settings.json — expect the latter. (4) The installer and script run entirely locally (no network calls), but they will add persistent entries to your Claude Code config; uninstall removes those entries. If you want extra caution, run the installer in a controlled environment or review/execute the copy steps manually instead of running the install command.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk979v5x4a8kt2hageg4tygv9qh83b203

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

Claude 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)
  • git (optional, for branch display)

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

  1. install -- Copies statusline.py to ~/.claude/scripts/, creates config at ~/.claude/statusline.config (perms 600), updates ~/.claude/settings.local.json with python3 ~/.claude/scripts/statusline.py command.

  2. status -- JSON output: script installed, config state, settings configured, git availability.

  3. configure -- Update thresholds (--threshold-yellow/orange/red), colors (--color-green/yellow/orange/red), display mode (--token-display separate|combined). Validates threshold ordering.

  4. uninstall -- Removes script, reverts settings. --remove-config also deletes config file.

Configuration

Config file: ~/.claude/statusline.config

OptionDefaultValues
TOKEN_DISPLAYseparateseparate (In/Out/Cache), combined (total)
THRESHOLD_YELLOW400-100
THRESHOLD_ORANGE500-100
THRESHOLD_RED700-100
COLOR_*standard ANSIColor 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.

Files

5 total
Select a file
Select a file to preview.

Comments

Loading comments…