Command Palette

Search for a command to run...

Назад к скиллам
скилл № 51658

claude-statusline

Guide for creating and configuring the Claude Code status line. Use when building a custom status bar, configuring statusLine in settings.json, scripting…

БесплатноЗапускает вложенные скрипты
vinnie357от vinnie357★ 30 звёзд на GitHub

Установить claude-statusline в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Claude Code Status Line

Guide for designing, configuring, and debugging the Claude Code status line — a customizable bar rendered at the bottom of the UI that runs a user-supplied shell script on each session update.

Per core:anti-fabrication: test status-line scripts against the real stdin payload (see Testing Locally) before claiming a field renders — never assert output you have not observed.

What Is the Status Line?

The status line is a shell command that Claude Code executes locally on each session update. Claude Code pipes a JSON payload (model, workspace, context-window, cost, etc.) to the script's stdin and renders the script's stdout verbatim as the bar at the bottom of the UI. It runs on the user's machine, consumes no API tokens, and is temporarily hidden during autocomplete, help menus, and permission prompts.

The status line is gated by the same workspace-trust acceptance as hooks. Setting disableAllHooks: true in settings also disables the status line.

Configuration

Add a statusLine block to ~/.claude/settings.json (user) or .claude/settings.json (project):

{
  "statusLine": {
    "type": "command",
    "command": "~/.claude/statusline.sh",
    "padding": 2,
    "refreshInterval": 5
  }
}

Fields:

  • type — must be "command"
  • command — path to a script, or an inline shell command
  • padding (optional) — extra horizontal spacing in characters (default 0)
  • refreshInterval (optional, seconds, min 1) — re-runs on a fixed timer in addition to event-driven updates; set this when displaying time-based data or when state changes during idle (e.g. subagent progress). Omit for event-only updates.

The /statusline slash command

Claude Code ships a built-in /statusline <description> command that generates a script and updates settings for you (e.g. /statusline show model name and context percentage with a progress bar). Use /statusline delete to remove the configuration.

Prebuilt status-line tools

Writing a script gives full control with zero dependencies. For a turnkey bar without scripting, community tools render the same stdin payload. The most widely used is ccstatusline (sirmalloc/ccstatusline, MIT) — a Node CLI with an interactive config TUI, powerline themes, gradients, Nerd-Font icons, and widgets for token speed, git PR status, block timers, and more. It needs no install and wires itself into settings.json:

{ "statusLine": { "type": "command", "command": "npx -y ccstatusline@latest" } }

It requires Node/Bun on PATH and runs npx on each update (slower cold-start than a local script). The rest of this skill covers the hand-rolled path, which stays the right choice when you want no runtime dependency, deterministic latency, or behavior the tool does not expose.

Stdin JSON Payload

Every invocation receives a JSON object on stdin containing session metadata. Key top-level fields:

Need Field path
Model label model.display_name (human) or model.id (stable)
Current folder workspace.current_dir (basename for display)
Project root workspace.project_dir
Context % context_window.used_percentage (null-guard with // 0)
Cumulative tokens context_window.total_input_tokens, .total_output_tokens
Cost USD cost.total_cost_usd
Wall time ms cost.total_duration_ms
Lines changed cost.total_lines_added, .total_lines_removed
Cache key session_id
Transcript file transcript_path
Rate limits rate_limits.five_hour.used_percentage (Pro/Max only)
Output style output_style.name
Vim mode vim.mode (absent when vim off)
Worktree worktree.* / workspace.git_worktree

See references/input-schema.md for the full JSON schema, nullable fields, and per-field semantics.

Note on context_window.used_percentage: pre-calculated by Claude Code as (input + cache_creation + cache_read) / context_window_size — output tokens are not included. Use this field rather than computing from current_usage or total_input_tokens (which is cumulative and can exceed the window size).

Default Example

The default script shipped in assets/statusline-default.sh surfaces model, folder, context %, and git branch:

#!/usr/bin/env bash
input=$(cat)
MODEL=$(jq -r '.model.display_name // "Claude"' <<<"$input")
DIR=$(jq -r '.workspace.current_dir // .cwd' <<<"$input")
PCT=$(jq -r '.context_window.used_percentage // 0' <<<"$input" | cut -d. -f1)

BRANCH=""
if git -C "$DIR" rev-parse --git-dir >/dev/null 2>&1; then
  B=$(git -C "$DIR" branch --show-current 2>/dev/null)
  [ -n "$B" ] && BRANCH=" | 🌿 $B"
fi

echo "[$MODEL] 📁 ${DIR##*/} | ${PCT}% ctx${BRANCH}"

Install it:

cp assets/statusline-default.sh ~/.claude/statusline.sh
chmod +x ~/.claude/statusline.sh

Then add to ~/.claude/settings.json:

{ "statusLine": { "type": "command", "command": "~/.claude/statusline.s
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • assets/statusline-default.sh
  • references/input-schema.md

FAQ

Что делает скилл claude-statusline?

Guide for creating and configuring the Claude Code status line. Use when building a custom status bar, configuring statusLine in settings.json, scripting token/model/git readouts, or debugging status-line output.

Как установить скилл claude-statusline?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл claude-statusline запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить claude-statusline с