/all-skills:claude-statuslinefrom all-skills
Guide for creating and configuring the Claude Code status line. Covers custom shell scripts, settings.json configuration, and debugging output.
Ships in all-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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.
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.
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 commandpadding (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./statusline slash commandClaude 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.
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.
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).
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.sh" } }
Renders e.g. [Opus] 📁 my-project | 42% ctx | 🌿 main.
echo/print line becomes a separate row (multi-line supported).\033[32m green, \033[33m yellow, \033[31m red, \033[0m reset.FORCE_HYPERLINK=1 for terminals that aren't auto-detected.PCT=$(jq -r '.context_window.used_percentage // 0' <<<"$input" | cut -d. -f1)
if [ "$PCT" -lt 70 ]; then COLOR="\033[32m" # green
elif [ "$PCT" -lt 90 ]; then COLOR="\033[33m" # yellow
else COLOR="\033[31m"; fi # red
printf "${COLOR}%d%% ctx\033[0m\n" "$PCT"
refreshInterval to keep time-based data live.Expensive operations (git branch lookups, network calls, file reads) should be cached because the script runs on every update.
session_id — stable per session. Do not use $$ / pid; those change on every invocation./tmp or $XDG_CACHE_HOME with the session id in the filename.SID=$(jq -r '.session_id' <<<"$input")
CACHE="/tmp/statusline-${SID}.branch"
if [ ! -f "$CACHE" ] || [ $(($(date +%s) - $(stat -f %m "$CACHE" 2>/dev/null || stat -c %Y "$CACHE"))) -gt 30 ]; then
git -C "$DIR" branch --show-current 2>/dev/null > "$CACHE"
fi
BRANCH=$(cat "$CACHE" 2>/dev/null)
A parallel subagentStatusLine setting customizes the row rendered inside the subagent panel. Input adds a tasks array with {id, name, tokenCount, ...}. Output expects NDJSON — one JSON object per line:
{"id":"task-abc","content":"analyzing schema..."}
{"id":"task-def","content":"✓ done"}
Use this to project per-subagent progress into the UI.
Pipe canned JSON to the script:
echo '{
"model": {"display_name": "Opus"},
"workspace": {"current_dir": "/tmp/x"},
"context_window": {"used_percentage": 42},
"session_id": "test"
}' | ~/.claude/statusline.sh
Iterate until the output looks right, then trigger an assistant message in Claude Code to see it rendered.
used_percentage is null before the first API call — always // 0 or similar fallback.total_input_tokens is cumulative across the session and can exceed the window size. Never divide it by context_window_size for a percentage — use used_percentage.rate_limits is Pro/Max only and absent before the first API response.git ... 2>/dev/null.session_name, workspace.git_worktree, vim, agent, worktree, rate_limits. Default them with // "fallback" in jq.powershell -NoProfile -File %USERPROFILE%\.claude\statusline.ps1.disableAllHooks: true also disables the status line.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub vinnie357/claude-skills --plugin all-skills108 skills in this plugin
/accessibilityGuide for implementing web accessibility (WCAG). Use when designing UI components, reviewing interfaces for accessibility, or ensuring compliance with W3C WAI standards./actTest GitHub Actions locally using act. Use when debugging workflows locally, testing workflow changes before pushing, or troubleshooting action failures./actionsCreate and configure GitHub Actions. Use when building custom actions, setting up runners, implementing security practices, or publishing to the marketplace./agent-loopGeneric epic-to-PR agent workflow (codename Forge) with 4-phase execution, a 6-tier hierarchy, and paired-team fan-out. Use when coordinating any feature delivery, working an issue or epic ("work epic <id>", "work issue <id>", "use Forge on the next bees ready item", "forge <id>"), picking up an epic in a fresh session (decomposing path) or with pre-existing issues (dispatching path), implementing a multi-step task that benefits from plan→test→implement→review phases, asking clarifying questions before decomposing, forming a team and assigning models per tier, or orchestrating multi-agent workflows. Loads on casual feature requests too — not only when the word "epic" appears./agent-substrate-overviewReference for the alpha agent-substrate/substrate project as an alternative ultra-scale control plane that shares snapshot and runtime primitives with kubernetes-sigs/agent-sandbox. Use when comparing agent-sandbox vs Substrate, evaluating the WorkerPool + ActorTemplate multiplexing model, reviewing the kubectl-ate CLI, or deciding which control plane fits a workload that needs millions of sub-second agent tool calls./alliumAllium behavioral specs integrated with /core:agent-loop. Use when attaching a formal spec to an epic, propagating tests from a spec before TDD, or weed-checking spec/code divergence after CI passes.2 plugins in one repository ship this exact skill · first indexed Aug 22, 2026
Other plugins' skills for the same job