Statusline Generator
Install, customize, and self-verify the Claude Code statusline — path, git branch, model, absolute token counts, and optional cost.
UtilitiesBeginner★ 1,323⑂ 212AI score 9/10Last updated: Aug 8, 2026
What it does
Gives you a single-source-of-truth statusline script for Claude Code, plus an installer and a health check that proves it actually works.
- One-command install:
install_statusline.shbacks up any existing~/.claude/statusline.shandsettings.json, copies the script,chmod +xs it, and patches only thestatusLineblock withjq. - Two layouts: minimal one-liner by default (
~/code/myproject [main] Opus 4.7 ctx: 108K / 1M); setCLAUDE_STATUSLINE_LAYOUT=fullfor a 3-line version with user, ccusage session/daily cost, color-coded context percentage, and git dirty markers. - Four-layer health check: executable bit, settings.json wiring, mock stdin tests (zero tokens, missing fields,
$HOMEshortening, zero-fork git branch), and replay of real captured stdin — each failure prints a one-line fix. - Performance discipline: reads
.git/HEADas a plain file instead of forkinggit, and bansbunx/npx @latestinstatusLine.command; ~0.01s per refresh vs ~0.4s for package-runner statuslines. - Debuggability:
CLAUDE_STATUSLINE_DEBUG=1dumps the stdin JSON Claude Code passes to/tmp/.claude-statusline-last-stdin.json.
Who it's for
- Anyone whose statusline is blank, stuck, or says "permission denied" after an edit
- Users who want absolute token counts instead of a percentage
- Users who want session cost (ccusage) or git branch in the bar
- Heavy multi-session users worried about CPU churn and battery drain
Examples
- First-time setup: ask "configure my statusline" → installer runs, health check passes, restart Claude Code and see path, branch, model, tokens.
- Blank statusline rescue: "status line not showing" → the health check pinpoints the missing
chmod +xand prints the exact fix command. - Add cost tracking: "show session cost in the statusline" → add
CLAUDE_STATUSLINE_LAYOUT=fullto your shell rc and verify ccusage integration.
· · · Install guide · · ·
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the daymade-claude-code/statusline-generator folder from the GitHub repo daymade/claude-code-skills into my ~/.claude/skills/statusline-generator/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/daymade/claude-code-skills.git /tmp/ccs && cp -r /tmp/ccs/daymade-claude-code/statusline-generator ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal and make sure the skills folder exists:
mkdir -p ~/.claude/skills - Clone the repo:
git clone https://github.com/daymade/claude-code-skills.git /tmp/ccs - Copy just this skill:
cp -r /tmp/ccs/daymade-claude-code/statusline-generator ~/.claude/skills/ - Install helpers (recommended): macOS
brew install jq; Debian/Ubuntusudo apt install jq - Restart Claude Code and say "configure statusline" — the skill triggers automatically.
- To do it manually, cd into the skill folder and run
bash scripts/install_statusline.sh, then confirm every health check line passes. - For cost and git segments, add
export CLAUDE_STATUSLINE_LAYOUT=fullto~/.zshrcor~/.bashrcand restart your shell. - If anything breaks later, run
bash scripts/health_check.shand follow the printed fix command.
View source on GitHub ↗License: MIT