How to customize the Claude Code status line
The status line is the row at the bottom of Claude Code. You can fill it with your own shell script, or install a mod that adds the model, git branch, cost, context usage or a timer for you.
Updated
The fast way: /statusline
Describe what you want and Claude Code writes the script and the setting for you:
/statusline show model name and context percentage with a progress bar
It saves a script in ~/.claude/ and points your settings at it. To get rid of it, run /statusline clear.
By hand: a script in settings.json
Add a statusLine entry to ~/.claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "~/.claude/statusline.sh"
}
}
Claude Code runs the script and sends it the session as JSON on stdin: the model, the working directory, context window usage, cost and more. Whatever the script prints shows up in the status line. It runs on your machine and costs no tokens.
You don't need a separate file for something small. This jq one-liner works as the command:
jq -r '"[\(.model.display_name)] \(.context_window.used_percentage // 0)% context"'
Anthropic's status line docs list every field you get.
With a status line mod
A script prints text each time Claude Code asks for it. A mod runs inside Claude Code, so it can count tool calls, read each request's token usage, and update its entry the moment something changes. One mod can also bring a pane or a slash command along with its status line entry.
A few people write their own and share them. These have the most stars on GitHub:
- jev-auto-mode 0.1.0 A permission layer driven by a JSON policy: allow, ask or deny every tool call (Bash, edits, web, MCP, subagents, skills), every slash command or skill you type, and every skill preloaded into a subagent. Rules decide first (deny > ask > allow, compound Bash commands split); what no rule covers c... 32.6k
- secrets-veil 0.0.6 Masks secret values in tool results before the model reads them: named vendor variables, value-shape patterns, and high-entropy tokens. No reveal path. 292
- cache-clock 0.1.1 A prompt-cache line under your status line, from Claude Code's own cache figures: time left while warm, hit rate and misses, and how many tokens the next message re-caches once cold. /cache-clock setup adds it. 233
- sprint-status 0.1.0 Status line for AILANG sprint work: the most recently touched in-progress sprint under .ailang/state/sprints, its milestones passed and the next one. 35
- glowup 1.1.0 mod + skill A glow-up for Claude Code: a cockpit pane for changes, subagents and context, an activity band, and shareable themes. 29
Script or mod?
- Write a script if you already have one, or if one line of text is all you want. Nothing to install.
- Install a mod if you'd rather not write anything, or if you want the status line to react to what Claude does during a turn.
Token and cost trackers live in their own category, Usage & cost. Many of them also put a number in the status line.