by daniel3303
Custom status line for Claude Code showing model, tokens, rate limits, and git info in real-time
# Add to your Claude Code skills
git clone https://github.com/daniel3303/ClaudeCodeStatusLineA custom status line for Claude Code that displays model info, token usage, rate limits, and reset times in a single compact line. It runs as an external shell command, so it does not slow down Claude Code or consume any extra tokens.

| Segment | Description | |---------|-------------| | Model | Current model name (e.g., Opus 4.6) | | CWD@Branch | Current folder name, git branch, and file changes (+/-) | | Tokens | Used / total context window tokens (% used) | | Effort | Reasoning effort level (low, med, high) | | 5h | 5-hour rate limit usage percentage and reset time | | 7d | 7-day rate limit usage percentage and reset time | | Extra | Extra usage credits spent / limit (if enabled) |
Usage percentages are color-coded: green (<50%) → yellow (≥50%) → orange (≥70%) → red (≥90%).
jq — for JSON parsingcurl — for fetching usage data from the Anthropic APIgit in PATH (for branch/diff info)Copy the contents of statusline.sh (or statusline.ps1 on Windows) and paste it into Claude Code with the prompt:
Use this script as my status bar
Claude Code will save the script and configure settings.json for you automatically.
Copy the script to your Claude config directory:
cp statusline.sh ~/.claude/statusline.sh
chmod +x ~/.claude/statusline.sh
Add the status line config to ~/.claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "~/.claude/statusline.sh"
}
}
Restart Claude Code.
Windows users should use
statusline.ps1instead of the bash script.
Copy the script to your Claude config directory:
Copy-Item statusline.ps1 "$env:USERPROFILE\.claude\statusline.ps1"
Add the status line config to %USERPROFILE%\.claude\settings.json:
PowerShell / CMD:
{
"statusLine": {
"type": "command",
"command": "powershell -NoProfile -File \"%USERPROFILE%\\.claude\\statusline.ps1\""
}
}
Git Bash / WSL bash:
{
"statusLine": {
"type": "command",
"command": "powershell -NoProfile -File \"$USERPROFILE\\.claude\\statusline.ps1\""
}
}
Note: Use
%USERPROFILE%in CMD/PowerShell or$USERPROFILEin bash shells. The%VAR%syntax does not expand in bash.
Restart Claude Code.
Usage data from the Anthropic API is cached for 60 seconds at /tmp/claude/statusline-usage-cache.json ...
No comments yet. Be the first to share your thoughts!