Installs or uninstalls a live token counter statusline for Claude Code showing real-time input/output/cache token usage in the CLI.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-code-token-saver:setup-statuslineWhen to use
Use when user wants to install, uninstall, or configure the token-saver statusline. Triggers on "setup statusline", "install statusline", "statusline install".
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Manage the claude-code-token-saver statusline in Claude Code's `~/.claude/settings.json`.
Manage the claude-code-token-saver statusline in Claude Code's ~/.claude/settings.json.
ONLY show help if the user's argument literally contains the word "help" (e.g. /setup-statusline help). If no argument or any other argument is given, SKIP this section entirely and proceed to Step 1.
If the user provides "help" as argument, show usage summary and stop:
/setup-statusline — Install or uninstall the live usage monitor
Format:
[RUN🟢] $0.10/$12.23 | [5H🟢] 9% ⏳1h32m | [W🟡] 65% ⏳1d3h | [CTX🟢] 22%
───── last / total 5h window usage weekly (≥60% only) context window
(subscribers only)
Options:
install Register statusline (default)
uninstall Remove and restore previous config
help Show this help
Examples:
/setup-statusline install
/setup-statusline uninstall
Do not modify any settings. Just display the help text and stop.
install (default if no arg) — register the statusline scriptuninstall — remove and restore backup if availableRead ~/.claude/settings.json
Check current statusLine field:
Case A: No statusLine — install directly.
Case B: Already our script — check if path matches current ${CLAUDE_PLUGIN_ROOT}.
If version differs, update path silently, then print "Updated to current version." and stop.
If same version, print "Already installed." and stop.
Check by matching the command path containing claude-code-token-saver/scripts/statusline-logger.sh.
Case C: Different statusLine exists — warn and ask the user:
⚠️ Existing statusline detected:
command: {existing command}
Options:
1. Replace (backup existing to _statusLineBackup)
2. Cancel
Which? (1/2)
Wait for user response. If "1", backup to _statusLineBackup then install. If "2", stop.
Install: set statusLine to:
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/statusline-logger.sh"
}
Verify the script is executable:
chmod +x "${CLAUDE_PLUGIN_ROOT}/scripts/statusline-logger.sh"
Output:
✅ Statusline installed.
It will appear after your next interaction with Claude.
Subscriber format:
[RUN🟢] $0.10/$12.23 | [5H🟢] 9% ⏳1h32m | [W🟡] 65% ⏳1d3h | [CTX🟢] 22%
API key format:
[RUN🟢] $0.10/$12.23 | [CTX🟢] 22%
Fields:
- [RUN] $0.10/$12.23 — **Current user turn cost** / cumulative cost since `claude` started.
The turn cost accumulates across follow-up tool calls so a $1.43 warning
stays visible until you start a new prompt. A new turn is detected when
no API call happens for 60 seconds (tunable via
`CC_UPGRADER_TURN_IDLE_SEC`). Resets when you exit and restart claude.
- [5H] 9% ⏳1h32m — Anthropic 5-hour rate limit usage (subscribers only).
⏳ shows time until the window resets.
- [W] 65% ⏳1d3h — 7-day weekly rate limit. Only shown when ≥60%.
⏳ shows time until the weekly window resets.
- [CTX] 22% — Context window usage. Higher = more tokens per call.
Color thresholds:
| Indicator | 🟢 Normal | 🟡 Warning | 🔴 Critical |
|-----------|-----------|------------|-------------|
| RUN | < $0.30 | ≥ $0.30 | ≥ $1.00 |
| 5H | < 70% | ≥ 70% | ≥ 90% |
| W | (hidden) | ≥ 60% | ≥ 90% |
| CTX | < 35% | ≥ 35% | ≥ 70% |
When 5H reaches 🔴, → /report-limit hint appears.
Other warnings show → /usage-view current for detailed analysis.
To remove: /setup-statusline uninstall
Read ~/.claude/settings.json
Check current statusLine:
Not our script — print "claude-code-token-saver statusline is not installed." and stop.
Our script — remove statusLine field. If _statusLineBackup exists, restore it to statusLine and delete _statusLineBackup.
Output:
✅ Statusline removed.
{If restored: "Previous statusline restored from backup."}
{If no backup: "No previous statusline to restore."}
node -e for JSON manipulation (safe parsing, no jq dependency).statusLine and _statusLineBackup.${CLAUDE_PLUGIN_ROOT} to stay portable.npx claudepluginhub ww-w-ai/claude-code-token-saverInstalls and configures claude-2x-statusline for Claude Code. Prompts for Minimal, Standard, or Full tier with peak status, model info, rate limits, tokens, cost, timeline, and git; updates settings.json and fetches schedule.
Guides creation and debugging of the Claude Code status line: a customizable shell-script-driven bar showing token usage, model, cost, git context, and more. Use when configuring statusLine in settings.json or writing status scripts.
Interactive wizard sets up Claude Code's custom status line with progress bars, token counts, git branch, model name, and session info. Cross-platform for Mac/Linux/Windows via bash/PowerShell scripts.