statusline

statusline is a command for coding agents from zereraz/tokensight. It costs 11 tokens per session (789 once invoked), scanned B, original, MIT.

A command that adds tokensight to the Claude status line, the information display shown during a session, and can combine it with an existing claude-hud display.

In plain words
What is it for?
Use it to configure a tokensight-only status line or combine tokensight with claude-hud in ~/.claude/settings.json.
Why use it?
It puts Z.ai GLM Coding Plan token and monthly quota information where it can be seen during work without replacing other status information.

Command

Part of the tokensight plugin — 3 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/zereraz/tokensight/statusline
Clone the repo
git clone --depth 1 https://github.com/zereraz/tokensight

Or install tokensight, the plugin that ships this one along with the rest of its 3 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for statusline

README.md
[![agentmods](https://agentmods.dev/badge/commands/zereraz/tokensight/statusline.svg)](https://agentmods.dev/commands/zereraz/tokensight/statusline)
Your own site
<a href="https://agentmods.dev/commands/zereraz/tokensight/statusline"><img src="https://agentmods.dev/badge/commands/zereraz/tokensight/statusline.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 789 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00011 $0.00789
Opus 5 $0.00005 $0.00394
Sonnet 5 $0.00002 $0.00158
Haiku 4.5 $0.00001 $0.00079

Measured 5d ago against content hash 4197cdf94112, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade B, and why

statusline scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

cat ~/.claude/settings.json | grep -A3 "statusLine"
commands/statusline.md · 88 lines

How it starts

The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Enable the tokensight statusLine by detecting and integrating with any existing statusLine setup.

Step 1: Check current statusLine configuration

First, read ~/.claude/settings.json to see if a statusLine is already configured:

cat ~/.claude/settings.json | grep -A3 "statusLine"

Step 2: Determine the setup

If claude-hud is already installed (statusLine contains "claude-hud"):

Create a combined command that runs both renderers:

{
  "statusLine": {
    "type": "command",
    "command": "bash -c 'node \"$(ls -td ~/.claude/plugins/cache/claude-hud/claude-hud/*/dist/index.js 2>/dev/null | head -1)\"; TOKENSIGHT=\"$(ls -td ~/.claude/plugins/cache/tokensight/tokensight/*/dist/statusline.js 2>/dev/null | head -1)\"; [ -n \"$TOKENSIGHT\" ] && node \"$TOKENSIGHT\" || true'"
  }
}

This will display:

  • Lines 1-4: claude-hud (context, tools, agents, todos)
  • Line 5: tokensight (token quota + monthly quota on single line)

If no statusLine exists:

Install tokensight-only:

{
  "statusLine": {
    "type": "command",
    "command": "bash -c 'node \"$(ls -td ~/.claude/plugins/cache/tokensight/tokensight/*/dist/statusline.js 2>/dev/null | head -1)\"'"
  }
}

If another statusLine exists:

Ask the user if they want to:

  1. Replace it with tokensight
  2. Keep their existing statusLine
  3. Manually combine both (show them how)

Step 3: Update settings.json

Use the Edit tool to update ~/.claude/settings.json. Preserve all other fields, only update the statusLine section.

How the statusLine works

The statusLine:

  1. Runs periodically (every few seconds)
  2. Reads your auth token from ~/.tokensight.json
  3. Fetches current quota from Z.ai API
  4. Displays compact, color-coded output:
    • [Z.ai] ███████░░ 45% 110M left ↺ 1h 30m
    • Colors: green (<70%), yellow (70-90%), red (>90%)

The statusLine appears immediately - no restart needed.

Step 4: Verify With User

After successful setup, check if we should ask about starring:

Read the full file on GitHub · 88 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 88 lines · 11 tokens per session scan B 4197cdf94112

Subscribe to this mod's changes

statusline is a command published in the GitHub repository zereraz/tokensight (11 stars, last pushed 8mo ago), licensed MIT. It adds 11 tokens to every session and 789 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.