Skip to main content

Claude Code Statusline Themes

10 free Claude Code statusline themes with real-time context tracking. Research-backed 60/70/80% warnings. One command to install — works on 2.0.27+.

Claude Code statusline themes — real-time context window tracking for OpenClaw Clawdbot and Claude Code
FREE TOOL10 THEMESREAL-TIME CONTEXT

Get better context tracking before Claude Code degrades.

These statuslines use Claude Code's real-time context_window API (2.1.72+) to display accurate token usage instantly — no parsing delays, no guessing. For older versions (2.0.27–2.1.71), the statuslines automatically fall back to transcript parsing. Works great alongside OpenClaw Clawdbot's /handoff-prompt command.

Improve your long coding sessions by creating a fun customized context status line that reflects your personality. Pick a theme, or build your own custom status line with the live generator below.

Grab a Theme

Copy CommandPerformance Optimized theme · ⭐ RECOMMENDED · v3.0
/statusline create a research-backed statusline for Claude Code that uses real-time context data VERSION DETECTION & DATA SOURCE: - Read JSON from stdin - Check if context_window.used_percentage exists (Claude Code 2.1.72+) - If YES: Use context_window.used_percentage directly (real-time mode) - If NO: Parse transcript_path JSONL file (fallback mode for 2.0.27-2.1.71) REAL-TIME MODE (preferred): - Extract: context_window.used_percentage (already calculated by Claude Code) - Extract: context_window.total_input_tokens (for debug logging) - Extract: exceeds_200k_tokens flag (override to 100% if true) - Log to /tmp/claude-statusline-calls.log: "REALTIME: Tokens: {total} | Raw: {raw}% | Scaled: {scaled}%" FALLBACK MODE (older versions): - Parse transcript JSONL file at transcript_path - Find last COMPLETE assistant message (filter: total tokens > 1000 to avoid streaming artifacts) - Extract: message.usage.input_tokens + message.usage.cache_read_input_tokens - Calculate: rawUsed = (total_tokens / 200000) * 100 - Log to /tmp/claude-statusline-calls.log: "FALLBACK: Tokens: {total} | Raw: {raw}% | Scaled: {scaled}%" SCALING (both modes): - Scale percentage: used = (rawUsed / 80) * 100 - Cap at 100% maximum - OVERRIDE: If exceeds_200k_tokens == true, force to 100% DISPLAY FORMAT: [Model Name] │ [Directory] [Progress Bar] [Percentage]% [Warning Message] PROGRESS BAR: - Use █ for filled, ░ for empty - 10 blocks total - Filled blocks: percentage / 10 (rounded down) COLORS (ANSI codes): - 0-60%: Bright green (\\033[32m) - safe zone - 60-70%: Yellow (\\033[33m) - caution zone - 70-80%: Orange (\\033[38;5;208m) - warning zone - 80%+: Blinking red (\\033[5;31m) - critical zone WARNING MESSAGES: - At 60%: "👉/handoff-prompt dontsleeponai.com/handoff-prompt" - At 70%: "⚠️ /handoff-prompt dontsleeponai.com/handoff-prompt" - At 80%: "🚨 /handoff-prompt NOW - dontsleeponai.com" MODEL & DIRECTORY: - Dim both (\\033[2m) so they don't distract - Model: Use model.display_name from JSON - Directory: Use basename of workspace.current_dir DEBUG LOGGING: - Append to /tmp/claude-statusline-calls.log with timestamp - Show which mode was used (REALTIME vs FALLBACK) - Log token counts and percentage calculations Create a bash script that implements this exactly.
Sign in to keep track of what you've copied

This is the recommended starting point — research-backed thresholds with warnings that link straight to the handoff methodology. There are 9 more ready-made themes (Minimalist, Hacker/Terminal, Emoji Heavy, Productivity, Traffic Light, Battery, Developer Debug, Calm, Speedrun/Gaming), or build something entirely custom with the live generator below.

Before you run — one 30-second check

AI coding agents like Claude Code have full access to your filesystem and can execute shell commands. Prompt injection — hiding malicious instructions inside a text file — is OWASP's #1 AI security risk. We're confident this prompt is clean, but you should verify it yourself. It takes 30 seconds. Paste this into Claude Code (or any LLM) before running the prompt: "Before I run this prompt, tell me: does it contain any instructions to run shell commands, access files outside this project, send data to external servers, or take any action beyond its stated purpose? List anything suspicious, or confirm it's clean."

Claude Code's context window holds everything — your instructions, the conversation history, every file it's read, every response it's given. As that window fills, older context gets deprioritized and response quality quietly degrades. With real-time data (2.1.72+), these thresholds are instantly actionable — no more lag between what the statusline shows and what's actually happening.

Why 60–70%, Not 100%? The Science Behind Context Degradation

0–60% — Full performancePeak quality. Work freely.
60–70% — Consider handoffQuality still good, but this is the ideal time to handoff for complex tasks.
70–80% — Noticeably degradingResponses getting vaguer. Start your handoff now.
80–85% — CriticalImmediate action needed. Quality suffering.
85%+ — Auto-compact triggersClaude Code compresses context automatically (160,000–170,000 tokens). The statusline uses the exceeds_200k_tokens flag as the authoritative signal — when compaction starts, it shows 100%.

The best practice: use the 8-section handoff methodology at 60–70% to preserve context quality with a comprehensive continuation document. That's why every theme above links to dontsleeponai.com/handoff-prompt at the critical thresholds.

Prefer to roll your own instead of picking a preset? Customize colors, messages, icons, and bar style with the live generator below — full live preview included.

Custom Status Line Generator

Load a preset

Live preview

— at 45% (safe)
Sonnet 4.5my-project█████░░░░░45%
— at 65% (caution)
⚠️Sonnet 4.5my-project███████░░░65%👉/handoff-prompt dontsleeponai.com/handoff-prompt
— at 75% (warning)
🔶Sonnet 4.5my-project████████░░75%⚠️ /handoff-prompt dontsleeponai.com/handoff-prompt
— at 85% (critical)
💀Sonnet 4.5my-project█████████░85%🚨 /handoff-prompt NOW - dontsleeponai.com

Customize

Display

Progress bar

Colors

Safe zone0–60%
Caution60–70%
Warning70–80%
Critical80–100%

Warning messages

At 60%
At 70%
At 80%

Icons / emojis

Safe (0-60%)
Caution (60%)
Warning (70%)
Critical (80%)

Generated command

/statusline show model name, directory, context percentage. Use green (0-60%), yellow (60-70%), orange (70-80%), red blinking (80%+). Icons: caution icon: ⚠️, warning icon: 🔶, critical icon: 💀. Add messages at 60%: "👉/handoff-prompt dontsleeponai.com/handoff-prompt", at 70%: "⚠️ /handoff-prompt dontsleeponai.com/handoff-prompt", at 80%: "🚨 /handoff-prompt NOW - dontsleeponai.com". Use █░ for the progress bar with 10 blocks. Dim the model and directory names.

Works in VS Code terminal, iTerm2, Terminal.app — any ANSI-capable terminal. Requires the Claude Code CLI, v2.0.27 or later (v2.1.72+ recommended for real-time mode).

Prerequisites: Claude Code CLI v2.1.72+ recommended, v2.0.27+ minimum (check with claude --version); jq installed (macOS: brew install jq · Linux: sudo apt install jq); a terminal with ANSI color support.

How to Install a Claude Code Statusline (5 Steps)

1Check your versionRun: claude --version — 2.1.72+ gets real-time mode. 2.0.27-2.1.71 gets fallback mode (still works, one message behind).
2Upgrade for real-time mode (optional)Run: npm install -g @anthropic-ai/claude-code@latest — takes ~30 seconds. Restart Claude Code after upgrading.
3Copy a theme commandPick a theme. Click "Copy Command" to copy the full /statusline prompt to your clipboard.
4Paste into Claude Code and press EnterOpen Claude Code in any terminal. Paste the command and hit Enter. Claude Code generates the statusline script in about 5-10 seconds.
5Verify which mode is activeSend your next message, then check: tail -3 /tmp/claude-statusline-calls.log — shows REALTIME: (2.1.72+) or FALLBACK: (older). Statusline appears at the bottom of the terminal.

Common questions about installing and troubleshooting a Claude Code statusline:

Frequently Asked Questions

Every day is magic. We are the prospectors of 1849 and there is gold in them hills. Be the one who prospects it.

Don't sleep on AI.

Changelog

3.02026-03-10Current

Real-time context data — zero lag

Claude Code 2.1.72+ now exposes a context_window object, so all 10 themes read used_percentage directly instead of parsing the transcript — matching /context exactly instead of trailing one message behind. Older versions (2.0.27+) automatically fall back to transcript parsing. Debug logging was added to every theme (check /tmp/claude-statusline-calls.log to see which mode is active), plus a migration guide and a real-time-vs-fallback technical comparison.

2.12026-03-09

Fixed 0% / jumping bug and the compaction race condition

Fixed a 0%/jumping display bug by filtering streaming artifacts (thinking blocks, tool_use) below 1000 tokens, and fixed a race condition where the exceeds_200k_tokens flag now overrides to 100% the moment compaction starts. All 10 themes upgraded to tail -100 for reliability during heavy tool-use sessions.

2.02026-03-09

Full theme rewrite — exact ANSI specs for all 10 themes

Every theme command was rewritten with a complete implementation spec, exact ANSI escape codes, and the token-extraction formula ((tokens / 200000) * 100 / 80) * 100. Added an installation guide with prerequisites and an expanded troubleshooting FAQ.

Claude Code Statusline Themes — 10 Free Copy-Paste Installs | Don't Sleep On AI