Loading...
Loading...
Customize Claude Code statusline. Use when: user says 'statusline', 'status line', 'customize statusline', 'modify statusline', 'statusline settings', 'statusline theme', 'change theme', 'color scheme', wants to add/remove/change segments (cost, git, model, context), switch color themes (catppuccin, dracula, nord), or asks what can be shown in the statusline.
npx skill4agent add sd0xdev/sd0x-dev-flow statusline-config~/.claude/statusline-command.sh| Scenario | Use Instead |
|---|---|
| Setting statusline for the first time (no customization needed) | Built-in |
Editing | Manual edit — this skill manages |
| Debugging Claude Code startup issues | |
| Segment | JSON Field | Default | Notes |
|---|---|---|---|
| Directory | | ON | Truncate deep paths: |
| Git branch | shell | ON | |
| Model | | ON | - |
| Context % | | ON | Green >40%, Yellow 20-40%, Red <=20% |
| Cost | | ON | Show when >= $0.005, |
| >200k alert | | ON | Show only when |
| Theme | Type | Default | Notes |
|---|---|---|---|
| ANSI 16 | ✅ | Safe fallback, works everywhere |
| TrueColor | — | Recommended — pastel, WCAG AA >=4.5:1 |
| TrueColor | — | Vibrant purple/pink accents |
| TrueColor | — | Arctic blue, muted tones |
| — | — | No colors ( |
export CLAUDE_STATUSLINE_THEME=catppuccin-mocha| Token | Role | Example |
|---|---|---|
| Directory path | blue / sapphire |
| Git branch name | magenta / mauve |
| Model display name | cyan / teal |
| Context >= 41% | green |
| Context 21-40% | yellow |
| Context <= 20% | red |
| Cost display | muted text |
| >200k token warning | orange/peach + bold |
| Pipe separator | dim/overlay |
| Secondary info | subtext |
| General text | foreground |
| Reset all formatting | |
ansi-defaultcatppuccincatppuccin-mochacat ~/.claude/statusline-command.sh~/.claude/statusline-command.shecho '{"model":{"display_name":"Opus 4.6"},"workspace":{"current_dir":"/tmp/test"},"context_window":{"remaining_percentage":55},"cost":{"total_cost_usd":0.42},"exceeds_200k_tokens":false}' | ~/.claude/statusline-command.sh#!/bin/shinput=$(cat)jq -r '.field // fallback'theme="${CLAUDE_STATUSLINE_THEME:-ansi-default}"[ -n "${NO_COLOR:-}" ] && theme="none"catppuccincatppuccin-mochaansi-defaultprintf "%b"printf "%s"\033[38;2;R;G;Bmgit --no-optional-locks -C "$dir"/tmp/claude-statusline-git-cache-$(id -u)stat -f %mstat -c %Y~/.../basename>= 0.005est $X.XXC_ALERT\033[1mC_CTX_BAD#!/bin/sh
input=$(cat)
# ... extract JSON fields ...
theme="${CLAUDE_STATUSLINE_THEME:-ansi-default}"
[ -n "${NO_COLOR:-}" ] && theme="none"
case "$theme" in
catppuccin|catppuccin-mocha) # set C_* tokens with TrueColor values ;;
dracula) # ... ;;
nord) # ... ;;
none) # all C_* = "" ;;
*) # ansi-default: ANSI 16 colors ;;
esac
# ... build output using C_* tokens ...
if [ "$theme" = "none" ]; then
printf "%s" "$out"
else
printf "%b" "$out"
fi~/.../my-project | feat/auth | Opus 4.6 | ctx 48% left · est $0.12
~/.../my-project | main | Opus 4.6 | ctx 18% left · est $1.23 · >200k| Artifact | Path | Description |
|---|---|---|
| StatusLine script | | POSIX shell script consuming JSON stdin |
~/.claude/statusline-command.shchmod +xecho '{"model":{"display_name":"Opus 4.6"},"workspace":{"current_dir":"/tmp/test"},"context_window":{"remaining_percentage":55},"cost":{"total_cost_usd":0.42},"exceeds_200k_tokens":false}' | ~/.claude/statusline-command.shNO_COLOR=1