Status Line Generator
Generate a custom Claude Code status line script with your choice of columns and a color theme. Installs directly to
.
How It Works
Claude Code supports custom status lines via a shell script configured in
. The script receives session JSON on stdin (model, context window, workspace, vim, worktree, etc.) and prints formatted text to stdout.
This skill generates a bash script tailored to your preferences and installs it automatically.
Script Directory
Important: All scripts are located in the
subdirectory of this skill.
Agent Execution Instructions:
- Determine this SKILL.md file's directory path as
- Script path =
${SKILL_DIR}/scripts/<script-name>.mjs
- Replace all in this document with the actual path
Script Reference:
| Script | Purpose |
|---|
| Generate and install status line script from chosen options |
Prerequisites
- jq — required by the generated status line script to parse JSON input from Claude Code
- Bun — required to run the generator. Use if not installed globally.
Usage
bash
# Preview generated script
npx -y bun ${SKILL_DIR}/scripts/generate.mjs --elements model,context,effort,git,dir --theme gruvbox
# Generate and install
npx -y bun ${SKILL_DIR}/scripts/generate.mjs --elements model,context,effort,git,dir --theme dracula --install
Options
| Flag | Default | Description |
|---|
| model,context,cost,effort,style,git,dir
| Comma-separated columns to display |
| | Color theme — see table below |
| () for iconic themes, none otherwise | Override the effort prefix icon. Presets: , , , , , . A raw character is also accepted. |
| off | Write script to ~/.claude/scripts/statusline.sh
and update |
Columns
| Column | Description | Data source |
|---|
| Active model name (e.g. "Opus 4.7") | |
| Progress bar + percentage — color changes with remaining capacity | context_window.remaining_percentage
|
| Session API spend formatted as in gold — hidden when rounds to | from input JSON |
| Reasoning effort level — color changes with level | in ~/.claude/settings.local.json
→ |
| Output style name (e.g. Explanatory, Learning) — hidden when "default" | from input JSON |
| Git branch name (yellow when dirty) | → git CLI |
| Repo basename (original repo when in a worktree) | worktree.original_repo_dir
→ |
| Bold label (hidden outside a worktree) | → parent-dir basename via git CLI |
| Vim mode indicator (hidden when inactive) | |
Color-changing elements
— bar fill + percentage color scale with remaining capacity:
| Remaining | Color | Meaning |
|---|
| > 50% | green | plenty of context |
| 20–50% | yellow | watch out |
| < 20% | red | nearly full — compact soon |
— value + optional prefix icon color by level:
| Level | Color |
|---|
| , , | bold red |
| yellow |
| , , | green |
| other / unset | dim (or hidden when completely unset) |
Themes
| Theme | Vibe | Icons rendered in bar |
|---|
| Warm retro, muted | model · effort · style · dir · worktree · git · vim |
| Modern dark, high saturation | model · effort · style · dir · worktree · git · vim |
| Classic oh-my-zsh | no prefix icons — colors + labels only |
| Default terminal colors | no prefix icons — plain text |
The
column intentionally skips a prefix icon — the colored progress bar is already visually rich. The
prefix (
) is baked into iconic themes and can be overridden with
.
Effort icons
Pass
to swap the glyph in front of the effort value. Presets:
| Preset | Glyph | Notes |
|---|
| | Electric arrow — default, narrow |
| | Greek koppa — narrow lightning |
| | Classic lightning — wide in emoji-presentation fonts |
| | Therefore |
| | Filled circle |
| (hidden) | Drop the icon entirely |
You can also pass any raw character as
.
Worktree behavior: When inside a git worktree (detected via the input JSON's
fields or via
git rev-parse --git-common-dir
fallback), the
column shows a bold
label using the parent dir name (e.g.
~/.codex/worktrees/46a6/clawmaster
→
). The
column prefers
from the input JSON; the
column prefers
worktree.original_repo_dir
so the repo identity stays stable across worktrees.
Invocation
This skill can be invoked with or without arguments:
- No args (): Interactive prompt via to pick columns and theme.
- With args (
/webup-statusline dracula
): NLP parse for theme and column preferences.
Arg parsing (natural language)
The args string is free-form text. Use NLP to extract:
- theme — match against: gruvbox, robbyrussell, minimal, dracula. Recognize aliases (暗黑=dracula, 极简=minimal, 复古=gruvbox, レトロ=gruvbox).
- elements — look for mentions of: model, context/进度/コンテキスト, effort/推理强度/努力度, git/分支/ブランチ, dir/目录/ディレクトリ, worktree/工作树/ワークツリー, vim.
Unspecified fields use defaults:
model,context,effort,git,dir
columns,
theme.
Workflow
-
If no args provided: Use
to ask 2 questions in a single prompt.
caps each question at 4 options, so
offer curated presets for columns rather than an exhaustive toggle list. If the user picks "Other", interpret their free text as a comma-separated column list (or a natural-language description that maps to one).
Q1 — Column preset (single): Which columns to display? Offer these 3 curated presets —
will auto-append an "Other" option that lets the user type a free-text column list or description.
- "Everything (Recommended)" —
model,context,cost,effort,style,git,dir,worktree
(all columns that have a useful signal today; is excluded because most users don't use vim keybindings)
- "Default" —
model,context,effort,style,git,dir
(balanced — drops cost and worktree; matches the skill's default flag value)
- "Essentials" — (lean; no effort, no style, no cost)
If the user picks the auto-added "Other", treat their free text as a comma-separated column list, or as a natural-language description to map to columns. Fall back to
if parsing is ambiguous.
Q2 — Theme (single): Color theme?
- "Dracula" — modern dark, purple/pink/cyan (Recommended)
- "Gruvbox Dark" — warm retro palette, 24-bit true color
- "Robbyrussell" — classic oh-my-zsh style, no icons
- "Minimal" — no decoration, dim separators only
If args provided: Parse theme and columns from args. Skip the prompt.
-
Map user selections to script flags:
- Column preset → expand to the preset's canonical list:
- →
model,context,cost,effort,style,git,dir,worktree
- →
model,context,effort,style,git,dir
- →
- (auto-added by ) → parse the user's free text; keep only recognized column names (
model,context,cost,effort,style,dir,worktree,git,vim
). If parsing is ambiguous, fall back to .
- Theme → value (one of , , , )
-
bash
npx -y bun ${SKILL_DIR}/scripts/generate.mjs --elements <list> --theme <theme> --install
-
Tell user to restart Claude Code to see the new status line.
Output Examples
Dracula (all columns), remaining=49%, cost=$0.42, effort=high, output style=Explanatory, inside a worktree:
◈ Opus 4.7 | [■■■■■■■■■■□□□□□□□□□□] 51% | $0.42 | ↯ high | ❋ Explanatory | ⌂ clawmaster | ⊕ worktree:46a6 | ⎇ feat/xyz
(bar yellow — 49% remaining;
gold session spend next to the bar; effort "high" bold red; purple
sits between effort and dir; context carries no prefix icon — the bar is already visual enough)
Gruvbox Dark (model + context + effort + dir + git), remaining=88%, effort=medium:
✦ Opus 4.7 | [■■□□□□□□□□□□□□□□□□□□] 12% | ↯ medium | ⌂ skills-cc | ⎇ main
(bar green — 88% remaining; effort "medium" yellow)
Minimal (model + effort + dir + git), effort=low:
Claude Opus 4.7 · low · skills-cc · main
(no prefix icons in minimal; effort "low" green)
Notes
- Generated script is saved to
~/.claude/scripts/statusline.sh
- Running the skill again overwrites the existing script — just re-run to change theme or columns
- The script uses to parse JSON input — make sure it's installed
- Git dirty detection uses to avoid interfering with other git operations