Statusline Generator
Installs, configures, customizes, or troubleshoots the Claude Code statusline (cwd...
Install
npx skills add daymade/claude-code-skills --skill statusline-generator -g -a claude-code -y- Repository
- daymade/claude-code-skills1.5k
- Category
- AI and agents
- Updated
- 3d ago
- License
- MIT
- Context cost
- Mediumabout 2,131 tokens
- Runs scripts
- Yes, review before use
What it does
Installs, configures, customizes, or troubleshoots the Claude Code statusline (cwd, model, token counts). Use when the user wants to set up or change the statusline, switch minimal vs full layouts, show absolute token counts instead of a percentage, add cost via ccusage, or fix a statusline that is blank, silent, stuck, or stopped updating. Trigger phrases: 状态栏, 状态栏不显示, 状态栏空白, "statusline blank", "statusline broken".
Statusline Generator
A single-source-of-truth statusline for Claude Code. One script, two layouts, end-to-end self-verification.
Quick health check (start here when something is wrong)
Run this first whenever the statusline misbehaves. It catches the silent failures that account for most "configured but not working" reports:
bash scripts/health_check.sh
It validates four layers:
~/.claude/statusline.shexists and is executable. Missingchmod +xis the single most common silent-failure cause, Claude Code runs the script,execfails, statusline goes blank.~/.claude/settings.jsonhas a validstatusLineblock pointing at the script.- Mock stdin tests covering complete data, zero tokens, missing fields,
$HOMEpath shortening, and zero-fork git-branch rendering (via a synthetic.git/HEAD, no git binary required). - Real stdin replay from
/tmp/.claude-statusline-last-stdin.jsonif you previously ran withCLAUDE_STATUSLINE_DEBUG=1.
Each failure prints a one-line fix command, you don't have to read documentation to recover.
Quick install
bash scripts/install_statusline.sh
This script:
- Backs up any existing
~/.claude/statusline.shandsettings.json. - Copies
generate_statusline.shto~/.claude/statusline.shandchmod +xs it. - Updates
settings.jsonstatusLineblock viajq(preserves other settings). - Mandatorily runs
health_check.shand shows the result, installation is not "complete" until verification passes.
Restart Claude Code (or send any new message) to see the statusline update.
What you get
Default, minimal one-line layout
~/code/myproject [main] Opus 4.7 (1M context) ctx: 108K / 1M

