Statusline setup
Skill bugITwhisperer/Claude-Code-CLI-statusline/skills/statusline-setup
Guided setup for the claude-code-cli-statusline. Use when the user wants to install, configure, customize, or re-tune the statusline — interviews for preferences, writes the config, wires it into settings.json, and verifies it renders.From its SKILL.md
npx -y skills add bugITwhisperer/Claude-Code-CLI-statusline --skill statusline-setupAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.5 KB, as published. Nobody here has run it
/statusline-setup
Configure the claude-code-cli-statusline for this user: interview them for their
preferences, write a config file, copy the render script to a stable location,
wire it into their Claude Code settings.json, and verify it renders. After
setup the statusline runs independently of this plugin, so the plugin can be
uninstalled if they like.
Work through the phases in order. Each phase states what it needs and produces.
Phase 0 — Detect the environment
Inputs: none. Outputs: confirmed prerequisites + the target settings.json path.
- Confirm
bashandpythonare available (python --version; if missing, trypython3). The render script parses JSON with python — if neither exists, stop and tell the user to install Python 3, then resume. - Locate the target
settings.json:- If
$CLAUDE_CONFIG_DIRis set, use$CLAUDE_CONFIG_DIR/settings.json. - Otherwise use
~/.claude/settings.json.
- If
- Read the existing settings.json (if any) and note whether a
statusLineblock is already configured — you'll back it up before overwriting.
Phase 1 — Interview the user
Inputs: none. Outputs: the chosen settings, held for Phase 2.
Ask with AskUserQuestion. Keep it to a few focused questions; offer sensible
defaults so the user can accept everything quickly.
- Identity label — the
user@hostprompt on line 1. Offer: keep the auto default (login name + hostname), a custom value, or hide it. - Account badge — optional
[label]on line 2 for tagging a profile (e.g.work,personal). Default: none. - Segments to show — a multi-select over: git status, model, time, cost, token gauge, compression warning, rate limits. Default: all on.
- Colors — offer "keep the default scheme" or customize specific segments (map their
choices to
STATUSLINE_COLOR_*ANSI codes; seestatusline.conf.examplefor the keys). - Compression thresholds — offer the auto-scaling default (85% / 70% of the context window) or explicit token counts.
Phase 2 — Write the config and copy the script
Inputs: the Phase 1 choices. Outputs: ~/.claude-statusline/statusline.conf and a
stable copy of the render script.
- Create
~/.claude-statusline/if it does not exist. - Write
~/.claude-statusline/statusline.conffrom the chosen settings — only the keys the user changed from default (a minimal file is easier to read later). Use theKEY=valueformat documented instatusline.conf.example. - Copy the render script out of the plugin to a stable path so it survives plugin removal:
cp "${CLAUDE_PLUGIN_ROOT}/scripts/statusline-script.sh" "$HOME/.claude-statusline/statusline-script.sh" chmod +x "$HOME/.claude-statusline/statusline-script.sh"
Phase 3 — Wire it into settings.json
Inputs: the settings.json path from Phase 0. Outputs: an updated settings.json.
- Back up first: copy the existing
settings.jsontosettings.json.bak(if it exists). - Set the
statusLineblock, pointing at the copied-out script (NOT the plugin copy — the plugin path disappears on uninstall). Use a bash-invoked forward-slash path:
Substitute"statusLine": { "type": "command", "command": "bash <HOME>/.claude-statusline/statusline-script.sh" }<HOME>with the user's home in the formbashexpects (on Windows/git-bash use/c/Users/<name>/...; on Linux/macOS$HOMEexpands fine — you may write the literal absolute path). Merge into existing settings.json without dropping other keys.
Phase 4 — Verify and offer uninstall
Inputs: the wired settings.json. Outputs: a rendered preview + next-steps note.
- Render a preview by piping a representative statusline JSON through the copied script, e.g.:
Show the output and confirm the segments/colors match what they chose. If not, go back to Phase 1 and adjust the config.printf '%s' '{"workspace":{"current_dir":"'"$PWD"'"},"context_window":{"used_percentage":42,"total_input_tokens":85000,"context_window_size":200000},"model":{"id":"claude-opus-4-8"},"cost":{"total_cost_usd":1.2},"rate_limits":{"five_hour":{"used_percentage":12,"resets_at":1752000000}}}' \ | bash "$HOME/.claude-statusline/statusline-script.sh" - Tell the user setup is complete and the statusline now runs independently. They can:
- Keep the plugin installed to re-run
/statusline-setuplater or receive updates, or - Uninstall it (
/plugin uninstall) for a clean setup — the statusline keeps working because it references the copied-out script, not the plugin.
- Keep the plugin installed to re-run
- Note that the new statusline appears the next time Claude Code renders it (usually the next prompt / session).
Rules
- Never
sourcea user's config or run untrusted lines — the render script already parses the.confsafely; you only write it. - Always back up an existing
settings.jsonbefore modifying it. - Point
settings.jsonat the copied-out script (~/.claude-statusline/…), never at${CLAUDE_PLUGIN_ROOT}/…(that path vanishes on uninstall, and${CLAUDE_PLUGIN_ROOT}is not reliably expanded inside the user's settings.json). - Write only the config keys the user changed; leave the rest on their built-in defaults.