usage-statusline
/usage-statusline
Set up or restyle the claude-usage status line - Claude subscription usage and spend in the Claude Code footer. Applies a named style directly, or guides the user through setup when the request is open-ended. Use when asked to show usage/spend/limits in the status line or footer, to change how it looks (bar, gauge, dot, colors, thresholds, format), to set warning or critical levels, when the footer shows nothing or looks stale, or after switching accounts. Triggers - show my usage in the statusline, add spend to my footer, make it a bar, change the warning threshold, usage statusline, /usage.
- Author
- frank-bee ↗
- Repository
- claude-usage ↗
- Licence
- MIT
- Last repository change
- 14.09.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 14.09.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Set up or restyle the claude-usage status line - Claude subscription usage and spend in the Claude Code footer. Applies a named style directly, or guides the user through setup when the request is open-ended. Use when asked to show usage/spend/limits in the status line or footer, to change how it looks (bar, gauge, dot, colors, thresholds, format), to set warning or critical levels, when the footer shows nothing or looks stale, or after switching accounts. Triggers - show my usage in the statusline, add spend to my footer, make it a bar, change the warning threshold, usage statusline, /usage.
Original author description
Set up or restyle the claude-usage status line - Claude subscription usage and spend in the Claude Code footer. Applies a named style directly, or guides the user through setup when the request is open-ended. Use when asked to show usage/spend/limits in the status line or footer, to change how it looks (bar, gauge, dot, colors, thresholds, format), to set warning or critical levels, when the footer shows nothing or looks stale, or after switching accounts. Triggers - show my usage in the statusline, add spend to my footer, make it a bar, change the warning threshold, usage statusline, /usage.
How it works
- Install the shim first, and address everything through it
- Which mode you are in
- Guided setup
- Restyling
- Troubleshooting
- Do not
SKILL.md preview
---
name: usage-statusline
description: Set up or restyle the claude-usage status line - Claude subscription usage and spend in the Claude Code footer. Applies a named style directly, or guides the user through setup when the request is open-ended. Use when asked to show usage/spend/limits in the status line or footer, to change how it looks (bar, gauge, dot, colors, thresholds, format), to set warning or critical levels, when the footer shows nothing or looks stale, or after switching accounts. Triggers - show my usage in the statusline, add spend to my footer, make it a bar, change the warning threshold, usage statusline, /usage.
---
# usage-statusline
## Install the shim first, and address everything through it
The plugin's own directory is version-pinned and moves on every update, so nothing outside the
plugin may point at it directly. `scripts/shim.sh` resolves the current install at call time; copy
it once to a fixed path and use that path everywhere after:
```bash
P=$(jq -r '.plugins["claude-usage@claude-usage"][0].installPath' ~/.claude/plugins/installed_plugins.json)
install -m 755 "$P/scripts/shim.sh" ~/.claude/claude-usage
```
From here on everything goes through that one path - `line`, `detect`, `json`, `fetch`, plus
`statusline` and `wrap` for the two `settings.json` shapes below. Use `$P` for this copy step and
nothing else: never write it into `settings.json` or into the user's own scripts, or the next
plugin update breaks them. Never copy `usage.sh`, `statusline.sh` or `wrap.sh` out of the plugin
either - a copy stops receiving updates. Only the shim is copied, because it holds no logic.
## Which mode you are in
**The user named a style or a setting** — "make it a bar", "warn me at 60", "no colours", "wider
bar", "ASCII only". Just do it: merge the key into `~/.claude/claude-usage.json` (table under
*Restyling*), re-run `claude-usage line`, show the new output. One or two lines back, no questions, no
wizard. This is the common case; do not turn it into an interview.
**The request is open-ended** — "set up usage in my status line", "show my spend in the footer",
or the footer is broken and they do not know why. Then walk the steps below.
Either way: never make them edit JSON by hand, and always show the resulting line.
---
## Guided setup
### Step 1 — look before touching anything
```bash
bash "$HOME/.claude/claude-usage" detect # their plan and what it meters
jq -r '.statusLine.command // "none"' ~/.claude/settings.json # what they already have
```
Tell them in one line what their account meters — a credit pool on an Enterprise seat, 5h/weekly
windows on Pro or Max. This is what the segment will show, and it differs per plan, so say it
before they choose anything.
### Step 2 — show them the segment before installing
```bash
bash "$HOME/.claude/claude-usage" line
```
Paste the actual output. Do not describe it in the abstract.
### Step 3 — ask how it should fit in
**If they already have a status line, extend it — do not replace it, and do not touch
`settings.json` at all.** This is the common case and the best outcome: their file keeps whatever
it already does, they decide where the segment sits in the line, and no plugin update can break
the wiring. Read their script, find where it assembles the output, and add one line:
```bash
usage_part=$(bash "$HOME/.claude/claude-usage" line 2>/dev/null)
```
then place `$usage_part` where they want it. Show them the diff before writing.
**If their status line is a program they cannot edit** (a third-party tool, a binary), wrap it
instead. This does rewrite `settings.json`, so prefer the option above whenever their script is
editable. Their command runs unchanged with the same stdin and the segment is appended to its last
line, so a multi-line status line keeps its shape:
```json
"statusLine": { "type": "command", "command": "bash \"$HOME/.claude/claude-usage\" wrap '<their existing command>'" }
```
A third argument changes the ` | ` separator.
**If they have no status line at all**, offer the bundled one — branch, model, context bar, usage:
```json
"statusLine": { "type": "command", "command": "bash \"$HOME/.claude/claude-usage\" statusline" }
```
### Step 4 — apply, then prove it works
Back up `~/.claude/settings.json` first. After writing, render it without waiting for the footer:
```bash
echo '{"model":{"display_name":"Claude Opus 5"},"context_window":{"used_percentage":34},"cwd":"'$HOME'"}' \
| bash -c "$(jq -r '.statusLine.command' ~/.claude/settings.json)"
```
Show them that line. If it is wrong, fix it now rather than leaving them to discover it.
## Restyling
Reached either from the guided flow (offer it at the end) or directly when the user names a style.
Merge into `~/.claude/claude-usage.json` — never overwrite it — and **show the new output** by
re-running `usage.sh line`.
| They say | You write |
|---|---|
| make it a bar | `{"style": "bar"}` |
| ASCII only / no unicode | `{"style": "bar-ascii"}` |
| just colour, no icon | `{"style": "plain"}` |
| warn at 60, red at 80 | `{"warn": 60, "crit": 80}` |
| no colours | `{"color": "never"}` |
| wider bar | `{"width": 20}` |
| just the percentage | `{"window": "{name} {pct}", "spend": "{pct}"}` |
Full key list: `style` (`dot`/`bar`/`bar-ascii`/`plain`), `warn`, `crit`, `color`
(`auto`/`always`/`never`), `width`, `separator`, `window`, `spend`. Tokens are `{gauge}` `{name}`
`{pct}` `{reset}` for windows and `{gauge}` `{used}` `{limit}` `{pct}` for spend. Severity drives
glyph *and* colour, so it still reads with colour off.
## Troubleshooting
Run `claude-usage detect` first — it prints the plan and everything the API reports.
| Symptom | Cause |
|---|---|
| No usage segment | The account reports no window and has no credits enabled. Normal; confirm with `detect`. |
| No output at all | No credentials. Check `jq -r '.claudeAiOauth.accessToken' ~/.claude/.credentials.json`. |
| `⚠︎3h` marker | Cache is hours old, usually an expired token. Re-login. |
| Stopped after a plugin update | Something points into the version-pinned plugin directory instead of `~/.claude/claude-usage`. Repoint it at the shim. |
## Do not
Do not reintroduce a spend estimate derived from token counts. It cannot tell plan-covered usage
from credit-billed usage, so it disagrees with the real bill. These figures are Anthropic's own
accounting.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · frank-bee/claude-usage | 95 | MIT |
| freema/ai-skills | 95 | MIT |
Database snapshot: 13.11.2026 · package version edc4f1184eab (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100context-window-statusline
This skill should be used when the user asks to "set up a status line", "configure the footer", "show context window usage", "add a statusline", "visualize context window", "customize the Claude Code footer", or wants to display token counts, cost, or session metrics in the… - 100statusline
Configure a custom status line in the CLI. Use when the user mentions status line, statusline, statusLine, CLI status bar, prompt footer customization, or wants to add session context above the prompt. - 90statusline
Explain how to show the AWS context in Claude Code's status line (for terminals, headless runs, or sessions where the prompt-footer labels are unavailable), and set it up on request. Use when the user asks for an AWS status line, or says the aws-ui footer label does not appear. - 100claude-statusline
Guide for creating and configuring the Claude Code status line. Use when building a custom status bar, configuring statusLine in settings.json, scripting token/model/git readouts, or debugging status-line output. - 100claude-code-statusline-development
This skill should be used when the user asks to "create a statusline", "customize the status line", "add a custom prompt", or mentions Claude Code statusline. Also suggest when the user wants to display git branch, context usage, model name, or session costs at the bottom of Claude Code. - 95ops-statusline
OPS on-demand: This skill should be used when the user asks to \"statusline theme\", \"cockpit\", or…