npx skills add ...
npx skills add zenmux/skills --skill zenmux-statusline
Install and configure a Claude Code status line that displays real-time ZenMux account information: subscription tier, 5-hour and 7-day quota usage with color-coded progress bars, and PAYG wallet balance, alongside standard session info (model, git, context usage, prompt cache). Trigger on: "status line", "statusline", "set up status bar", "show ZenMux in status bar", "install ZenMux statusline", "configure status line with ZenMux", "状态栏", "配置状态栏", "安装状态栏", "在状态栏显示ZenMux信息". Activate when user wants to SET UP, INSTALL, CONFIGURE, or CUSTOMIZE a Claude Code status line that includes ZenMux account data. Do NOT trigger for querying usage interactively (use zenmux-usage), docs (use zenmux-context), or general setup (use zenmux-setup).
npx skills add zenmux/skills --skill zenmux-statusline
You are installing a Claude Code status line that displays real-time ZenMux account information alongside standard session data.
The status line script is bundled at scripts/zenmux-statusline.sh relative to this skill. It produces a two-line display:
If ZENMUX_MANAGEMENT_KEY is not set, Line 2 shows a setup hint instead:
Follow these steps in order.
curl and jq are availableIf either is missing, tell the user to install it (brew install jq on macOS, or the appropriate package manager).
If the output is set — proceed to Step 2.
If empty — inform the user:
The status line needs
ZENMUX_MANAGEMENT_KEYto fetch account data. Create one at https://zenmux.ai/platform/management, then add to your shell profile:Without the key, the status line will still show session info (model, git, context remaining) and display a setup hint on Line 2.
The user can proceed without the key — the script degrades gracefully and shows a hint on how to configure it.
Determine the absolute path to the bundled script. It lives next to this SKILL.md:
Copy it to the Claude Code config directory:
Where SKILL_SCRIPTS_DIR is the scripts/ directory inside this skill. Use the actual resolved path.
If the user already has a ~/.claude/statusline*.sh file, inform them that it will be replaced and confirm before overwriting.
Read the user's current settings:
Update the statusLine field to point to the new script. Preserve all other settings. The target configuration:
The refreshInterval: 120 re-runs the script every 120 seconds so the ZenMux data refreshes even during idle periods, matching the cache TTL.
Use the Edit tool to update the settings file. Be careful to preserve the existing JSON structure.
Test the script with mock input to confirm it runs without errors:
If output appears (at least one line), the installation is successful.
Tell the user:
Status line installed. It will appear at the bottom of Claude Code on your next interaction.
What it shows:
- Line 1: Model slug, directory, git branch, context used bar, last-call prompt cache read/write
- Line 2: ZenMux plan tier, API key type + masked key, 5-hour and 7-day quota usage with color-coded bars, PAYG wallet balance
Colors:
- Context used: Green (<70%), yellow (70–89%), red (90%+)
- Quota usage: Green (<70%), yellow (70–89%), red (90%+)
Caching: ZenMux API data is cached for 120 seconds to keep the status line fast. Git data is cached for 5 seconds.
To remove it later, delete the
statusLinefield from~/.claude/settings.json.
~/.claude/settings.json without showing the user what will change.